Skip to content

Commit 11d33d6

Browse files
ci(governance): refresh standards pins to d72fe5a + add Hypatia baseline (#42)
* ci(governance): refresh standards pins to d72fe5a + add Hypatia baseline Two follow-ups after #41. 1. Pin refresh. The standards estate advanced 5a93d9d5 -> d72fe5a, so the governance + scorecard reusable pins went stale again (the "Check Workflow Staleness" gate compares pins against standards HEAD; this is why it went red on #41, independent of that PR's content). Bump both to d72fe5a. Verified against check-workflow-staleness.sh@d72fe5a: the only rules that match this repo are the two pin-freshness checks. The no_scorecard_sarif_code_scanning rule does not fire (no single workflow uses ossf/scorecard-action@ together with upload-sarif@) and no_stale_hypatia_reusable_pin does not apply (no hypatia-scan-reusable reference). scorecard-reusable.yml@d72fe5a needs exactly contents:read + security-events:write + id-token:write, which the job already grants. 2. .hypatia-baseline.json. Acknowledge the reviewed false positives so the governance baseline gate runs clean and the advisory scan stops raising them (including the two "critical" secret detections). Covers the file-based code_safety/security_errors findings -- the only ones the tokenless validate-hypatia-baseline scan sees: the two test-fixture "secrets" (a fuzzer seed and a commented-out placeholder), the three escaped-markup innerHTML sinks, the loopback HTTP URL, and the syscall @bitcast. Each entry carries a rationale note and validates against standards' hypatia-baseline.schema.json. The API-dependent meta findings (git_state, code_scanning_alerts, scorecard SAST) use uppercase types the schema forbids and are absent from the tokenless gate scan, so they are intentionally not baselined. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LvsZgNxFbeqfRmrVFNhJ8G * fix(ci): keep reusable pin token out of scorecard.yml comment The estate staleness check greps every workflow line for "scorecard-reusable.yml@" and extracts the SHA after it. The #42 comment ("... declared by scorecard-reusable.yml@d72fe5a.") added a SECOND match, so the extracted PINNED_SHA became two lines and never equalled the expected single SHA — a false "stale Scorecard reusable" failure even though the actual `uses:` pin is correct. Reword the comment to drop the token, with a NOTE to prevent regression. Verified locally: check-workflow-staleness.sh@d72fe5a now exits 0. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LvsZgNxFbeqfRmrVFNhJ8G --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent d37caa4 commit 11d33d6

3 files changed

Lines changed: 58 additions & 4 deletions

File tree

.github/workflows/governance.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ permissions:
3131

3232
jobs:
3333
governance:
34-
uses: hyperpolymath/standards/.github/workflows/governance-reusable.yml@5a93d9d57cc04de4002d6d0ecd336fc7a8698910
34+
uses: hyperpolymath/standards/.github/workflows/governance-reusable.yml@d72fe5a14e841ac6d78514b53624b6173038ee20

.github/workflows/scorecard.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,15 @@ jobs:
1414
analysis:
1515
# Explicit least-privilege permissions for the reusable Scorecard call:
1616
# contents:read to check out, security-events:write to upload the SARIF,
17-
# id-token:write to publish results to the OpenSSF API. Matches the scopes
18-
# declared by scorecard-reusable.yml@5a93d9d5.
17+
# id-token:write to publish results to the OpenSSF API — exactly the
18+
# scopes the pinned reusable Scorecard workflow declares.
1919
# (Hypatia workflow_audit: scorecard_wrapper_missing_job_permissions)
20+
# NOTE: do not write the reusable's "<name>.yml@<sha>" string in a comment
21+
# here — the estate staleness check greps every line for that token and a
22+
# second match would break its single-pin SHA comparison.
2023
permissions:
2124
contents: read
2225
security-events: write
2326
id-token: write
24-
uses: hyperpolymath/standards/.github/workflows/scorecard-reusable.yml@5a93d9d57cc04de4002d6d0ecd336fc7a8698910
27+
uses: hyperpolymath/standards/.github/workflows/scorecard-reusable.yml@d72fe5a14e841ac6d78514b53624b6173038ee20
2528
secrets: inherit

.hypatia-baseline.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
[
2+
{
3+
"severity": "critical",
4+
"rule_module": "security_errors",
5+
"type": "secret_detected",
6+
"file": "src/interface/ffi/src/fuzz_config.zig",
7+
"note": "False positive: fuzzer seed in env_seeds[] (\"PASSWORD='quoted'\\nAPI_KEY=\\\"double_quoted\\\"\") — literal test input exercising the ENV config parser, not a credential. Corroborated: gitleaks, trufflehog, rust-secrets and shell-secrets all pass clean."
8+
},
9+
{
10+
"severity": "critical",
11+
"rule_module": "security_errors",
12+
"type": "secret_detected",
13+
"file": ".envrc",
14+
"note": "False positive: commented-out placeholder (# export API_KEY=\"...\"). Real secrets live in the gitignored .env loaded via dotenv_if_exists; .envrc carries no credential."
15+
},
16+
{
17+
"severity": "high",
18+
"rule_module": "code_safety",
19+
"type": "js_innerhtml",
20+
"file": "src/gui/fli/fli-tooltip.js",
21+
"note": "Reviewed: attribute-sourced text is escaped via escapeHtml before assignment; innerHTML renders the resulting markup, which textContent cannot express."
22+
},
23+
{
24+
"severity": "high",
25+
"rule_module": "code_safety",
26+
"type": "js_innerhtml",
27+
"file": "src/gui/fli/fli-terminal.js",
28+
"note": "Reviewed: all text passes through escapeTermHtml before being wrapped in ANSI-styled <span> markup; innerHTML is required to render the styled spans."
29+
},
30+
{
31+
"severity": "high",
32+
"rule_module": "code_safety",
33+
"type": "js_innerhtml",
34+
"file": "src/gui/fli/fli-gauge.js",
35+
"note": "Reviewed: dynamic labels are escaped via escapeXml; the assigned value is generated SVG markup, which textContent cannot express."
36+
},
37+
{
38+
"severity": "high",
39+
"rule_module": "code_safety",
40+
"type": "ncl_http_url",
41+
"file": ".machine_readable/svc/k9/template-hunt.k9.ncl",
42+
"note": "Reviewed: IPv6 loopback (http://[::1]:8090) to a local VeriSimDB that serves plain HTTP; https would break the health check. CWE-319 concerns cleartext over a network — loopback is not network transit."
43+
},
44+
{
45+
"severity": "medium",
46+
"rule_module": "code_safety",
47+
"type": "zig_bit_cast",
48+
"file": "src/interface/ffi/src/probe.zig",
49+
"note": "Reviewed: @bitCast flips O_NONBLOCK on the std.posix.O packed struct for the fcntl syscall (Zig 0.15). Behaviour-preserving and required; rewriting would break non-blocking connect."
50+
}
51+
]

0 commit comments

Comments
 (0)