Trigger internal analysis on internal vulnerability create/update - #7104
Open
heyiamwahab236 wants to merge 1 commit into
Open
heyiamwahab236 wants to merge 1 commit into
heyiamwahab236 wants to merge 1 commit into
Conversation
Findings for INTERNAL vulnerabilities are currently only produced when components are re-analyzed - on BOM upload or during the scheduled portfolio analysis. Creating or updating an internal vulnerability has no immediate effect: findings appear silently up to a day later, and there is no feedback if the affected-component identifiers match nothing in the portfolio. Creating or updating an INTERNAL vulnerability now resolves candidate components via targeted queries (PURL type/namespace/name, or CPE vendor:product substring with escaped-form support) and dispatches an InternalAnalysisEvent for just those candidates. The existing internal analyzer performs the precise identity and version-range matching, so results are identical to those of the scheduled analysis - they just appear immediately. InternalAnalysisTask is subscribed to InternalAnalysisEvent to make the dispatch effective; analyzers were previously only invoked inline by VulnerabilityAnalysisTask. Signed-off-by: Abdul wahab Shah <abdulwahab.shah236@gmail.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 561 |
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.
2 tasks
Author
|
Companion frontend PR: DependencyTrack/frontend#1773 |
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Findings for INTERNAL vulnerabilities are currently only produced when components are
re-analyzed — on BOM upload or during the scheduled portfolio analysis. Creating or
updating an internal vulnerability has no immediate effect: findings appear silently
up to a day later, with no feedback if the affected-component identifiers match
nothing in the portfolio.
Creating or updating an INTERNAL vulnerability now resolves candidate components via
targeted queries and dispatches an
InternalAnalysisEventfor just those candidates.The existing internal analyzer performs the precise identity and version-range
matching, so results are identical to those of the scheduled analysis — they just
appear immediately.
Addressed Issue
fixes #7030
Additional Details
ComponentQueryManager.getCandidateComponentsForVulnerableSoftwarenarrowscandidates at the DB level (PURL type/namespace/name; CPE vendor:product substring,
matching both escaped and unescaped stored forms) and deduplicates across entries.
InternalAnalysisTaskis subscribed toInternalAnalysisEventinEventSubsystemInitializerto make the dispatch effective — analyzers werepreviously only invoked inline by
VulnerabilityAnalysisTask. Aware of the TODOabout moving away from
Subscriber#inform; happy to switch to direct invocationif preferred.
Checklist
This PR fixes a defect, and I have provided tests to verify that the fix is effectiveThis PR introduces changes to the database model, and I have updated the migration changelog accordinglyThis PR is a substantial change (per the ADR criteria), and I have added an ADR underdocs/adr/