Skip to content

Commit 2dd684e

Browse files
committed
ci: resolve Hypatia findings at source (dependabot, scorecard perms, false-positive suppressions)
Foundational, in-repo remediation so the advisory Hypatia scan stops re-flagging known issues: Real fixes (close genuine findings): - Add .github/dependabot.yml (github-actions ecosystem, weekly) — closes the OSSF Scorecard "Dependency-Update-Tool" / DependencyUpdate finding. Scoped to github-actions only: echo-types has no Cargo/npm/mix/pip manifests, and Dependabot has no native Nix ecosystem. - scorecard.yml: grant the analysis job the permissions the scorecard-reusable contract documents (contents:read, security-events: write, id-token:write) — closes scorecard_wrapper_missing_job_permissions. Verified false positives, suppressed via the sanctioned .hypatia-ignore mechanism (code_safety rules route through ScannerSuppression): - code_safety/agda_postulate on proofs/agda/Smoke.agda (the "critical"): the rule is a naive \bpostulate\b regex with no comment stripping; the only matches are comments documenting the postulate-free discipline. The repo guardrail (check-guardrails.sh) strips comments and is the real gate; the one real postulate module is isolated and not in the trusted base. - code_safety/js_http_url_in_code on tools/banner/build-banner.mjs: the URL is the SVG XML namespace `xmlns="http://www.w3.org/2000/svg"`, a constant namespace URI, never fetched (must stay http://). Not fixable in-repo (upstream rule/standards-reusable issues; documented in the PR for follow-up): honest_completion/no_tests (Agda proof suite not recognised as tests) and workflow_audit/missing_timeout_minutes on reusable-workflow callers (timeout-minutes is invalid on `uses:` jobs; the real fix is adding timeouts inside the standards reusables and making the rule skip caller jobs). https://claude.ai/code/session_01Jxr3Wy4ngpkbc2QwjEam82
1 parent e8fad72 commit 2dd684e

3 files changed

Lines changed: 64 additions & 1 deletion

File tree

.github/dependabot.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# SPDX-License-Identifier: MPL-2.0
2+
# Dependabot configuration for echo-types.
3+
#
4+
# echo-types is an Agda proof repository with no language package
5+
# manifests (no Cargo.toml / package.json / mix.exs / requirements).
6+
# The relevant ecosystem is GitHub Actions — this keeps the SHA-pinned
7+
# reusable workflows and third-party actions current, and satisfies the
8+
# OSSF Scorecard "Dependency-Update-Tool" check.
9+
10+
version: 2
11+
updates:
12+
- package-ecosystem: "github-actions"
13+
directory: "/"
14+
schedule:
15+
interval: "weekly"
16+
groups:
17+
actions:
18+
patterns:
19+
- "*"

.github/workflows/scorecard.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,18 @@ on:
88
push:
99
branches: [main]
1010

11-
permissions: read-all
11+
permissions:
12+
contents: read
1213

1314
jobs:
1415
analysis:
16+
# Caller-granted permissions per the scorecard-reusable contract
17+
# (its header documents: the caller MUST grant security-events:write
18+
# + id-token:write; contents:read lets it read the repo). Closes the
19+
# Hypatia `scorecard_wrapper_missing_job_permissions` finding.
20+
permissions:
21+
contents: read
22+
security-events: write
23+
id-token: write
1524
uses: hyperpolymath/standards/.github/workflows/scorecard-reusable.yml@e0caf11508a3989574713c78f5f444f2ce5e33ef
1625
secrets: inherit

.hypatia-ignore

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# SPDX-License-Identifier: MPL-2.0
2+
#
3+
# .hypatia-ignore — per-rule scanner exemptions for echo-types.
4+
#
5+
# Format (one entry per line; `#` for comments):
6+
# <rule_module>/<rule_type>:<path-fragment>
7+
# The path fragment is substring-matched against each finding's
8+
# repo-relative path. Consumed by the Hypatia scanner
9+
# (lib/hypatia/scanner_suppression.ex). Only content-pattern rule
10+
# modules (e.g. code_safety) are routed through this suppression path;
11+
# structural rules (workflow_audit / honest_completion / scorecard) are
12+
# not, and must be addressed by a real fix or an upstream rule change.
13+
#
14+
# Each entry below is a verified FALSE POSITIVE. Real findings are not
15+
# silenced here.
16+
17+
# ── code_safety/agda_postulate on Smoke.agda — FALSE POSITIVE ──────────────
18+
# The rule is a naive `\bpostulate\b` regex over raw file content that does
19+
# NOT strip comments. The only "postulate" tokens in Smoke.agda are in
20+
# COMMENTS documenting the suite's postulate-free discipline ("Zero
21+
# postulates", "never a postulate", "no funext"); there is no `postulate`
22+
# declaration. The repo's own guardrail tools/check-guardrails.sh strips
23+
# comments before checking and passes — it is the real gate (a genuine
24+
# postulate in Smoke.agda would fail it). The single real postulate in
25+
# proofs/agda (EchoImageFactorizationPropPostulated.agda) is isolated,
26+
# guardrail-exempt by design, and not imported by All.agda or Smoke.agda.
27+
# Upstream fix: agda_postulate should strip comments (see PR notes).
28+
code_safety/agda_postulate:proofs/agda/Smoke.agda
29+
30+
# ── code_safety/js_http_url_in_code on build-banner.mjs — FALSE POSITIVE ───
31+
# The flagged `http://` is the SVG XML namespace identifier
32+
# `xmlns="http://www.w3.org/2000/svg"` — a constant namespace URI that is
33+
# never dereferenced over the network. It MUST remain http:// (changing it
34+
# to https would be semantically wrong and break SVG handling). Not CWE-319.
35+
code_safety/js_http_url_in_code:tools/banner/build-banner.mjs

0 commit comments

Comments
 (0)