Skip to content

Commit c28fba4

Browse files
committed
fix(ci+docs): address all Hypatia scan findings from PR #34
Workflow fixes (high/medium severity): - Add timeout-minutes to all jobs (hypatia-scan, mirror, rust-ci, scorecard, secret-scanner, release, scorecard-enforcer) - scorecard-enforcer: split scorecard publish job from run steps into separate scorecard-publish + scorecard-enforce jobs (scorecard_publish_with_run_step) - scorecard.yml: add explicit job-level permissions for the analysis caller job (scorecard_wrapper_missing_job_permissions) - instant-sync.yml: add FARM_DISPATCH_TOKEN presence gate before repository-dispatch action (secret_action_without_presence_gate) - rsr-antipattern.yml: anchor TypeScript Exemptions heading regex to line-start with heading marker (unanchored_heading_regex) SD022 structural drift fixes (src/abi/ → src/interface/Abi/): - docs/RSR_OUTLINE.adoc - docs/developer/ABI-FFI-README.adoc - docs/governance/MAINTENANCE-CHECKLIST.adoc - docs/practice/AI-CONVENTIONS.adoc - src/interface/ffi/src/main.zig SD009 template placeholder fix: - src/interface/ffi/src/main.zig: replace {{PROJECT}}/{{project}} with nextgen_typing https://claude.ai/code/session_01S7PoiLxheftavnuFPE7Uq4
1 parent b185a63 commit c28fba4

14 files changed

Lines changed: 90 additions & 36 deletions

.github/workflows/hypatia-scan.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,6 @@ permissions:
2525

2626
jobs:
2727
hypatia:
28+
timeout-minutes: 30
2829
uses: hyperpolymath/standards/.github/workflows/hypatia-scan-reusable.yml@915139d73560e65a8240b8fc7768698658502c89
2930
secrets: inherit

.github/workflows/instant-sync.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,22 @@ permissions:
1414
jobs:
1515
dispatch:
1616
runs-on: ubuntu-latest
17+
timeout-minutes: 10
1718
steps:
19+
- name: Check FARM_DISPATCH_TOKEN presence
20+
id: gate
21+
env:
22+
TOKEN: ${{ secrets.FARM_DISPATCH_TOKEN }}
23+
run: |
24+
if [ -n "$TOKEN" ]; then
25+
echo "present=true" >> "$GITHUB_OUTPUT"
26+
else
27+
echo "present=false" >> "$GITHUB_OUTPUT"
28+
echo "::notice::FARM_DISPATCH_TOKEN not set — skipping propagation"
29+
fi
30+
1831
- name: Trigger Propagation
32+
if: steps.gate.outputs.present == 'true'
1933
uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 # v3
2034
with:
2135
token: ${{ secrets.FARM_DISPATCH_TOKEN }}
@@ -30,6 +44,7 @@ jobs:
3044
}
3145
3246
- name: Confirm
47+
if: steps.gate.outputs.present == 'true'
3348
env:
3449
REPO_NAME: ${{ github.event.repository.name }}
3550
run: echo "::notice::Propagation triggered for ${REPO_NAME}"

.github/workflows/mirror.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ permissions:
1111

1212
jobs:
1313
mirror:
14+
timeout-minutes: 15
1415
uses: hyperpolymath/standards/.github/workflows/mirror-reusable.yml@e6b2884722350515934d443daf23442f2195796f
1516
secrets: inherit

.github/workflows/release.yml

Lines changed: 4 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:
@@ -78,6 +79,7 @@ jobs:
7879
changelog:
7980
name: Generate Changelog
8081
runs-on: ubuntu-latest
82+
timeout-minutes: 10
8183
permissions:
8284
contents: read
8385
outputs:
@@ -124,6 +126,7 @@ jobs:
124126
name: Create GitHub Release
125127
needs: [build, changelog]
126128
runs-on: ubuntu-latest
129+
timeout-minutes: 15
127130
permissions:
128131
contents: write
129132
steps:
@@ -151,6 +154,7 @@ jobs:
151154
provenance:
152155
name: SLSA Provenance
153156
needs: [build]
157+
timeout-minutes: 20
154158
permissions:
155159
actions: read
156160
id-token: write

