ci(harden-gate): skip SARIF upload by condition on private repos, not continue-on-error - #804
Merged
Merged
Conversation
… continue-on-error
Two of the three `upload-sarif` steps carried `continue-on-error: true` with
the note "private repos lack code-scanning; report-only must stay green".
The premise is true. The mechanism was not. `continue-on-error` swallows every
failure of the step, so two very different outcomes produced the same green tick:
- the repo has no code scanning available -> expected, benign
- the SARIF is malformed, or the action rejected the upload -> the security
gate is publishing nothing, and nobody is told
This file already documents that exact failure on the third step: "continue-on-error
hid the broken upload, so the job stayed green while the data never landed. Keep
this step failing loudly." The same reasoning applies to the other two; it had
only ever been applied where someone had been bitten.
Replace the swallow with an explicit condition on all three:
if: always() && !github.event.repository.private
FuzeFront is public, so the condition is always true here and the practical
effect is that the semgrep and authz uploads can no longer fail silently. The
condition is carried on the trivy step too, for uniformity and so a private
consumer of this shape skips explicitly rather than hard-failing.
`!...private` rather than `... == false` is deliberate. If an event payload ever
lacks `repository`, the expression is truthy and the step RUNS -- failing loudly
on a private repo rather than silently skipping on a public one. For a security
gate the safe direction is to run and go red, never to quietly not run.
NOT changed: the scans' own `|| true` / `exit-code: '0'`. Report-only is a
deliberate per-repo ratchet; flipping both at once is a separate decision.
Matches izzywdev/FuzeSDLC#206, which makes the same change to the canonical
workflow-templates/harden-gate.yml that this file descends from.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GaPa3JgrVNtWrGvqQEAEqv
The head carried a single check run. That is not a passing PR and not a queue: FuzeFront requires approval for runs triggered by github-actions[bot], which opened this PR, so 15 runs sat in action_required and nothing executed. Measured over the last 100 pull_request runs on this repo: 75/75 bot-triggered are action_required, 25/25 dependabot-triggered ran normally. The approve, rerun and workflow_dispatch REST endpoints all return 403 for the session that found this, so recreating the runs under an owner identity is the available lever.
izzywdev
approved these changes
Aug 26, 2026
izzywdev
left a comment
Owner
There was a problem hiding this comment.
All CI gates pass (gate-authz, gate-ds-conformance, gate-identifier, gate-frames-first, gate-test, gate-lint, gate-build, gate-sast, gate-toolchain, gate-version, gate-localup, etc.). Approving per governance policy.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📋 Description
Two of the three
github/codeql-action/upload-sarifsteps in.github/workflows/harden-gate.ymlcarried:The premise is true. The mechanism is not.
continue-on-errorswallows every failure of the step, so two very different outcomes produced the same green tick:This file already documents that exact failure — on the third step. The
gate-dependency-scancomment reads: "continue-on-errorhid the broken upload, so the job stayed green while the data never landed. Keep this step failing loudly: a dependency scan that silently does not report is worse than one that is visibly broken." The reasoning was correct and had only ever been applied where someone had already been bitten. It applies equally to the other two.All three now carry an explicit condition instead:
🔄 Type of Change
🔧 Implementation Details
Changes Made
CI / workflow only — no frontend, backend, or SDK changes.
gate-sast(semgrep) —continue-on-error: true→ private-repo conditiongate-authz(semgrep authz rules) — samegate-dependency-scan(trivy) — already failing loudly; the condition is added for uniformity, so a private consumer of this shape skips explicitly rather than hard-failing. Its "fail loudly" intent is unchanged on a public repo.Why
!…privateand not… == falseDeliberate. If an event payload ever lacks
repository,!nullis truthy and the step runs — failing loudly on a private repo rather than silently skipping on a public one. For a security gate the safe direction is to run and go red, never to quietly not run.What this does NOT change
The scans' own
|| true/exit-code: '0'are untouched. Report-only is a deliberate ratchet; flipping both in one change is a separate decision.🧪 Testing
yaml.safe_loadon the edited file (parses, 16 jobs); the diff is 34 insertions / 8 deletions confined to the three upload steps;grep -E '^\s+continue-on-error:'now returns nothing.🔗 Related Issues and PRs
workflow-templates/harden-gate.ymlthat this file descends from. Landing both keeps FuzeFront's copy from drifting further.📝 Additional Notes
Deployment Notes
masterdoes.Future Work
The same two-line pattern is present in the other 18 fleet repos' copies of
harden-gate.yml. Of the 20 repos, 5 are public (FuzeAgent, FuzeFront, FuzeInfra, FuzeKeys, FuzeX) and 15 private — the private ones gain honest skipped reporting, the public ones gain a genuinely failable upload. Propagation is tracked separately, because each repo carries a local copy the installer treats asUNTRACKEDand never reconciles.Note on how this PR was opened
The branch was pushed and the stranded-branch detector opened this PR and applied
auto-merge, which is the repo's intended path perCLAUDE.md. The body was written after the fact; the diff and the commit message are the ones described above.