Skip to content

Security enhancements#794

Merged
TwitchBronBron merged 12 commits into
masterfrom
chris/npm-audit-cleanup
May 20, 2026
Merged

Security enhancements#794
TwitchBronBron merged 12 commits into
masterfrom
chris/npm-audit-cleanup

Conversation

@chrisdp

@chrisdp chrisdp commented May 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Bumped postman-request to ^2.88.1-postman.48 (patches the runtime qs vuln)
  • Removed rimraf devDep; clean script now uses inline node -e "...fs.rmSync..."
  • Removed coveralls-next devDep, publish-coverage script, and the commented-out CI step; coveralls badge commented out in README
  • Bumped mocha 9 → ^10.8.2 and @types/mocha 7 → ^10.0.10
  • Bumped CI node version to 18.20.4 across build.yml, create-vsix.yml, docs.yml, and make-release-artifacts.yml
  • Added a single overrides entry for serialize-javascript ^7.0.5 (mocha 10 still pins ^6.0.2)
  • Added audit-ci devDep and an audit-ci.jsonc allowlist. The ip advisory (via node-ssdp) is allowlisted: no upstream fix is published and ip does not reach any untrusted-input path in this extension
  • Added npm run audit script that chains npm audit || audit-ci so the readable npm audit table is shown alongside the audit-ci gate; wired into CI between lint and test
  • Added Accepted security advisories section in the README pointing at audit-ci.jsonc

Known follow-up

CI will fail on the ejs advisory (GHSA-ghr5-ch3p-vcr6) reaching through statigen → ejs-lint → ejs. statigen is being fixed separately; this PR will pass CI once statigen ships a release with the patched ejs-lint.

chrisdp added 2 commits May 19, 2026 12:33
- Bump postman-request to ^2.88.1-postman.48 (patches qs runtime vuln)
- Drop rimraf devDep; replace `clean` script with inline node fs.rmSync
- Drop coveralls-next devDep, publish-coverage script, and CI step;
  comment out coveralls badge in README
- Bump mocha 9 -> ^10.8.2 and @types/mocha 7 -> ^10.0.10
- Override serialize-javascript to ^7.0.5 (mocha 10 still pins ^6.0.2)
- Bump CI node version to 18.20.4 across all workflows
- Add `npm run audit` script that chains `npm audit || audit-ci` so the
  readable table from npm audit is shown alongside the audit-ci gate
- Add audit-ci.jsonc with the `ip` (via node-ssdp) advisory allowlisted;
  no fixed version exists upstream and it does not reach untrusted input
- Add `Accepted security advisories` section in README pointing at the
  jsonc allowlist

Note: CI will fail on the ejs advisory (via statigen -> ejs-lint) until
statigen is updated. Fix is being addressed in statigen separately.
statigen pulls in a vulnerable `ejs-lint` -> `ejs` chain that has no
upstream fix. Moving the docs build into a sub-project (mirroring the
`webviews/` pattern) keeps statigen's transitives out of the extension's
own dependency tree so `npm audit` against the extension no longer flags
the ejs advisory.

- New `docs/package.json` with statigen as a local devDep
- `build-docs` and `watch-docs` now `cd docs && npm install && ...`
  (install on demand to avoid burdening every `npm install`)
- Drop `statigen` from the top-level devDeps
@chrisdp chrisdp changed the title Reduce npm audit count from 39 to 5; gate CI with audit-ci fix npm audit issues in main project May 19, 2026
chrisdp added 2 commits May 19, 2026 14:09
undent 1.0.1 removes its `coveralls-next` runtime dep, which previously
pulled in vulnerable `js-yaml` 4.1.0. The API surface used by this
extension (`import undent from 'undent'` default and `import { undent }`
named) is unchanged in the 0.x -> 1.x bump.
Adopts the pattern from TwitchBronBron/undent#3:
- Add `lcovonly` to nyc reporters so `coverage/lcov.info` is generated
- Add the `coverallsapp/github-action@v2` step, gated to `ubuntu-latest`
  so the matrix doesn't double-upload
- Move the coveralls token from the job-level env into the action's env
- Un-comment the coveralls badge in README.md
@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage is 54.915%chris/npm-audit-cleanup into master. No base build found for master.

@chrisdp chrisdp changed the title fix npm audit issues in main project Security enhancements May 19, 2026
chrisdp added 7 commits May 20, 2026 08:11
Runs `npm run audit` on PRs and master pushes so the audit posture
is gated independently of the larger `build` workflow. Removes the
redundant `npm run audit` step from `build.yml` since the new
workflow runs the same check in parallel.
Without an explicit `label` query param, shields.io defaults to "build"
for the github/actions/workflow/status endpoint.
shields.io retired the visual-studio-marketplace/v endpoint, so the
badge had been rendering as 'retired badge'. Switch to vsmarketplacebadges.dev,
which is already used by the installs badge on the line above, and
pass label=VSCode to keep the badge compact.
@TwitchBronBron
TwitchBronBron merged commit d966368 into master May 20, 2026
8 checks passed
@TwitchBronBron
TwitchBronBron deleted the chris/npm-audit-cleanup branch May 20, 2026 13:26
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.

3 participants