.github/workflows/rsr-antipattern.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ jobs:
8787
if claude_md.exists():
8888
in_table = False
8989
for line in claude_md.read_text(encoding='utf-8').splitlines():
90-
if re.search(r'TypeScript [Ee]xemptions', line):
90+
if re.search(r'^[#=]+\s+.*TypeScript [Ee]xemptions', line):
9191
in_table = True
9292
continue
9393
if in_table and line.startswith(('### ', '## ', '# ')):

.github/workflows/rust-ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ permissions:
1414

1515
jobs:
1616
rust-ci:
17+
timeout-minutes: 30
1718
uses: hyperpolymath/standards/.github/workflows/rust-ci-reusable.yml@cc5a372af1af1b202c17f1b21efd954e6c038bef

.github/workflows/scorecard-enforcer.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,15 @@ permissions:
2121
contents: read
2222

2323
jobs:
24-
scorecard:
24+
# Scorecard publish job — must be isolated from run steps per OpenSSF guidance.
25+
scorecard-publish:
2526
runs-on: ubuntu-latest
27+
timeout-minutes: 30
2628
permissions:
2729
security-events: write
2830
id-token: write # For OIDC
31+
contents: read
32+
actions: read
2933
steps:
3034
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3135
with:
@@ -43,6 +47,25 @@ jobs:
4347
with:
4448
sarif_file: results.sarif
4549

50+
# Score enforcement job — separate from publish to satisfy scorecard_publish_with_run_step rule.
51+
scorecard-enforce:
52+
runs-on: ubuntu-latest
53+
timeout-minutes: 15
54+
needs: scorecard-publish
55+
permissions:
56+
contents: read
57+
steps:
58+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
59+
with:
60+
persist-credentials: false
61+
62+
- name: Run Scorecard (score only, no publish)
63+
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
64+
with:
65+
results_file: results.sarif
66+
results_format: sarif
67+
publish_results: false
68+
4669
- name: Check minimum score
4770
run: |
4871
# Parse score from results
@@ -61,6 +84,7 @@ jobs:
6184
# Check specific high-priority items
6285
check-critical:
6386
runs-on: ubuntu-latest
87+
timeout-minutes: 10
6488
steps:
6589
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
6690

.github/workflows/scorecard.yml

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

1313
jobs:
1414
analysis:
15+
timeout-minutes: 30
16+
permissions:
17+
security-events: write
18+
id-token: write
19+
contents: read
20+
actions: read
1521
uses: hyperpolymath/standards/.github/workflows/scorecard-reusable.yml@e0caf11508a3989574713c78f5f444f2ce5e33ef
1622
secrets: inherit

.github/workflows/secret-scanner.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ permissions:
1515

1616
jobs:
1717
scan:
18+
timeout-minutes: 15
1819
uses: hyperpolymath/standards/.github/workflows/secret-scanner-reusable.yml@3e4bd4c93911750727e2e4c66dff859e00079da0
1920
secrets: inherit

docs/RSR_OUTLINE.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ just validate-rsr
101101
|`AI.a2ml`
102102
|Claude-specific instructions
103103

104-
|`src/abi/`
104+
|`src/interface/Abi/`
105105
|Idris2 ABI definitions (Types, Layout, Foreign)
106106

107107
|`ffi/zig/`
@@ -177,7 +177,7 @@ project/
177177
│ ├── TOPOLOGY-GUIDE.adoc
178178
│ ├── generated/
179179
│ └── man/
180-
├── src/abi/ # Idris2 ABI definitions
180+
├── src/interface/Abi/ # Idris2 ABI definitions
181181
│ ├── Types.idr
182182
│ ├── Layout.idr
183183
│ └── Foreign.idr

0 commit comments

Comments
 (0)