feat: add Security Suite workflow (one-stop, ruleset-enforceable) - #71
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughAdds a new ChangesSecurity suite workflow
Estimated code review effort🎯 4 (Complex) | ⏱️ ~40 minutes Possibly related issues
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Bumblebee Supply-Chain Scan (
|
Secret Leak CheckOK No secrets detected in this PR's diff. |
1 similar comment
Secret Leak CheckOK No secrets detected in this PR's diff. |
b37317f to
3149bce
Compare
Bumblebee Supply-Chain Scan (
|
Secret Leak CheckOK No secrets detected in this PR's diff. |
1 similar comment
Secret Leak CheckOK No secrets detected in this PR's diff. |
Secret Leak CheckOK No secrets detected in this PR's diff. |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/security-suite.yml:
- Line 52: The pinned reusable workflow refs in the security-suite workflow are
using SHA pins with a free-text note, which causes pinact to fail because it
cannot verify a version comment. Update the reusable workflow references in the
security-suite workflow, including the geolonia reusable bumblebee scan and the
action-pinning ref, to use a released tag with a proper version comment once
available; if the tag is not yet released, add the appropriate pinact ignore
entry or otherwise align the refs with pinact’s expected version-comment format.
- Around line 206-213: The new-comment branch in the report step lacks
repository context, so `gh pr comment` can fail when there is no checkout.
Update the `else` path in the consolidated comment logic to pass explicit repo
context using either `--repo` with `gh pr comment` or switch it to the same `gh
api` style used in the PATCH branch; reference the `report` job, `EXISTING`,
`REPO`, and `PR_NUMBER` handling to keep the update and create paths consistent.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 01d2696c-be3c-4767-8c2b-e9d8bb937397
📒 Files selected for processing (1)
.github/workflows/security-suite.yml
Secret Leak CheckOK No secrets detected in this PR's diff. |
1 similar comment
Secret Leak CheckOK No secrets detected in this PR's diff. |
Single entry point that fans out to the org security scanners (bumblebee, betterleaks, pinact) plus an inline zizmor GitHub Actions static-analysis job. Designed to run as an organization required workflow so every repo gets the same gate with no per-repo workflow file. zizmor runs warn-only during rollout. Part of geolonia-operations#196.
Run the scanners in report-mode: summary (quiet) and add a report job that posts a single consolidated comment with a status table for all four checks, instead of one comment per scanner. Temporarily references the report-mode reusables at the #72 branch SHA; bump to the release tag once #72 ships. Part of geolonia-operations#196.
A called reusable can only downgrade the caller's GITHUB_TOKEN, not elevate it. Reducing the summary-mode caller jobs to contents:read made the reusables' declared pull-requests/issues:write exceed the grant, causing a workflow startup_failure. Grant the declared permissions.
The report job has no checkout, so gh pr comment cannot infer the repo from git context. Pass --repo explicitly (the gh api calls already do).
#72 released as v1.18.0 (report-mode + outputs). Bump the suite's reusable refs from the pre-release branch SHA to the v1.18.0 tag, so the action-pinning check passes.
22fac67 to
ba10520
Compare
Secret Leak CheckOK No secrets detected in this PR's diff. |
🛡️ Security suite
Warning Warnings only. These do not block the PR, but please review them. Updated for |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/security-suite.yml:
- Around line 40-46: Serialize the PR workflow run before the marker comment is
created so only one run can check/post the consolidated comment at a time.
Update the security-suite workflow job that handles the marker comment to use a
per-PR concurrency key (for example based on the pull_request number) around the
relevant comment-posting/update steps, and apply the same change to the other
comment-related sections referenced by the workflow so overlapping runs cannot
create duplicate “single” comments.
- Around line 114-119: The comment-posting step in the security-suite workflow
should be skipped for forked pull requests because the default token is
read-only and `gh api`/`gh pr comment` will fail. Update the job around the
“Build and post consolidated comment” step to gate comment writes on a non-fork
PR check using the PR event context, or move the commenting logic into a trusted
`pull_request_target` or follow-up workflow while keeping the rest of the job
intact.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 609896f1-93e2-4c60-ba9e-f0200e10311a
📒 Files selected for processing (1)
.github/workflows/security-suite.yml
The marker lookup used 'gh api --paginate --slurp --jq', but --slurp cannot be combined with --jq, so the call always errored, got swallowed by '|| true', and the report job posted a new comment every run instead of updating in place. Use plain --paginate + .[].
Secret Leak CheckOK No secrets detected in this PR's diff. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/security-suite.yml:
- Around line 210-213: The comment lookup in the workflow currently hides real
gh api/jq failures by forcing EXISTING to empty with the fallback, which can
lead to duplicate consolidated comments. Update the EXISTING assignment in the
comment lookup step to preserve the “no matching comment” empty result while
allowing genuine API/auth/query errors to fail the job, using the gh api call
and jq filter around the existing MARKER-based lookup logic.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 64a0bedb-e006-494e-840a-be01dab1c6d8
📒 Files selected for processing (1)
.github/workflows/security-suite.yml
- concurrency group per PR so overlapping runs cannot double-post - comment lookup is strict (real API errors fail the job; empty = no match) instead of masking failures with || true - posting degrades gracefully (warn, not fail) when the token is read-only on fork PRs, so the suite does not fail just to comment
Secret Leak CheckOK No secrets detected in this PR's diff. |
What
Adds
security-suite.yml: a single entry point for Geolonia's per-PR security checks, designed to be enforced org-wide as a required workflow (Repository Rulesets) so every repo gets the same gate with no per-repo workflow file to maintain.It fans out to the existing org reusable scanners plus a new zizmor job:
supply-chainsecret-leakaction-pinningactions-auditpull_request_target/workflow_runwith untrusted checkout, template injection, excessive permissions, credential persistenceWhy
We have several good reusable security workflows, but asking every repo to wire up each one leads to partial adoption (see geolonia-operations#195). Consolidating into one suite + enforcing via an org ruleset makes security the default with zero developer setup, and lets us add a scanner once centrally and have every repo pick it up.
Required follow-up (org settings, manual)
This PR only adds the workflow. To enforce it, create an organization ruleset:
maingeolonia/.github/.github/workflows/security-suite.yml@ a pinned ref (tag)geolonia/.githubis public, so the workflow can run on public, internal, and private repos. Org rulesets incl. require-workflows are GA on the Team plan (2025-06).Design notes
@eb33e7f # v1.17.1), because a required workflow may not use local./reusable paths.contents: read; only the jobs that comment / open issues get write, scoped per job. (zizmor confirms: no findings on this file.)advanced-security: false+annotations: trueso it does not depend on GHAS / SARIF upload, which is unavailable on private repos without a license.continue-on-error: true(warn-only). Flip to enforce by removing that line once the org is clean.workflow_callsecrets, so nosecrets: inherit.After the ruleset is live (separate PR)
Remove the now-redundant per-repo caller workflows (bumblebee / betterleaks / pinact) so scanners do not double-run.
Part of geolonia-operations#196. Umbrella: geolonia-operations#195.
Validation
actionlintcleanzizmorself-audit: no findingsSummary by CodeRabbit