Skip to content

Add weekly dependency audit - #214

Open
SCDerox wants to merge 3 commits into
mainfrom
chore/dependency-audit
Open

SCDerox wants to merge 3 commits into
mainfrom
chore/dependency-audit

Conversation

@SCDerox

@SCDerox SCDerox commented Nov 16, 2026

Copy link
Copy Markdown
Member

What this adds

A Dependency audit GitHub Actions workflow (.github/workflows/audit.yml). It runs every Monday at 06:17 UTC and on demand (workflow_dispatch). It reads package-lock.json only (no install, no secrets, contents: read), runs npm audit --omit=dev and fails on HIGH or CRITICAL advisories in production dependencies. Advisories that have no patched version can be listed in .github/audit-ignore.json (currently empty). It is intentionally not a pull request check.

Dependency fixes (separate commits)

The audit found 12 HIGH/CRITICAL advisories on main before this PR (flatted, lodash, tar, ws, undici).

  • Lockfile only: flatted, lodash, tar and ws updated within their semver ranges.
  • discord.js 14.26.4 to 14.28.1 (same major, exact pin in package.json): discord.js pins undici, and 14.28.1 is the first release depending on a patched undici. Drop this commit if you prefer to handle it separately, but the workflow will then stay red on the undici advisories.

After these commits no HIGH/CRITICAL advisories remain (3 lower-severity ones are left, not gated).

Verification

  • npm run test:unit: 229 suites passed, 2608 tests passed, 2 skipped, same as main.
  • npx eslint ./ reports the same number of errors as main (the repo already has many pre-existing lint errors); the new script adds none.
  • The workflow was run on GitHub from a temporary branch and passed.

Semver-compatible lockfile updates only: flatted, lodash, tar and ws.
undici is bumped where the dependency range allows it; the copy pinned
by discord.js is handled separately.
discord.js pins undici to an exact version, so the undici advisories can
only be fixed by moving to a discord.js release that depends on a patched
undici. 14.28.1 stays on the same major version.
Runs npm audit against the production dependencies in package-lock.json
every Monday and on demand, and fails on HIGH or CRITICAL advisories that
are not listed in .github/audit-ignore.json.
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updateddiscord.js@​14.26.4 ⏵ 14.28.16610010098 +1100
Updateddiscord-api-types@​0.38.48 ⏵ 0.38.5910010010098 +2100

View full report

This branch has not been deployed

No deployments
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.

1 participant