Skip to content

chore: remove the broken/inoperable Yarn v1 Analyzer - #8705

Merged
jeremylong merged 2 commits into
dependency-check:mainfrom
chadlwilson:remove-yarn-v1-analyzer
Aug 4, 2026
Merged

chore: remove the broken/inoperable Yarn v1 Analyzer#8705
jeremylong merged 2 commits into
dependency-check:mainfrom
chadlwilson:remove-yarn-v1-analyzer

Conversation

@chadlwilson

@chadlwilson chadlwilson commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

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

Signed-off-by: Chad Wilson <29788154+chadlwilson@users.noreply.github.com>
@boring-cyborg boring-cyborg Bot added core changes to core documentation site documentation tests test cases labels Aug 3, 2026
@chadlwilson
chadlwilson requested a lite review from Copilot August 4, 2026 06:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 YarnAuditAnalyzer to 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.

Comment thread src/site/markdown/analyzers/yarn-audit.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

@marcelstoer marcelstoer left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

@jeremylong
jeremylong merged commit ba2190c into dependency-check:main Aug 4, 2026
16 checks passed
@chadlwilson
chadlwilson deleted the remove-yarn-v1-analyzer branch August 4, 2026 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core changes to core documentation site documentation tests test cases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove YarnAuditAnalyzer (classic/v1 mode) dependency on NPM audit /quick API

4 participants