Skip to content

chore(deps): remediate the three critical npm advisories blocking every pull request - #1228

Closed
antoinetoussaint-byte wants to merge 1 commit into
mainfrom
chore/dep-audit-remediation
Closed

antoinetoussaint-byte wants to merge 1 commit into
mainfrom
chore/dep-audit-remediation

Conversation

@antoinetoussaint-byte

Copy link
Copy Markdown
Contributor

This is the Dependency audit auto-remediation workflow's own output, opened by hand
because the workflow cannot open it itself.

What it changes

Two lockfiles, nothing else — no package.json, no declared range, no major bump.
Every new version already satisfied the range that was declared:

package locked before locked now declared range
next (frontend + marketing) 16.3.8 16.4.2 ^16.2.12, unchanged
dompurify (transitive, via swagger-ui-react) 3.4.16 3.4.17 ^3.4.13, unchanged
@sentry/nextjs 10.75.x 10.76.2 ^10.50.0, unchanged

Why it is urgent

Enforce first-party vulnerability gate fails on every open pull request in this
repository, so nothing can merge. It fails on three critical advisories:

Why the automation could not open it

.github/workflows/dep-audit.yml runs daily, and it has failed every day since at
least 18 October
— six consecutive runs. It is not failing at the audit: it
remediates correctly, passes module/tools/module-verify.mjs, and force-pushes this
branch. It dies on the next line:

pull request create failed: GraphQL: GitHub Actions is not permitted to create or approve pull requests (createPullRequest)

.github/workflows/combine-deps.yml already documents this exact constraint and solves
it with a DEPS_COMBINE_TOKEN org secret — but that secret is not set, so
combine-deps.yml has failed every week since at least 21 September for the same
reason. dep-audit.yml never adopted the token at all; it still passes
secrets.GITHUB_TOKEN.

Two consequences worth separating:

  1. Merging this pull request also un-reds the daily job: its create step is guarded by
    gh pr list --head, so while this stays open the run skips create and reaches its
    residual-audit gate. That is a side effect, not a fix.
  2. The real fix needs an org secret a maintainer must mint (a PAT or App token with
    repo scope), after which dep-audit.yml should use it the way combine-deps.yml
    does — and its gh workflow run ci.yml workaround can go, because a pull request
    opened by a token triggers CI normally. Not done here; this pull request carries
    only the bot's lockfile commit, because the branch is force-pushed daily and any
    commit added on top would be clobbered by tomorrow's run.

Verified

  • npm audit --package-lock-only --omit=dev --audit-level=high on both
    module/services/frontend/code and module/services/marketing/code at this head:
    found 0 vulnerabilities (both were critical before).
  • The branch sits exactly on main (55563cda2), zero commits behind, and its whole
    diff against main is the two lockfiles: 237 insertions, 255 deletions.
  • module/tools/module-verify.mjs passed in the workflow run that produced the commit
    (✓ frontend workspace install graph is in sync; no unsupported public claim.).

Not verified: the build and the test suite have never run on this branch — the step
that would have triggered CI is the one that died, so this head has no CI history at
all. A 16.3.8 → 16.4.2 minor bump is where to look if anything reds.

🤖 Generated with Claude Code

@antoinetoussaint-byte
antoinetoussaint-byte added this pull request to the merge queue Oct 23, 2026
antoinetoussaint-byte added a commit that referenced this pull request Oct 23, 2026
…ll request

The job remediated correctly and force-pushed its branch, then died on
`gh pr create` with "GitHub Actions is not permitted to create or approve pull
requests". Because that call aborted the step, the `gh workflow run` line after
it never ran, so the pushed head got no CI either, and no pull request existed
to make the remediation visible. Six consecutive daily runs failed that way
while three critical advisories sat remediated on the branch; the pull request
had to be opened by hand (#1228).

Adopt the DEPS_COMBINE_TOKEN that combine-deps.yml already documents for this
exact constraint, falling back to GITHUB_TOKEN so the remediation half keeps
working without it. A create that cannot succeed now records its status instead
of aborting, prints what a maintainer must do, and lets the CI dispatch run
before the step exits non-zero.

The failure is deliberate, and the obvious alternative is wrong: by then the
working tree holds the remediated lockfiles, so a passing step would let the
residual audit gate report a clean audit and take the whole run green with an
advisory on a branch nobody is looking at.

The release-gate contract test pins the dispatch to run after a new or updated
pull request and the dispatch's status to propagate; both still hold. It gains
the token dimension it never had — the one this failure lived in — asserting
that a refused create still pushes, still dispatches, still fails, and names
DEPS_COMBINE_TOKEN as the remedy.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@lukazhupa lukazhupa 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.

Approving. This clears the critical npm audit findings that fail the required supply-chain and release-gate checks on main. Verified locally at 4076d52: both production audits report 0 at high, and the frontend typecheck and build pass.

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 23, 2026
@lukazhupa
lukazhupa enabled auto-merge October 23, 2026 16:01
@antoinetoussaint-byte

Copy link
Copy Markdown
Contributor Author

Closing: superseded, and by a better fix than this one.

#1027 landed while this sat in the merge queue and carried the lockfile updates itself —
next 16.3.8 → 16.4.1, dompurify → 3.4.17, @sentry/nextjs → 10.75.2. Every
one of those clears its advisory range (next was vulnerable through 16.4.0,
@sentry/nextjs through 10.75.1), so main at 44b9bc470 now audits clean:

module/services/frontend/code:   found 0 vulnerabilities
module/services/marketing/code:  found 0 vulnerabilities

That also made this pull request DIRTY — #1027 touched both lockfiles, so the bot's
commit no longer applies. I could rebuild it on the new head, but it would only move
next to 16.4.2 and @sentry/nextjs to 10.76.2 with no advisory behind either. That is
a gratuitous dependency bump, so it should not land.

What was real: Enforce first-party vulnerability gate was failing on every open pull
request in this repository, and the remediation had been sitting correctly built and
invisible on chore/dep-audit-remediation for six days because the daily job cannot open
its own pull request. That half is not fixed by #1027 — the automation is still
broken, and #1230 fixes it.

The branch is left in place; the daily job force-pushes it and will now exit early at
git diff --quiet while main stays clean.

auto-merge was automatically disabled October 23, 2026 16:05

Pull request was closed

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