Skip to content

ci: exclude generated JS bundle from SonarCloud; fix release job lookup - #204

Open
0Downtime wants to merge 3 commits into
mainfrom
claude/project-thread-nhapal
Open

0Downtime wants to merge 3 commits into
mainfrom
claude/project-thread-nhapal

Conversation

@0Downtime

Copy link
Copy Markdown
Owner

Requested by Chris · project thread

Summary

  • Since fix(security): harden production safety boundaries #177 merged (Jul 22), the SonarCloud gate on main has failed on C Security Rating on New Code. The last pass was on 99390a2 (Jul 18) and the first failure on db99a0e (Jul 25).
  • fix(security): harden production safety boundaries #177 rebuilt src/SyncFactors.Api/wwwroot/dist/dashboard.js. That file is 700 KB of minified esbuild output, including vendored SignalR, on a single line. Any rebuild makes the whole line count as new code, so findings in third-party code end up gating main. The sources under frontend/ are still analyzed, so excluding the generated wwwroot/dist/** keeps coverage of our own code.
  • Separate fix: release.yml's "Verify required CI checks" filtered jobs with $job.id / $job.name instead of $_. It could never match a job, so releases would always wait out the 30-minute deadline and then fail.

Validation

  • Both workflow files parse as YAML
  • SonarCloud analysis of main after merge (PR analysis only gates the PR's own diff)

The SonarCloud API is blocked from the environment that made this change, so I couldn't read the exact issue. The bundle is the strongest candidate from the diff, but it is inferred. If main still fails after merge, the issue list on SonarCloud names the file.

Risk Notes

  • config impact: SonarCloud no longer analyzes src/SyncFactors.Api/wwwroot/dist/**
  • operational impact: none at runtime; releases can now pass the required-checks step
  • rollback considerations: revert the commit

🤖 Generated with Claude Code

https://claude.ai/code/session_01FKFiDhryKSzpEeY7FnFSbT


Generated by Claude Code

The minified esbuild output in src/SyncFactors.Api/wwwroot/dist is
committed build output (vendored SignalR and friends). Every rebuild makes
the whole one-line bundle count as new code, so third-party findings in it
fail the SonarCloud gate on new-code security rating. The sources under
frontend/ are still analyzed.

Also fix the release workflow's required-check verification, which
filtered jobs with $job instead of $_ and could never match.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FKFiDhryKSzpEeY7FnFSbT
@0Downtime 0Downtime self-assigned this Oct 7, 2026
The policy check pinned the old $job.id/$job.name filter, which never
matched any job. Require the $_ form instead.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FKFiDhryKSzpEeY7FnFSbT

Copy link
Copy Markdown
Owner Author

The dotnet check was cancelled after the "Run .NET test suite" step hung for 6 hours on the macOS runner (job 112946019475). This PR only changes security.yml, release.yml and scripts/Assert-CiWorkflowSecurity.ps1, and no .NET test reads those files, so the hang does not come from this diff. dotnet passed on every recent PR run before this one. I have no fix to port, so I re-ran the job once. If it hangs again, the hang is real and I will track down which test is stuck.


Generated by Claude Code

@0Downtime
0Downtime marked this pull request as ready for review October 12, 2026 17:00
@sonarqubecloud

Copy link
Copy Markdown

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