ci: enable incremental dependency-check updates - #20126
Conversation
|
Dependency-Check cache validation for commit 32629a3:
Conclusion: this follow-up did not demonstrate an Actions cache hit or incremental NVD update. The version-scoped key is present, but the cache saved by the pull_request run was not visible to this workflow_dispatch run, likely because of GitHub Actions cache scope by event/ref. Both runs failed on CVSS >= 7 findings after the scan; neither showed the previous URL-length database-schema error. |
FrankChen021
left a comment
There was a problem hiding this comment.
| Severity | Findings |
|---|---|
| P0 | 0 |
| P1 | 1 |
| P2 | 0 |
| P3 | 0 |
| Total | 1 |
The review found one P1 workflow correctness issue: the refreshed dependency-check cache is not saved when the preceding vulnerability scan fails.
Reviewed 2 of 2 changed files.
This is an automated review by Codex GPT-5.6-Luna(max)
| - name: Save Dependency-Check data | ||
| # A pull_request run uses an isolated merge-ref cache that cannot be | ||
| # reused by branch, scheduled, or workflow_dispatch runs. | ||
| if: steps.dependency-check-update.outcome == 'success' && github.event_name != 'pull_request' |
There was a problem hiding this comment.
[P1] Updated cache is skipped when the scan fails
Because this condition has no status function, GitHub Actions implicitly requires success(). The preceding security scan intentionally fails when vulnerabilities are found, so this save step is skipped even when dependency-check-update succeeded. The workflow therefore cannot persist the refreshed database on the observed failure path and will repeatedly download the full NVD dataset. Include an explicit always() or equivalent status condition while retaining the update-success and non-PR checks.
FrankChen021
left a comment
There was a problem hiding this comment.
| Severity | Findings |
|---|---|
| P0 | 0 |
| P1 | 1 |
| P2 | 0 |
| P3 | 0 |
| Total | 1 |
The previous cache-persistence finding remains unresolved: the save step is still skipped when the vulnerability scan fails.
Reviewed 1 of 3 changed files with findings; all 3 changed files were reviewed.
Validation: focused git diff --check and XML parsing passed. Builds and tests were not run.
This is an automated review by Codex GPT-5.6-Luna(max)
| - name: Save Dependency-Check data | ||
| # A pull_request run uses an isolated merge-ref cache that cannot be | ||
| # reused by branch, scheduled, or workflow_dispatch runs. | ||
| if: steps.dependency-check-update.outcome == 'success' && github.event_name != 'pull_request' |
There was a problem hiding this comment.
[P1] Updated cache is skipped after scan failures
GitHub Actions implicitly applies success() to this condition, so actions/cache/save is skipped whenever the vulnerability scan fails. That prevents the refreshed Dependency-Check data from being persisted precisely when a failed scan should still leave the cache updated. Use an always()-based condition while retaining the update-success guard and event restriction.
Description
Testing
git diff --checkThe first run is expected to initialize the cache; a subsequent run will verify that the cached database is restored and only incremental NVD updates are downloaded.