Skip to content

feat: show dev dependency label in terminal and HTML report#604

Merged
sonukapoor merged 6 commits into
mainfrom
feature/issue-578-dev-dependency-label
Jun 11, 2026
Merged

feat: show dev dependency label in terminal and HTML report#604
sonukapoor merged 6 commits into
mainfrom
feature/issue-578-dev-dependency-label

Conversation

@sonukapoor

Copy link
Copy Markdown
Collaborator

Surfaces whether a vulnerable package is a devDependency in terminal output and the HTML report, so developers can immediately distinguish build-time risk from runtime risk.

What changed

  • Yarn Classic and Yarn Berry parsers now detect dev dependencies by walking dependency paths against devDependencies in package.json. npm, pnpm, and Bun already set this correctly.
  • Terminal output (compact and verbose) shows direct · dev or transitive · dev when the finding is from a devDependency
  • HTML report TYPE column shows a purple direct · dev badge for devDependency findings
  • serializeFinding now includes dev: boolean in its output
  • No label shown when dev status is unknown (Yarn Berry, or packages reachable from both prod and dev roots)

Behaviour

A package is only labelled dev when every known dependency path to it starts from a devDependencies root. If a package is reachable from both prod and dev roots, no label is shown.

Closes #578

@sonukapoor sonukapoor force-pushed the feature/issue-578-dev-dependency-label branch from 96bb349 to 32ef0ce Compare June 11, 2026 11:23
@sonukapoor sonukapoor merged commit 5a9697d into main Jun 11, 2026
@sonukapoor sonukapoor deleted the feature/issue-578-dev-dependency-label branch June 11, 2026 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] show if vulnerability is related to a devDependency or a runtime dependency

1 participant