SRVKP-12532: CVE skill enhancement by preserving yarn.lock during analysis and adding npm ls evidence#1145
Conversation
Signed-off-by: Ankur Sinha <anksinha@redhat.com>
|
@ankrsinha: This pull request references SRVKP-12532 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ankrsinha The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
PR Reviewer Guide 🔍Warning
Here are some key observations to aid the review process:
|
Summary
Improve CVE skill accuracy by preserving the committed lockfile during analysis and capturing full dependency evidence.
Changes
Skill (SKILL.md)
rm -rf node_modules yarn.locktorm -rf node_modules dist- analysis now runs against the exact dependency versions committed on the branch, preventing false positives from fresh re-resolutionrm -rf node_modules yarn.lock && yarn install) now only happens after explicitly applying resolutions topackage.jsonyarnWhyRawandnpmLsRawfieldsAnalysis script (
analyze-deps.ts)npm ls --all <pkg>outputyarn whyandnpmls evidence instead of onlyyarn whyWhy
Previously the skill removed
yarn.lockbefore analysis, which caused Yarn to re-resolve all dependencies from scratch. This could report a CVE as already-remediated when the committed lockfile still pinned the vulnerable version. Additionally, Jira comments only includedyarn whyoutput, missing the full dependency tree fromnpm ls.Assisted-by: Claude 4.6 high