Skip to content

[Dependency Mgmt] Template CI audit steps pass vacuously — audit-deps.js audits 0 packages from a template directory #1060

Closed

Description

@SnowboardTechie

Summary

.github/scripts/audit-deps.js discovers packages by shelling out to pnpm list --json --depth=Infinity, whose output depends on the directory it runs in. The template CI jobs run it from a template directory, and because the templates are standalone packages outside the pnpm workspace, pnpm list there returns the package with no dependencies. The audit step reports Auditing 0 packages… No vulnerabilities found and exits 0 regardless of what is installed.

Verified in templates/express-js:

# from templates/express-js, as ci-template-express-js.yml invokes it
Auditing 0 packages…
No vulnerabilities found.

# same tree, actually audited
$ pnpm audit --ignore-workspace --audit-level high
30 vulnerabilities found
Severity: 1 low | 11 moderate | 16 high | 2 critical

pnpm list --json --depth=Infinity --ignore-workspace from that directory reports 7 dependencies and 25 devDependencies. The hidden advisories sit in tar, vitest, brace-expansion, fast-uri, form-data, js-yaml, postcss, vite, body-parser, qs and uuid — all pre-existing, none from the templates' own code.

templates/quickstart has the same wiring and also audits 0 packages. ci-template-fast-api.yml is unaffected; it runs poetry audit.

Workspace-scoped invocations are fine: --filter @common-grants/cli audits 183 packages, --filter @common-grants/sdk 99, and the repo-wide --level high run from ./website 696.

The step's own comment says to "revert to pnpm audit --ignore-workspace once pnpm ships native support", so the dropped flag looks like an oversight when the script replaced the direct call.

Acceptance criteria

  • audit-deps.js audits a standalone template's real dependency tree when invoked from that template's directory.
  • A known-vulnerable dependency added to a template fails that template's CI job, confirming the gate is live.
  • The advisories currently hidden in templates/express-js are triaged: upgraded, or suppressed with a rationale comment matching the existing four.
  • The --ignore-ghsa list in ci-template-express-js.yml is re-checked once the audit runs for real.

Activity

  1. added
    dependenciesPull requests that update a dependency file
    ciIssue or PR related to CI/CD workflows
    on Aug 3, 2026
  2. changed the title [-]Template CI audit steps pass vacuously — audit-deps.js audits 0 packages from a template directory[/-] [+][Dependency Mgmt] Template CI audit steps pass vacuously — audit-deps.js audits 0 packages from a template directory[/+] on Aug 4, 2026
  3. added a commit that references this issue on Aug 5, 2026
    12b0ccd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

ciIssue or PR related to CI/CD workflowsdependenciesPull requests that update a dependency file

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions