Skip to content

fix(ci): make the code-scanning SARIF upload best-effort (regression from #47) - #49

Merged
felixgeelhaar merged 1 commit into
mainfrom
fix/sarif-upload-best-effort
Jul 25, 2026
Merged

fix(ci): make the code-scanning SARIF upload best-effort (regression from #47)#49
felixgeelhaar merged 1 commit into
mainfrom
fix/sarif-upload-best-effort

Conversation

@felixgeelhaar

Copy link
Copy Markdown
Contributor

This fixes a regression I introduced in #47. Merging it promptly matters — it can fail the Security job on every private repo in the fleet.

What happened

#47 corrected the SARIF lookup from findings.sarif (a filename nox never writes) to results.sarif. That was right, but it made the upload step reachable for the first time — and it immediately failed on lexora:

##[error]Resource not accessible by integration

Code-scanning ingest requires GitHub Advanced Security on private repositories. Most of the fleet is private (lexora, nexa, armada, episteme-api, vorhut, brotwerk, …). While the step was looking for a filename that never existed, hashFiles() never matched, so the missing permission could never surface. Fixing the lookup exposed a latent problem.

This is the same trap as the original bug, one layer down: a step that silently skipped was concealing something, and the concealment was mistaken for health.

The fix

continue-on-error: true, because this upload is reporting, not enforcement.

The gate step is what decides pass/fail, and it is unaffected. On the very same lexora run it worked correctly:

net-new critical/high: 0 (baselined findings: 57)

That is the gate executing properly for the first time in that repo — matching my local scan exactly. A repo without Advanced Security should still get its security gate; it just does not also get findings mirrored into the code-scanning UI.

The file already applies this reasoning to the taint-plugin install, for the same reason:

continue-on-error: this is an ENHANCEMENT, not a requirement … a plugin-registry hiccup silently disables security scanning for every repo on this workflow.

Scope

Both go-ci.yml and js-ci.yml. Public repos (warden, mnemos, bolt, keyward) are unaffected either way — their uploads succeed, and warden's main is green post-#47.

Correcting the SARIF filename in #47 made this step reachable for the
first time -- and it immediately failed the Security job on lexora with
"Resource not accessible by integration". Code scanning ingest requires
GitHub Advanced Security on private repositories, and most of the fleet
is private.

That is a regression introduced by #47: while the step was looking for a
filename nox never writes, hashFiles() never matched, so the missing
permission could not surface. Fixing the lookup exposed it.

continue-on-error, because this upload is reporting, not enforcement. The
gate step below is what decides pass/fail, and it is unaffected -- on the
same lexora run it evaluated correctly and reported "net-new critical/
high: 0 (baselined findings: 57)". A repo without Advanced Security
should still get its security gate; it just does not also get the
findings mirrored into the code-scanning UI.

Same rationale already applied to the taint-plugin install in this file.

Claude-Session: https://claude.ai/code/session_01LMVPJFeTCEtUk2CSNBBBdK
@felixgeelhaar

Copy link
Copy Markdown
Contributor Author

Amending the diagnosis in the description above — the fix is right, but I attributed it to a single cause and there are two.

I wrote that the upload fails because code-scanning ingest needs Advanced Security on private repos. That is true for lexora (private). But briefkasten is public, and it failed the same step for an entirely different reason:

##[error]Code Scanning could not process the submitted SARIF file:
locationFromSarifResult: expected artifact location

nox/reachability emits REACH-001 — a module-level verdict, "the vulnerable symbol in x/crypto is never called" — which has no file to point at, so nox serializes artifactLocation.uri: "". GitHub rejects the whole file over it. Reproduced locally: 1 result, 1 malformed. Filed as Nox-HQ/nox#366.

So continue-on-error is covering two independent classes: a missing platform capability, and malformed SARIF. Both are reporting-layer problems that should not fail an enforcement job, so the fix stands — but "private repos" alone would have been a misleading thing to leave in the record.

Blast radius of the #47 window, checked across all 28 fleet repos: exactly two runs affected (lexora, briefkasten). Reachability is enabled on no repo's default branch — only briefkasten's PR branch — so #366 is contained.

felixgeelhaar added a commit that referenced this pull request Jul 25, 2026
…dable (#50)

#49 added `continue-on-error: true` to js-ci's SARIF upload step, which
already had one. GitHub rejects the whole file:

  klarlabs-studio/.github/.github/workflows/js-ci.yml@main
  : (Line: 176, Col: 9): 'continue-on-error' is already defined

Every repo calling js-ci.yml has been failing at workflow load since #49
merged -- no jobs start, no logs are produced, and the run reports a bare
"failure" with nothing to inspect. Surfaced on pet-medical-www#24.

js-ci already carried this fix, with a comment saying the same thing; only
go-ci was missing it. #49 should have touched go-ci alone.

The guard that let this through was mine and too narrow: it searched only
the first 400 characters after the step name for an existing
continue-on-error, and js-ci's is behind a longer comment block. Worse,
the YAML validation could not catch it either -- PyYAML accepts duplicate
mapping keys silently, last one wins. Validation now uses a loader that
rejects duplicates, which is what GitHub does.

Claude-Session: https://claude.ai/code/session_01LMVPJFeTCEtUk2CSNBBBdK
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.

1 participant