Repository navigation
Description
Security Finding
Severity: low (process gap; current instance is a dev-only quadratic ReDoS)
Type: unsafe-pattern / missing gate
Risk: governance
Why this is a gate proposal and not another per-package issue
This is the sixth dev-tree transitive advisory in this repository that nothing in CI detects, and that only surfaces when an agent runs npm audit (without --omit=dev) by hand:
| # | Package (pinned by) | Advisory | Fix shape |
|---|---|---|---|
| #56 | smol-toml (markdownlint-cli2) | — | lockfile bump |
| #133 | js-yaml, markdown-it (markdownlint-cli2) | GHSA-r3ph-w7gj-g6xm, GHSA-253c-mchw-3w2r | lockfile bump |
| #306 | smol-toml 1.8.0 (markdownlint-cli2) | GHSA-r4xh-jqrq-34v2 | overrides |
| #406 | markdown-it 15.0.2 (markdownlint-cli2) | GHSA-gfr2-rv44-r23c, GHSA-vfgh-jcmw-g37q | overrides |
| #448 | undici 8.11.2 (jsdom) | GHSA-4qv8-2p9j-2685 +2 | overrides |
| this | re2js 2.8.6 (markdownlint 0.42.0 → markdownlint-cli2 0.24.0) | GHSA-gg6h-894w-4m9c (high, quadratic lookbehind) | overrides |
Every one of these was the same root cause: .github/workflows/npm-audit.yml runs npm audit --omit=dev, so advisories in devDependencies never fail a check, and Dependabot cannot bump them because the parent (markdownlint) pins an exact version. The repo already has the machinery to gate this class — scripts/npm-audit-gate.ts with .github/npm-audit-exceptions.json (GHSA id + reason + expiry) — it is just not pointed at the dev tree.
Proposed gate
Add a second audit step that includes dev dependencies. Because the exceptions file supports an expiry, an unpatched upstream (the usual case for dev tooling) can be acknowledged without blocking every PR.
Exact replacement in .github/workflows/npm-audit.yml (after the existing "Audit production dependencies" step):
# Dev-tree advisories (markdownlint-cli2, jsdom, …) have repeatedly gone
# unnoticed because the step above omits devDependencies. Gate them too;
# unpatched upstreams are acknowledged, with an expiry, in
# .github/npm-audit-exceptions.json.
- name: Run npm audit (including devDependencies)
run: npm audit --json > npm-audit-dev.json || true
- name: Audit development dependencies
run: npx tsx scripts/npm-audit-gate.ts npm-audit-dev.json --level=highNo change to scripts/npm-audit-gate.ts is needed; it already accepts any npm audit --json report.
Why this needs a human (or an ISSUES_PRS_MERGE agent)
The change lives under .github/workflows/. This agent's token is minted at the contributor tier, which GitHub rejects server-side for any push touching workflow files, so no PR from this lane can contain it. Applying the block above is mechanical.
The current instance (fixed separately)
[email protected] is pinned exactly by [email protected]; 2.8.7+ fixes GHSA-gg6h-894w-4m9c and no markdownlint release carries it yet. A PR adding "re2js": ">=2.8.7" to overrides (the same pattern as #307/#407/#449) is linked below; it resolves the advisory but not this issue — the gate is what is missing.
- Add the dev-dependency audit step to
.github/workflows/npm-audit.yml(human / merge-tier agent) - Accept or decline this gate (
/hive approveor/hive decision)
Impact
Without the gate, the next dev-tree advisory also waits for a manual scan. Current instance impact is bounded: markdownlint runs on CI against PR-supplied markdown, so a crafted file can slow the markdownlint-cli2 job (quadratic, not exponential; the job has timeout-minutes).
Recommendation
Accept the gate above (option A), or decline and record in SECURITY.md/CONTRIBUTING.md that devDependency advisories are out of scope (option B) so future scans honour that policy instead of refiling.
Filed by sec-check agent (ACMM L6 — full mode)
🐝 Hive Agent: security | Instance: hosted-available-oke-11-placeholder-r05x | SHA: e57701f
— hive: agent=sec-check backend=copilot model=claude-fable-5.1 copilot=1.0.88
Activity
hivecommons-hive commentedon Oct 29, 2026
What to reply
/hive approve: go with the recommendation/hive decision <your instructions>: go ahead, following your instructions/hive help: show these againIf what this issue waited on has been done (a merged fix, or an action taken outside this repository), a maintainer can reply
/fixedto close it as completed; Hive clears its park labels.Only a maintainer with write access can un-park; everything else is ignored. Full command reference: https://github.com/hivecommons/hive/blob/v5/src/docs/maintainer-commands.md.
fix: floor transitive re2js at 2.8.7 via override (#516)
hivecommons-hive commentedon Oct 29, 2026
task-list sweep: 0 of 2 items ticked. Not closing yet — outstanding boxes remain.
Outstanding items:
.github/workflows/npm-audit.yml(human / merge-tier agent)/hive approveor/hive decision)Merged PRs referencing this issue so far:
This comment is edited in place by the task-list sweep on every cycle; it is not duplicated.
hivecommons-hive commentedon Oct 29, 2026
/hive decision approve as a ratchet: record the baseline now, fail only on increases, warning-only for one release then enforce
Rationale: CI hygiene gates land as ratchets so they never block existing work.
Hive decided: Accepted as a ratchet.
Why: A CI hygiene gate, landed as a ratchet.
What happens next: The issue leaves Needs decision and an agent picks it up — expected within 30 min.
If it doesn't happen: Re-run the decision, or remove the park label by hand.
Decided by the hive at @clubanderson's request as the owner's delegate under the owner-delegate policy (rule
ci-ratchet).hivecommons-hive commentedon Oct 29, 2026
Un-parked by @clubanderson. Decision: approve as a ratchet: record the baseline now, fail only on increases, warning-only for one release then enforce
stage/045-needs-decisionis cleared when present andapproved-directionis applied; anyholdlabel is left exactly as it was.Recorded from the hive dashboard.
hivecommons-hive commentedon Oct 29, 2026
🔒 Claimed by agent
scanner(agent on hive hosted-available-oke-11-placeholder-r05x). The claim lasts 2h0m0s without activity and renews while the work continues. Reply/unclaimto release, or/claimto take it over if you outrank the holder.hivecommons-hive commentedon Oct 30, 2026
🔓 Claim by agent
scannerreleased (holding agent relaunched).ci: enforce devDependency npm audit gate, drop continue-on-error (#531)