chore: remove the broken/inoperable Yarn v1 Analyzer - #8705
Merged
jeremylong merged 2 commits intoAug 4, 2026
Conversation
Signed-off-by: Chad Wilson <29788154+chadlwilson@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Removes the broken Yarn v1 (Classic) audit flow from Dependency-Check and changes the analyzer behavior to skip Yarn Classic projects (with a warning) while continuing to support Yarn v2+ (Berry) auditing.
Changes:
- Update
YarnAuditAnalyzerto treat Yarn Classic (v1) as unsupported and skip analysis rather than attempting the deprecated upstream audit path. - Adjust integration tests and test resources to reflect the removal of Yarn Classic analysis expectations.
- Refresh documentation and build/test environment hints (Yarn install URL, Docker corepack setup) to align with Yarn Berry support.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/site/markdown/analyzers/yarn-audit.md | Documents Yarn v1 (Classic) de-support and Yarn v2+ (Berry)-only analyzer behavior. |
| README.md | Updates Yarn installation link to Yarn’s current (Berry) documentation. |
| Dockerfile | Stops pre-installing Yarn v1 via corepack; keeps Yarn latest + pnpm latest. |
| core/src/test/resources/yarn/yarn-classic-audit-bad-berry-lockfile/yarn.lock | Removes Yarn Classic “bad berry lockfile” fixture no longer needed after de-support. |
| core/src/test/resources/yarn/yarn-classic-audit-bad-berry-lockfile/package.json | Removes Yarn Classic “bad berry lockfile” fixture no longer needed after de-support. |
| core/src/test/java/org/owasp/dependencycheck/analyzer/YarnAuditAnalyzerIT.java | Updates Classic-mode IT to assert Yarn v1 lockfiles are skipped (no deps identified). |
| core/src/main/java/org/owasp/dependencycheck/analyzer/YarnAuditAnalyzer.java | Removes Yarn Classic audit implementation and gates analysis to Yarn v2+ (Berry) only. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
jeremylong
approved these changes
Aug 4, 2026
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 of Change
The Yarn v1/classic Analyzer has been broken since NPM removed the underlying API which Yarn v1 uses via its CLI. Yarn v1 is EOL, and it won't be fixed. People need to move to Yarn Berry (v2/v3/v4 etc).
This changes ODC to ignore Yarn v1/classic rather than failing; but could equally throw
AnalysisExceptions.Should have been done in v13, but since the analyzer has been broken upstream for several weeks now, I don't think this is a breaking change as there's no change to config properties. Previously failing builds will now succeed with only logging warnings though.
Related issues
Have test cases been added to cover the new functionality?
yes