The critical that no gate blocked: 39 vulnerabilities and a green deploy
LifeLog·

The critical that no gate blocked: 39 vulnerabilities and a green deploy

The comment that had been lying for months

The dependency audit step in the pipeline carried this header:

- name: SCA - dependency audit (pnpm audit)
  # Fase 5.1: bloqueia build se biblioteca tiver CVE conhecida
  continue-on-error: true
  run: pnpm audit || echo "audit found vulnerabilities (does not block deploy)"

Reading those lines together should hurt. The comment states the build stops when a known CVE shows up; the next line guarantees it never stops, and the || echo closes the matter with a friendly warning in the log. Three independent mechanisms of nothing. The gate existed, went green on every run, and could not fail anything.

The tools I use on this project live in the skills store — the first one is free.

I ran the audit myself and the number that came back did not belong to a healthy project: 39 vulnerabilities, 1 critical and 14 high, with rc=1. The deploy had gone to production with that picture in the same week.

The critical had a name, a score and a date

The critical one was the site’s own framework. Advisory GHSA-26w7-cxv4-gfx2 describes remote code execution during AVIF image optimization: CVSS 9.8, vector AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H: network reachable, no authentication, no user interaction, full impact on confidentiality, integrity and availability. It affected every version below 7.2.8, patched in 7.2.8.

The project had "astro": "^7.1.6" declared since July. The advisory landed on September 8; the upgrade only happened on November 22. Seventy-five days in which the installed lockfile could be reached through an image processed at build time. Not theoretical: image optimization is precisely the step that receives files from outside: an .avif uploaded, downloaded or generated by a third party goes through that optimizer.

And the ugliest detail: pnpm audit knew. It printed the critical in the log on every run of that period. Nobody looked, because the step was green by construction.

The upgrade, measured before and after

The fix was a version bump, not code: astro 7.1.6 → 7.4.13. The comparison that matters is numeric:

  • before: 39 vulnerabilities (1 critical, 14 high, rc=1)
  • after: 15 vulnerabilities (0 critical, 6 high)
  • build: 1311 pages, exit 0

The same day vitest 4.1.10 → 4.1.12 closed three more: 15 down to 12. The six remaining highs have known addresses and none is runtime: they sit in eslint, minimatch, nanoid and js-yaml, all build and test devDependencies. That changes the decision: a vulnerability in a tool that only runs on the build machine does not justify halting a deploy, but it cannot stay without a deadline either.

The gate learned to reject exactly one thing

With the critical gone, hardening was possible without breaking the pipeline. But harden what? The static lint (eslint-plugin-security) ran with continue-on-error: true and || echo: same decorative shape. I measured before touching it: 30 problems (0 errors, 30 warnings), rc=0. Thirty “Generic Object Injection Sink” warnings nobody was going to fix that day, and zero real errors.

That allowed the change that makes a gate worth something:

- name: SAST - static lint with eslint-plugin-security
  # Measured 2026-11-22: rc=0, 0 errors / 30 warnings. Safe to block:
  # a warning does not fail, a real error does.
  run: pnpm lint

No continue-on-error, no || echo. A warning still passes: a warning is debt, not a blocker. An error fails the run. The audit stayed non-blocking, but now with the reason written next to it instead of an empty promise: the six highs are devDependencies, and the step flips to blocking once that list reaches zero.

The advisory ID I got wrong

The upgrade commit cited GHSA-mh32-jxcr-mh9f in its message as the AVIF RCE. I checked the GitHub API: that ID is a different issue: XSS through attribute injection in dynamic tag names, severity low, patched in 7.4.5. The RCE is GHSA-26w7-cxv4-gfx2, critical.

Small error, same old cause: I quoted from memory an identifier I had just read. Advisory numbers, commit hashes and patch versions obey the same rule: if it was not copied from the source at the time, it does not go into the text. The practical consequence: any future audit following the commit’s ID will find a low XSS where a 9.8 RCE lived, and will conclude the problem was smaller than it was.

Why this matters more than the CVE

The vulnerability was closed with one line of package.json. What survived it is the structural problem: a gate that cannot fail is not a gate. A continue-on-error: true outlives refactors, PR reviews and staff changes, because the log stays green throughout. The same pattern sat in three places, each with its own disguise: continue-on-error on audit and lint, || true on bandit and opengrep.

What protects you is the gate having a real path to exit 1 and somebody knowing what that path is. If the vulnerability count drops from 39 to 12 in a day and the only visible effect is a new YAML comment, the next critical walks through exactly the same door.

Next step: the six remaining highs become a closed list with an exit date. While they exist, the audit stays in report mode with the number printed on every run; once they reach zero, the continue-on-error goes away and the audit blocks alongside lint.

Related entries

Same project, same ground — the stories connect.

Next step

If this was useful, there is more: I write about the same ground in the other projects, and the store holds the tools I use here.

No spam, one-click unsubscribe. I am also here: Skills store · Portfolio