Skip to content

Commit 8ffcf33

Browse files
ci(governance): harden workflows — timeouts, scorecard perms, secret gate, codeql actions, drop privileged workflow_run (#25)
Clears the pre-existing Hypatia workflow_audit findings (non-blocking, but tidies governance CI): - timeout-minutes on all remaining jobs: release.yml (3), static-analysis-gate.yml (3), rhodibot.yml (1) - instant-sync.yml (HIGH secret_action_without_presence_gate): gate the repository-dispatch step on FARM_DISPATCH_TOKEN presence so it no-ops without the secret - scorecard.yml (HIGH scorecard_wrapper_missing_job_permissions): add job-level permissions to the reusable-wrapper job (security-events/id-token/contents/actions) - codeql.yml (codeql_missing_actions_language): add the `actions` language so workflow files are scanned - rhodibot.yml (CRITICAL): remove the privileged `workflow_run` trigger — it ran with contents/ pull-requests write on Hypatia completion; rhodibot still runs via schedule + workflow_dispatch Verified: all changed workflows parse as YAML; every non-reusable job now has timeout-minutes. Claude-Session: https://claude.ai/code/session_01UCnxjXkN6uDj9YSANuGEgR Co-authored-by: Claude <noreply@anthropic.com>
1 parent 6e21ab2 commit 8ffcf33

6 files changed

Lines changed: 21 additions & 3 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ jobs:
3333
include:
3434
- language: javascript-typescript
3535
build-mode: none
36+
- language: actions
37+
build-mode: none
3638

3739
steps:
3840
- name: Checkout

.github/workflows/instant-sync.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ jobs:
1616
runs-on: ubuntu-latest
1717
timeout-minutes: 10
1818
steps:
19+
- name: Check dispatch token presence
20+
id: gate
21+
run: echo "has_token=${{ secrets.FARM_DISPATCH_TOKEN != '' }}" >> "$GITHUB_OUTPUT"
1922
- name: Trigger Propagation
23+
if: steps.gate.outputs.has_token == 'true'
2024
uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 # v3
2125
with:
2226
token: ${{ secrets.FARM_DISPATCH_TOKEN }}

.github/workflows/release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
build:
1919
name: Build Artifacts
2020
runs-on: ubuntu-latest
21+
timeout-minutes: 30
2122
permissions:
2223
contents: read
2324
steps:
@@ -42,6 +43,7 @@ jobs:
4243
changelog:
4344
name: Generate Changelog
4445
runs-on: ubuntu-latest
46+
timeout-minutes: 30
4547
permissions:
4648
contents: read
4749
outputs:
@@ -88,6 +90,7 @@ jobs:
8890
name: Create GitHub Release
8991
needs: [build, changelog]
9092
runs-on: ubuntu-latest
93+
timeout-minutes: 30
9194
permissions:
9295
contents: write
9396
steps:

.github/workflows/rhodibot.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ on:
1616
schedule:
1717
- cron: '0 6 * * 1' # Every Monday at 06:00 UTC
1818
workflow_dispatch: # Manual trigger
19-
workflow_run:
20-
workflows: ["Hypatia Neurosymbolic Analysis"]
21-
types: [completed]
19+
# NOTE: the privileged `workflow_run` trigger (on Hypatia completion) was removed —
20+
# it ran with contents/pull-requests write and was flagged as a critical workflow
21+
# pattern. Rhodibot still runs weekly (schedule) and on demand (workflow_dispatch).
2222

2323
permissions:
2424
contents: write
@@ -27,6 +27,7 @@ permissions:
2727
jobs:
2828
rhodibot:
2929
runs-on: ubuntu-latest
30+
timeout-minutes: 15
3031
steps:
3132
- name: Checkout
3233
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4

.github/workflows/scorecard.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,10 @@ permissions: read-all
1212

1313
jobs:
1414
analysis:
15+
permissions:
16+
security-events: write
17+
id-token: write
18+
contents: read
19+
actions: read
1520
uses: hyperpolymath/standards/.github/workflows/scorecard-reusable.yml@5a93d9d57cc04de4002d6d0ecd336fc7a8698910
1621
secrets: inherit

.github/workflows/static-analysis-gate.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
panic-attack-assail:
2020
name: panic-attack assail
2121
runs-on: ubuntu-latest
22+
timeout-minutes: 20
2223

2324
steps:
2425
- name: Checkout repository
@@ -123,6 +124,7 @@ jobs:
123124
hypatia-scan:
124125
name: Hypatia neurosymbolic scan
125126
runs-on: ubuntu-latest
127+
timeout-minutes: 20
126128

127129
steps:
128130
- name: Checkout repository
@@ -235,6 +237,7 @@ jobs:
235237
deposit-findings:
236238
name: Deposit findings for gitbot-fleet
237239
runs-on: ubuntu-latest
240+
timeout-minutes: 20
238241
needs: [panic-attack-assail, hypatia-scan]
239242
if: always()
240243

0 commit comments

Comments
 (0)