Skip to content

Dependency audit: what ships stays at 0; a development-tool advisory needs a dated exception - #32

Merged
andreibesleaga merged 2 commits into
mainfrom
ci/audit-dev-exception
Nov 18, 2026
Merged

andreibesleaga merged 2 commits into
mainfrom
ci/audit-dev-exception

Conversation

@andreibesleaga

Copy link
Copy Markdown
Owner

A new advisory (GHSA-fc5q-39xc-vjpf, picomatch <= 4.0.7, no fixed version) turned every test job red. It is reached only through development tools; npm audit --omit=dev reports 0.

  • Both workflows: the audit step checks what ships (npm audit --omit=dev --audit-level=low).
  • The architecture lane under AGSC_AUDIT=1 (already run by both workflows) fails on any advisory that is not in tests/arch/audit-exceptions.json, on an expired entry, and on any advisory in what ships.
  • One entry, expiring 31 January 2027.

Local: 4,972 tests, 0 fail; lint and hygiene clean.

…sory needs a dated exception

picomatch <= 4.0.7 (GHSA-fc5q-39xc-vjpf) has no fixed version and is reached only
through development tools. The workflows now run npm audit on what ships, and the
architecture lane (AGSC_AUDIT=1) allows a development-tool advisory only while it is
listed, with a reason and an expiry date, in tests/arch/audit-exceptions.json.
Copilot AI lite review requested due to automatic review settings November 18, 2026 09:47

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.

🟡 Changes recommended

Active documentation inconsistencies and insufficient expiry-date validation leave the audit exception policy unenforced and allow malformed exceptions to bypass the intended gate.

3 open issues
What changed in this PR

Updates dependency-audit policy so production dependencies must remain vulnerability-free while development-only advisories can be tracked through dated architecture-test exceptions.

Changes:

  • Updates both CI workflows to audit only shipped dependencies.
  • Adds architecture-lane validation for allowed advisories, exception metadata, and expiry dates.
  • Documents the revised audit policy and records the temporary picomatch advisory exception.
File Description
tests/​arch/​README.md Documents the production-audit policy and dated development-dependency exception process.
tests/​arch/​pinned-dependencies.test.js Adds production audit, exception allowlisting, and expiry validation checks.
tests/​arch/​audit-exceptions.json Records the temporary picomatch advisory exception and its expiry.
docs/​ENGINEERING.md Updates the engineering dependency-audit gate documentation.
CONTRIBUTING.md Updates contributor audit instructions to describe the exception-aware policy.
CHANGELOG.md Records the changed CI and release audit behavior.
.github/​workflows/​test.yml Changes the test workflow audit to check only dependencies included in what ships.
.github/​workflows/​release.yml Changes release verification to audit only dependencies included in what ships.

Review effort: Lite

assert.match(e.id, /^GHSA(-[0-9a-z]{4}){3}$/u);
assert.ok(e.package && e.reason, `${e.id} gives no package or reason`);
assert.match(e.recorded, /^\d{4}-\d{2}-\d{2}$/u);
assert.ok(e.expires > today, `${e.id} expired on ${e.expires}: update the dependency or review the exception`);
Comment thread CONTRIBUTING.md Outdated
npm test # the whole suite, node:test, offline
npm run test:coverage # coverage of src/: lines 99.9 %, functions 99 %, branches 93 %
npm run audit # npm audit must report 0 vulnerabilities
npm run audit # npm audit must report 0 vulnerabilities (a dated exception: tests/arch/audit-exceptions.json)
Comment thread docs/ENGINEERING.md Outdated
| Validators | `for t in tools/validate-*; do node "$t" --json; done` | The independent checkers over the distribution: rule text, schemas, ontology, vectors, scenarios, diagrams; the discovery document of a fixture build at Level 2 (`validate-wellknown`). |
| Hygiene | `node tools/public-hygiene .` | "Public means clean": no private path, working-process vocabulary, secret, e-mail address, personal data beyond the canonical name, or forbidden wording in any file of the tree. The allowed hits, each with its reason, are in `.public-hygiene.json`. 0 errors. |
| Audit | `npm run audit` | `npm audit --audit-level=low`: 0 advisories on the pinned dependency set. |
| Audit | `npm run audit` | `npm audit --audit-level=low`: 0 advisories on the pinned dependency set. The workflows run `npm audit --omit=dev --audit-level=low` (what ships) and the architecture lane with `AGSC_AUDIT=1`, which allows a development-tool advisory only while it is listed, with a reason and an expiry date, in `tests/arch/audit-exceptions.json`. |
…cked as calendar dates

Review findings: the local command and the release checklist now run the gate the
workflows run, and an exception whose dates are not real YYYY-MM-DD days fails.
@andreibesleaga
andreibesleaga merged commit f179030 into main Nov 18, 2026
11 checks passed
@andreibesleaga
andreibesleaga deleted the ci/audit-dev-exception branch November 18, 2026 11:29
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