Skip to content

ci(security): resolve zizmor findings + fix security workflow startup - #34

Merged
WomB0ComB0 merged 2 commits into
mainfrom
feat/ci-governance-adoption
May 9, 2026
Merged

WomB0ComB0 merged 2 commits into
mainfrom
feat/ci-governance-adoption

Conversation

@WomB0ComB0

Copy link
Copy Markdown
Member

Summary

Changes by file

.github/workflows/security.yml (alerts #42, #43, plus startup fix)

  • Pin resq-software/.github/.github/workflows/security-scan.yml from @main → SHA ee2001974be1e5610cff3a2c669cfab95c7415e7 # main (alert ci: add docstring coverage gate via interrogate #42 – unpinned action reference).
  • Replace secrets: inherit with explicit SEMGREP_APP_TOKEN pass (alert ci(api-docs): sync workflow from resq-software/docs #43 – secrets unconditionally inherited). SEMGREP_APP_TOKEN is the only secret the called workflow actually consumes given enable-semgrep: true.
  • Add actions: read to top-level permissions. CodeQL + zizmor jobs in the upstream reusable workflow call GET /repos/{owner}/{repo}/actions/runs/{run_id} for telemetry; without this scope the inherited token can't satisfy that, which is what's been killing the schedule + push runs since the upstream ee20019 change.

.github/workflows/publish.yml (alerts #33-#41)

.github/workflows/ci.yml (alerts #29-#32)

  • Add persist-credentials: false to all four checkouts (lint, typecheck, test, build).

Validation

$ uvx --from zizmor zizmor .github/workflows/
 INFO zizmor: 🌈 zizmor v1.24.1
 INFO audit: zizmor: 🌈 completed .github/workflows/ci.yml
 INFO audit: zizmor: 🌈 completed .github/workflows/publish.yml
 INFO audit: zizmor: 🌈 completed .github/workflows/required.yml
 INFO audit: zizmor: 🌈 completed .github/workflows/security.yml
No findings to report. Good job! (13 suppressed)

YAML syntax verified with pyyaml.

Out of scope (separate follow-up)

The Release workflow failure on c485af3 (main) is not addressed here. Root cause: the default-branch-baseline ruleset on main requires PR + the required status check, with bypass mode pull_request only. python-semantic-release tries to push the version-bump commit directly back to main and gets GH013: Repository rule violations. Fixing this requires either:

  1. Adding resq-sw (or a dedicated GitHub App) to bypass_actors with bypass_mode: always on ruleset 15191038, or
  2. Restructuring publish.yml to PR-based releases (semantic-release with commit: false, push: false, then a follow-up workflow on tag push).

Both are larger changes that would obscure this security-focused PR.

Test plan

@gemini-code-assist

Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@coderabbitai

coderabbitai Bot commented May 9, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@WomB0ComB0 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 7 minutes and 1 second before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 488b1881-9409-40c0-a558-e45ee4f21171

📥 Commits

Reviewing files that changed from the base of the PR and between 4c7a495 and f829406.

📒 Files selected for processing (3)
  • .github/workflows/ci.yml
  • .github/workflows/publish.yml
  • .github/workflows/security.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/ci-governance-adoption

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Resolves zizmor code-scanning alerts #29-#43:

security.yml
- Pin reusable security-scan.yml from @main to a SHA (alert #42)
- Replace `secrets: inherit` with explicit SEMGREP_APP_TOKEN pass
  (alert #43)
- Add `actions: read` to top-level permissions so CodeQL/zizmor
  telemetry (`GET /actions/runs/{id}`) can execute under the
  inherited token. This fixes the recurring startup_failure on
  main since 2026-05-04.

publish.yml
- Drop top-level write permissions to `contents: read`; lift
  `contents: write` only onto the two semantic-release jobs that
  actually need it (alerts #38-#41).
- Add `persist-credentials: false` to all five checkouts so
  uploaded artifacts can never carry the workflow's git
  credentials (alerts #33-#37). The release jobs still pass
  GITHUB_TOKEN explicitly to python-semantic-release.

ci.yml
- Add `persist-credentials: false` to lint/typecheck/test/build
  checkouts (alerts #29-#32).

Verified locally with `zizmor v1.24.1`: "No findings to report."
@WomB0ComB0
WomB0ComB0 force-pushed the feat/ci-governance-adoption branch from ae7fb9c to 7b75559 Compare May 9, 2026 13:58
@WomB0ComB0
WomB0ComB0 merged commit 0c7b1bc into main May 9, 2026
20 checks passed
@WomB0ComB0
WomB0ComB0 deleted the feat/ci-governance-adoption branch May 9, 2026 15:45
WomB0ComB0 added a commit that referenced this pull request May 10, 2026
Two workflows have been failing on every push to main since #34
landed.

security.yml — startup_failure
  The fix in #34 replaced `secrets: inherit` with an explicit
  `SEMGREP_APP_TOKEN: ${{ ... }}` mapping to address zizmor's
  `secrets-inherit` warning. The upstream reusable workflow at
  `resq-software/.github/.github/workflows/security-scan.yml` does
  not declare a `workflow_call.secrets:` contract, and GitHub
  Actions rejects callers that try to pass named secrets to a
  workflow with no declared secrets surface — the run terminates
  as `startup_failure` before any job starts.

  Revert to `secrets: inherit` and pin the rationale in a comment.
  Add `.github/zizmor.yml` to ignore the `secrets-inherit` finding
  on `security.yml` only, with a TODO pointing to the upstream
  workflow update needed to make explicit secret passing valid
  again.

publish.yml — `Release` failure
  `python-semantic-release` pushes the version-bump commit + tag
  back to main directly. The `default-branch-baseline` ruleset
  (id 15191038) requires every change to main to come through a
  PR; bypass mode is `pull_request`, so even bypass actors cannot
  push directly. The bot's push is rejected with
    remote: error: GH013: Repository rule violations found
    remote: - Changes must be made through a pull request.
    remote: - Required status check "required" is expected.

  Drop the `push: branches: [main]` trigger so the workflow no
  longer fires on every commit. `workflow_dispatch` remains, so
  releases can still be cut manually from the Actions tab or with
  `gh workflow run Release.yml`. Long-term, restore automation by
  either adding a bot to ruleset bypass with `bypass_mode: always`
  or restructuring to a PR-based release flow (semantic-release
  with `commit: false, push: false` + `peter-evans/create-pull-
  request`). The workflow file's header comment captures both
  paths.
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