Skip to content

fix(deps): resolve all npm audit findings and cover npm with Dependabot - #48

Merged
CybotTM merged 1 commit into
mainfrom
fix/npm-audit-vulnerabilities
Jul 28, 2026
Merged

fix(deps): resolve all npm audit findings and cover npm with Dependabot#48
CybotTM merged 1 commit into
mainfrom
fix/npm-audit-vulnerabilities

Conversation

@CybotTM

@CybotTM CybotTM commented Jul 28, 2026

Copy link
Copy Markdown
Member

npm audit fails on main, which blocks every pull request in this repo — that is how it surfaced (it blocked #47, an unrelated one-line change).

Findings

Severity Package Advisory
critical astro GHSA-hpcx-pg6g-x697Malicious code in astro
high postcss Path traversal via sourceMappingURL auto-loading
moderate ×4 yaml, yaml-language-server, volar-service-yaml, @astrojs/language-server Stack overflow on deeply nested YAML

The critical one is worth calling out: it applies to exactly =7.1.0, the version pinned in the lockfile. That is a compromised release rather than a latent bug, so it warrants attention beyond the usual audit noise.

The fix

npm audit fix clears all six. The change is lockfile-only — astro moves 7.1.0 → 7.1.4 within the existing ^7.1.0 range, so package.json and the declared dependency set are untouched.

Verified after the change:

critical=0 high=0 moderate=0 low=0
npm run build → 1 page(s) built, Complete!

Why it could happen, and what stops a repeat

Dependabot watched only github-actions here — npm was never covered. The audit workflow reported the problem, but nothing was proposing the upgrade that fixes it, so a compromised package version could sit in the lockfile indefinitely.

This adds an npm ecosystem entry alongside the existing one. The existing github-actions block is left byte-for-byte as it was; the diff removes zero lines.

Note on #47

#47 (removing the sunset Go Report Card badge from the classifier) is blocked solely by this audit failure and needs no change of its own — it should go green once this lands.

npm audit failed on main with 6 findings, blocking every pull request. The
critical one is GHSA-hpcx-pg6g-x697, "Malicious code in astro", which
applies to exactly the version pinned in the lockfile (7.1.0) — a
compromised release, not a latent bug. The others are a postcss path
traversal and a yaml stack overflow reached through
@astrojs/language-server.

npm audit fix resolves all six. The change is lockfile-only: astro moves
7.1.0 -> 7.1.4 inside the existing ^7.1.0 range, so package.json and the
declared dependencies are untouched and the site still builds.

Add npm to Dependabot, which so far only watched github-actions. That gap
is why a compromised package version could sit in the lockfile unnoticed:
the audit workflow reports the problem but nothing was proposing the
upgrade that fixes it. The existing github-actions block is left exactly as
it was.

Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
Copilot AI review requested due to automatic review settings July 28, 2026 06:12
@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

Scorecard details
PackageVersionScoreDetails
npm/@astrojs/language-server 2.16.13 UnknownUnknown
npm/ajv-i18n 4.2.0 UnknownUnknown
npm/astro 7.1.4 UnknownUnknown
npm/cookie 2.0.1 🟢 8.4
Details
CheckScoreReason
Binary-Artifacts🟢 10no binaries found in the repo
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration
CI-Tests🟢 925 out of 26 merged PRs checked by a CI test -- score normalized to 9
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Code-Review🟢 6Found 18/26 approved changesets -- score normalized to 6
Contributors🟢 10project has 20 contributing companies or organizations
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Dependency-Update-Tool🟢 10update tool detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Maintained🟢 1017 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 10
Packaging⚠️ -1packaging workflow not detected
Pinned-Dependencies🟢 10all dependencies are pinned
SAST🟢 9SAST tool detected but not run on all commits
Security-Policy🟢 9security policy file detected
Signed-Releases⚠️ -1no releases found
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Vulnerabilities🟢 82 existing vulnerabilities detected
npm/magic-string 1.1.0 🟢 3.8
Details
CheckScoreReason
Code-Review🟢 4Found 12/30 approved changesets -- score normalized to 4
Packaging⚠️ -1packaging workflow not detected
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Maintained🟢 68 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 6
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Security-Policy⚠️ 0security policy file not detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
npm/nanoid 3.3.16 🟢 6.4
Details
CheckScoreReason
Code-Review⚠️ 0Found 1/30 approved changesets -- score normalized to 0
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Security-Policy🟢 10security policy file detected
Maintained🟢 1030 commit(s) and 6 issue activity found in the last 90 days -- score normalized to 10
Packaging⚠️ -1packaging workflow not detected
Token-Permissions🟢 9detected GitHub workflow tokens with excessive permissions
Binary-Artifacts🟢 10no binaries found in the repo
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Pinned-Dependencies🟢 10all dependencies are pinned
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
SAST🟢 5SAST tool is not run on all commits -- score normalized to 5
npm/neotraverse 1.0.1 UnknownUnknown
npm/postcss 8.5.23 🟢 7.3
Details
CheckScoreReason
Code-Review⚠️ 2Found 8/30 approved changesets -- score normalized to 2
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Binary-Artifacts🟢 10no binaries found in the repo
Security-Policy🟢 10security policy file detected
Maintained🟢 1030 commit(s) and 14 issue activity found in the last 90 days -- score normalized to 10
Token-Permissions🟢 9detected GitHub workflow tokens with excessive permissions
Pinned-Dependencies🟢 10all dependencies are pinned
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Fuzzing🟢 10project is fuzzed
License🟢 10license file detected
Branch-Protection🟢 3branch protection is not maximal on development and all release branches
Signed-Releases⚠️ -1no releases found
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
npm/prettier 3.9.6 🟢 6.6
Details
CheckScoreReason
Maintained🟢 1030 commit(s) and 6 issue activity found in the last 90 days -- score normalized to 10
Packaging⚠️ -1packaging workflow not detected
Code-Review⚠️ 2Found 5/17 approved changesets -- score normalized to 2
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Security-Policy🟢 10security policy file detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Pinned-Dependencies🟢 8dependency not pinned by hash detected -- score normalized to 8
Binary-Artifacts🟢 10no binaries found in the repo
Fuzzing⚠️ 0project is not fuzzed
SAST🟢 10SAST tool is run on all commits
npm/volar-service-css 0.0.71 UnknownUnknown
npm/volar-service-emmet 0.0.71 UnknownUnknown
npm/volar-service-html 0.0.71 UnknownUnknown
npm/volar-service-prettier 0.0.71 UnknownUnknown
npm/volar-service-typescript 0.0.71 UnknownUnknown
npm/volar-service-typescript-twoslash-queries 0.0.71 UnknownUnknown
npm/volar-service-yaml 0.0.71 UnknownUnknown
npm/yaml 2.8.3 🟢 7.3
Details
CheckScoreReason
Code-Review⚠️ 1Found 2/13 approved changesets -- score normalized to 1
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Packaging⚠️ -1packaging workflow not detected
Maintained🟢 108 commit(s) and 7 issue activity found in the last 90 days -- score normalized to 10
Security-Policy🟢 10security policy file detected
Binary-Artifacts🟢 10no binaries found in the repo
Token-Permissions🟢 9detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Pinned-Dependencies⚠️ 2dependency not pinned by hash detected -- score normalized to 2
Fuzzing🟢 10project is fuzzed
License🟢 10license file detected
Branch-Protection🟢 3branch protection is not maximal on development and all release branches
Signed-Releases⚠️ -1no releases found
SAST🟢 10SAST tool is run on all commits
npm/yaml-language-server 1.23.0 🟢 7.8
Details
CheckScoreReason
Maintained🟢 1030 commit(s) and 9 issue activity found in the last 90 days -- score normalized to 10
Code-Review🟢 9Found 28/29 approved changesets -- score normalized to 9
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Binary-Artifacts🟢 10no binaries found in the repo
Security-Policy⚠️ 0security policy file not detected
License🟢 10license file detected
Pinned-Dependencies🟢 5dependency not pinned by hash detected -- score normalized to 5
Signed-Releases⚠️ -1no releases found
Fuzzing⚠️ 0project is not fuzzed
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Packaging🟢 10packaging workflow detected
SAST🟢 10SAST tool is run on all commits

Scanned Files

  • package-lock.json

@sonarqubecloud

Copy link
Copy Markdown

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@CybotTM
CybotTM merged commit 147903c into main Jul 28, 2026
11 of 12 checks passed
@CybotTM
CybotTM deleted the fix/npm-audit-vulnerabilities branch July 28, 2026 06:16
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.

2 participants