Skip to content

Add configurable source of discovery for vulnerabilities - #7117

Open
heyiamwahab236 wants to merge 1 commit into
DependencyTrack:4.14.xfrom
tecan:feature/vuln-source-of-discovery
Open

heyiamwahab236 wants to merge 1 commit into
DependencyTrack:4.14.xfrom
tecan:feature/vuln-source-of-discovery

Conversation

@heyiamwahab236

Copy link
Copy Markdown

Description

Organizations documenting their own vulnerabilities often need to record where a
vulnerability was discovered — a penetration test, an internal audit, a bug bounty
report. There is currently no field for this.

Adds an optional sourceOfDiscovery attribute to Vulnerability, populated from an
admin-configurable list of sources. The list is managed via
GET/PUT /v1/customization/vulnerability-source and stored as a single config
property. The feature is off by default; when disabled, nothing changes for existing
workflows.

Addressed Issue

fixes #7115

Additional Details

  • The SOURCE_OF_DISCOVERY column is created automatically by the schema generator,
    consistent with how new attributes are added elsewhere.
  • Introduces a small /v1/customization facade resource for curated, validated access
    to these settings; the read endpoint requires only VIEW_PORTFOLIO so the create/edit
    forms can consume it. The same rows remain accessible via /v1/configProperty.
  • Note: open PRs Add opt-in template-based vulnerability ID generation #6639 and the sibling text-placeholders PR introduce the same new
    CustomizationResource file with their own endpoints — whichever lands later will be
    rebased to merge the endpoints into the shared resource.
  • Companion frontend PR: will follow shortly and be linked here.

Checklist

  • I have read and understand the contributing guidelines
  • This PR fixes a defect, and I have provided tests to verify that the fix is effective
  • This PR implements an enhancement, and I have provided tests to verify that it works as intended
  • This PR introduces changes to the database model, and I have updated the migration changelog accordingly
  • This PR introduces new or alters existing behavior, and I have updated the documentation accordingly
  • This PR is a substantial change (per the ADR criteria), and I have added an ADR under docs/adr/

Organizations documenting their own vulnerabilities often need to record
where a vulnerability was discovered - a penetration test, an internal
audit, a bug bounty report. There is currently no field for this.

Adds an optional sourceOfDiscovery attribute to Vulnerability, populated
from an admin-configurable list of sources. The list is managed via
GET/PUT /v1/customization/vulnerability-source and stored as a single
config property. The feature is off by default; when disabled, nothing
changes for existing workflows.

The SOURCE_OF_DISCOVERY column is created automatically by the schema
generator, consistent with how new attributes are added elsewhere.

Signed-off-by: Abdul wahab Shah <214828401+heyiamwahab236@users.noreply.github.com>
@owasp-dt-bot

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 24 complexity

Metric Results
Complexity 24

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@heyiamwahab236

Copy link
Copy Markdown
Author

Companion frontend PR: DependencyTrack/frontend#1776

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants