Skip to content

ci(instant-sync): block egress except the GitHub API (Hypatia RE002) - #127

Open
hyperpolymath wants to merge 1 commit into
mainfrom
claude/instant-sync-egress-block
Open

hyperpolymath wants to merge 1 commit into
mainfrom
claude/instant-sync-egress-block

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

Hypatia's one high finding on this repo, RE002, is in .github/workflows/instant-sync.yml. The job holds FARM_DISPATCH_TOKEN but runs harden-runner with egress-policy: audit, which records traffic and never blocks it. The finding is on main at 0dceab6, so it fails the blocking Hypatia gate on every PR, including #121, which only adds a doc. #107 added audit mode as step one of "audit, then tighten to block". This PR is step two.

Changes

  • egress-policy: audit → egress-policy: block, with allowed-endpoints: api.github.com:443.
  • The step comment now explains why that one host is enough.
  • Action pins are unchanged, so actions.lock is unchanged.

The allowlist comes from the action's source, not from observed traffic. #107 planned an audit run on main to collect the traffic, but none exists: every instant-sync run since June ended in startup_failure. peter-evans/repository-dispatch at the pinned 28959ce makes one request, POST /repos/{owner}/{repo}/dispatches, to GITHUB_API_URL. That defaults to https://api.github.com (dist/index.js, lines 1973 and 2119). The action is downloaded during job set-up, before harden-runner starts.

RSR Quality Checklist

Required

  • Tests pass: n/a. The job runs only on push to main or on release, so CI on this PR cannot run it.
  • Code is formatted
  • Linter is clean: not run locally. This session's permissions blocked running downloaded actionlint/zizmor binaries. The YAML parses, and the step's with: was checked with a parser. workflow-linter.yml runs actionlint and zizmor on this PR.
  • No banned language patterns
  • No unsafe blocks without // SAFETY: comments
  • No banned functions
  • SPDX license headers present (unchanged)
  • No secrets, credentials, or .env files included

Testing

  • python3 -c 'yaml.safe_load(...)': the step now reads egress-policy: block, allowed-endpoints: api.github.com:443.
  • Not tested end to end. The first real check is the first push to main after merge, and only if FARM_DISPATCH_TOKEN is set. If the dispatch then fails with a harden-runner blocked-egress annotation, add exactly the host it names.
  • Expected effect on docs(audits): add 2026-11-16 trope-stack proof audit report #121: once this merges and docs(audits): add 2026-11-16 trope-stack proof audit report #121 is updated from main, the Hypatia gate's single error-level SARIF result is gone. The other 12 results are warnings and do not gate.

Generated by Claude Code

The dispatch job holds FARM_DISPATCH_TOKEN and ran harden-runner in
egress-policy: audit. Audit mode records traffic but never blocks it, so
on this push-to-main trigger it was not containment. Hypatia RE002 rates
that high, and it fails the blocking Hypatia gate on every PR.

The job now runs egress-policy: block with one allowed endpoint,
api.github.com:443. peter-evans/repository-dispatch (pinned 28959ce)
makes a single call, POST /repos/{owner}/{repo}/dispatches, to
GITHUB_API_URL, which defaults to https://api.github.com. The action is
downloaded during job set-up, before harden-runner starts.

#107 planned to derive the allowlist from an audit run on main. No such
run exists: every instant-sync run since June ended in startup_failure.
So the allowlist comes from the action's source, not from observed
traffic. Action pins are unchanged, so actions.lock is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J4QvDgHt5BLAJ1gNWrw1wz
@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Chores
    • Automated dispatch checks now restrict outbound connections to GitHub’s API. If a check requires access to another host, the blocked connection is reported for review before that host is allowed. The dispatch process and the conditions under which it runs remain unchanged.

The instant-sync workflow changes the runner egress policy from audit mode to block mode. It allows outbound connections only to api.github.com:443. The dispatch step and its conditions are unchanged.

Changes: Instant sync workflow

Layer / File(s) Summary
Runner egress policy
.github/workflows/instant-sync.yml
The runner now blocks outbound connections except to api.github.com:443. Comments describe the expected dispatch request and how to identify additional hosts to allow.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Merge Risk: Minimal · up to 5c41d

This tightens the instant-sync runner so it can reach only the GitHub API. No concrete defect was found, and the change is low risk and easy to revert. The first real run after merging to main will confirm that the dispatch still works.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the instant-sync workflow now blocks egress except the GitHub API, which is the change the diff makes. It also cites the Hypatia RE002 finding it addresses. The title …
Description check Passed The description follows the template's main sections: Summary, Changes, RSR Quality Checklist, and Testing. It explains the reason for the change, the allowlist source, and the expected effect on PR #…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: the instant-sync workflow now blocks egress except the GitHub API, which is the change the diff makes. It also cites the Hypatia RE002 finding it addresses. The title is specific and matches the raw summary and objectives.

Full details: Description check

Explanation

The description follows the template's main sections: Summary, Changes, RSR Quality Checklist, and Testing. It explains the reason for the change, the allowlist source, and the expected effect on PR #121. The checklist is filled in, and unchecked items carry reasons. The Screenshots section is omitted, which is acceptable because it is conditional. The Required items for tests and lint are unchecked, but the author gives reasons for both. The template also lists the 'As Applicable' items, which the description does not address. These are non-critical for this workflow-only change.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: c15f230f-2aa4-4280-b855-319d527ffee6
Commits

Reviewing files that changed from the base of the PR and between 0dceab6 and 5c41dc6.

Files selected for processing: 1

  • .github/workflows/instant-sync.yml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Recent review details

Context from checks skipped due to timeout: 7

  • GitHub Check: CodeRabbit
  • GitHub Check: verified-core-and-conformance
  • GitHub Check: Fleet report-backs / Fleet report-backs
  • GitHub Check: Lean grade-boundary: lake build + sorry-free environment
  • GitHub Check: Lean grade-factorisation: lake build + sorry-free environment
  • GitHub Check: Agda Theorem B (--safe --without-K)
  • GitHub Check: semgrep-cloud-platform/scan
Additional comments: 1

.github/workflows/instant-sync.yml: 1

21-32: LGTM!

@sonarqubecloud

Copy link
Copy Markdown

Copy link
Copy Markdown
Owner Author

code-quality fails here (job 134235538629, exit 123) for a reason unrelated to this PR, which changes only .github/workflows/instant-sync.yml. The failure is ShellCheck 0.11.0 output: SC1112 in scripts/pwg-derive.sh:72 and SC2030/SC2031 in scripts/test-gate-falsifiability.sh. main at 0dceab6 fails the same way: I reproduced exit 123 there with the pinned, SHA-256-verified ShellCheck.

#117 already fixes both scripts, and its code-quality is green; #119 carries the same fix. I haven't ported it into this PR, because those scripts are rewritten on #117/#119 and a second copy would conflict. This check clears once #117 merges and this branch is updated from main. No check was skipped or disabled.


Generated by Claude Code

@linear-code
linear-code Bot marked this pull request as ready for review November 17, 2026 17:39
@github-actions

Copy link
Copy Markdown

Fork governance

Lane Status Run
DEED syntax (repo deed) 🟢 conformant run 44138793129
K9-DEED conformance (L0–L2; L3 not verified) 🟡 conformant (advisory debt) (job: success) same run
Hypatia verdict grid 🟢 no graded findings (job: success) · advisory in grid scope: 🔴 red (0 critical, 9 high, not grading) same run

Scope: the three lanes below are static checks at the named commit. A
green row means every applicable check in its declared scope passed;
orange means evidence is missing, not that nothing was found. The
Hypatia verdict covers GATING rows only; advisory reporters are listed
in its grid and their severity counts are limited to the grid scope.
A blocking gate may inspect findings outside the delta grid’s grade; open
the linked run and check annotations for the failing step and, where
applicable, the finding. No row is a security certification.

K9-DEED conformance

k9-deed L0–L2 yellow

🟡 advisory · commit 5c41dc6f090c · run 44138793129 · validator hyperpolymath/standards@857ff096af11

Category Status Pass Fail Indeterminate N/A Since previous revision
K9 contract typecheck 🟢 conformant 1 0 0 0 — no comparable baseline
K9 validator self-test 🟢 conformant 49 0 0 0 — no comparable baseline
K9 live corpus (L0–L2) 🟡 advisory 2 8 (8 advisory) 0 0 — no comparable baseline
K9 live corpus (L0–L2): 8 finding(s) / scope notes
  • .machine_readable/self-validating/examples/setup-repo.k9.ncl — fail (advisory): K9-S007: security flags request capabilities the grant does not cover: net.fetch fs.write process.spawn (default-deny: list them in pedigree.security.capabilities); K9-S009: leash is 'Hunt but no pedigree.signature block is present (presence required here; verificatio
  • .machine_readable/self-validating/methodology-guard.k9.ncl — fail (advisory): K9-S002: pedigree.schema_version is missing; K9-S003: pedigree.component_type is missing (required by contract v1.0.0 §6.2); K9-N001: component violates the K9.Component contract: error: missing definition for `schema_version` ┌─ /home/runner/work/
  • .machine_readable/self-validating/template-hunt.k9.ncl — fail (advisory): K9-S003: pedigree.component_type is an unfilled placeholder: 'TODO: describe component type (e.g., 'deployment', 'setup-script')'; K9-S005: pedigree.metadata.name is an unfilled placeholder: 'TODO: component-name'; K9-S007: security flags request capabilities the gran
  • .machine_readable/self-validating/template-kennel.k9.ncl — fail (advisory): K9-S003: pedigree.component_type is an unfilled placeholder: 'TODO: describe component type (e.g., 'build-config', 'metadata')'; K9-S005: pedigree.metadata.name is an unfilled placeholder: 'TODO: component-name'
  • .machine_readable/self-validating/template-yard.k9.ncl — fail (advisory): K9-S003: pedigree.component_type is an unfilled placeholder: 'TODO: describe component type (e.g., 'validated-config', 'schema')'; K9-S005: pedigree.metadata.name is an unfilled placeholder: 'TODO: component-name'
  • container/deploy.k9.ncl — fail (advisory): K9-S002: pedigree.schema_version is missing; K9-S003: pedigree.component_type is missing (required by contract v1.0.0 §6.2); K9-S004: pedigree.security.leash is missing; K9-S005: pedigree.metadata.name is missing; K9-S011: component declares a 'recipes' block at l
  • coordination.k9 — fail (advisory): K9-S002: pedigree.schema_version is missing; K9-S003: pedigree.component_type is missing (required by contract v1.0.0 §6.2); K9-N001: component does not typecheck against K9.Component: error: unexpected token ┌─ /home/runner/work/trope-checker/trope-checker/.k9-
  • session/custom-checks.k9 — fail (advisory): K9-S002: pedigree.schema_version is missing; K9-S003: pedigree.component_type is missing (required by contract v1.0.0 §6.2); K9-N001: component does not typecheck against K9.Component: error: unexpected token ┌─ /home/runner/work/trope-checker/trope-checker/sess

Scope: K9 components L0–L2 against contract v1.0.0 at the named standards commit. L3 signature verification and routed coordination-dialect files are not certified. Green is limited to this scope. Orange is missing evidence; yellow is grandfathered debt or warnings; grey is an explicit scope exclusion. report.json, badge.json and the validator logs are in the k9-grid artifact on the linked run.

Hypatia verdict grid

Hypatia grid green

🟢 clean · commit 5c41dc6f090c · run 44138793129 · scope: this change (1 file(s))

Advisory: 11 row(s), worst 🔴 high (0 critical, 9 high in grid scope) — reported, never grading the change.

Unique graded findings across gating and advisory rows: 18 (18 reporter observations; 18 without sufficient identity to corroborate). Row counts remain per reporter; unique totals do not change gating.
Raw Hypatia alert-derived observations: 43 (code-scanning, Dependabot and secret-scanning; some may also be in SARIF; not an extra total).

Reporter Gate Status Critical High Medium Minor Since previous revision
Hypatia scan gating 🟢 clean 0 0 0 0 — no comparable baseline (no prior PR grid or unreadable snapshot)
panic-attack assail advisory 🟢 clean 0 0 0 0 — no comparable baseline (no prior PR grid or unreadable snapshot)
pons asinorum advisory 🟢 clean 0 0 0 0 — no comparable baseline (no prior PR grid or unreadable snapshot)
echidnabot advisory ⚪ not applicable 0 0 0 0 — no comparable baseline (no prior PR grid or unreadable snapshot)
rhodibot (RSR compliance) advisory 🟢 clean 0 0 0 0 — no comparable baseline (no prior PR grid or unreadable snapshot)
panicbot advisory ⚪ not applicable 0 0 0 0 — no comparable baseline (no prior PR grid or unreadable snapshot)
sustainabot advisory ⚪ not applicable 0 0 0 0 — no comparable baseline (no prior PR grid or unreadable snapshot)
glambot (presentation quality) advisory 🔵 minor 0 0 0 5 — no comparable baseline (no prior PR grid or unreadable snapshot)
seambot advisory ⚪ not applicable 0 0 0 0 — no comparable baseline (no prior PR grid or unreadable snapshot)
finishingbot (release readiness) advisory 🔴 high 0 9 4 0 — no comparable baseline (no prior PR grid or unreadable snapshot)
cipherbot advisory ⚪ not applicable 0 0 0 0 — no comparable baseline (no prior PR grid or unreadable snapshot)
accessibilitybot advisory ⚪ not applicable 0 0 0 0 — no comparable baseline (no prior PR grid or unreadable snapshot)
Hypatia scan: 12 finding(s)
  • 12 further finding(s) in files this change does not touch: reported, not graded (0 critical, 0 high).
panic-attack assail: 3 finding(s)
  • 3 further finding(s) in files this change does not touch: reported, not graded (0 critical, 0 high).
echidnabot: not_applicable — proofs here are gated by their own toolchains (proofs.yml: Idris2, Lean, Agda); no ECHIDNA engine is configured, so this adapter could only ever report not_run
  • ⚪ not applicable: proofs here are gated by their own toolchains (proofs.yml: Idris2, Lean, Agda); no ECHIDNA engine is configured, so this adapter could only ever report not_run
rhodibot (RSR compliance): 11 finding(s)
  • 11 further finding(s) in files this change does not touch: reported, not graded (0 critical, 11 high).
panicbot: not_applicable — panic-attack already reports directly as its own row in the Hypatia verdict grid; enrolling panicbot would count the same findings twice
  • ⚪ not applicable: panic-attack already reports directly as its own row in the Hypatia verdict grid; enrolling panicbot would count the same findings twice
sustainabot: not_applicable — reserved fleet slot; no adapter exists (gitbot-fleet README)
  • ⚪ not applicable: reserved fleet slot; no adapter exists (gitbot-fleet README)
glambot (presentation quality): 82 finding(s)
  • info GS-001 — Install git-seo for comprehensive SEO analysis: https://github.com/hyperpolymath/git-seo
  • info MACH-007 — ECOSYSTEM.scm not found in .machine_readable/ directory.
  • info MACH-007 — META.scm not found in .machine_readable/ directory.
  • info MACH-007 — STATE.scm not found in .machine_readable/ directory.
  • info MACH-005 — No robots.txt found. Consider adding one for crawler control.
  • 77 further finding(s) in files this change does not touch: reported, not graded (0 critical, 2 high).
seambot: not_applicable — no seam register is declared (spec/seams/seam-register.json)
  • ⚪ not applicable: no seam register is declared (spec/seams/seam-register.json)
finishingbot (release readiness): 127 finding(s)
  • high V1-DOC-ROADMAP.adoc — Required file ROADMAP.adoc not found (Project roadmap).
  • high TOOL-001 — .tool-versions file not found for asdf/mise version management.
  • high SCM-001-NEUROSYM.scm — Required SCM file NEUROSYM.scm not found (Neurosymbolic AI documentation).
  • high SCM-001-AGENTIC.scm — Required SCM file AGENTIC.scm not found (Agentic AI integration documentation).
  • high SCM-001-PLAYBOOK.scm — Required SCM file PLAYBOOK.scm not found (Operational playbooks and procedures).
  • high SCM-001-ECOSYSTEM.scm — Required SCM file ECOSYSTEM.scm not found (Project's place in the ecosystem).
  • high SCM-001-META.scm — Required SCM file META.scm not found (Meta-level information and architectural decisions).
  • high SCM-001-STATE.scm — Required SCM file STATE.scm not found (Project state and progress tracking).
  • high PH-100 — Found 102 placeholders, exceeds maximum allowed (0)
  • medium V1-COM-CONTRIBUTING.md — CONTRIBUTING.md file not found (Contribution guidelines).
  • medium V1-COM-CODE_OF_CONDUCT.md — CODE_OF_CONDUCT.md file not found (Code of conduct).
  • medium V1-SEC-001 — SECURITY.md not found for responsible disclosure.
  • medium TEST-AG-002 — No direct single-line Agda source check was identified in the known workflow or recipe locations. Dynamic runners need separate review; no proof was executed.
  • 114 further finding(s) in files this change does not touch: reported, not graded (0 critical, 1 high).
cipherbot: not_applicable — no cryptography is implemented in this repository; the hashes present are checksum/integrity pins, which cipherbot would report as cryptographic findings
  • ⚪ not applicable: no cryptography is implemented in this repository; the hashes present are checksum/integrity pins, which cipherbot would report as cryptographic findings
accessibilitybot: not_applicable — no served HTML surface; this is a checker library/CLI with AsciiDoc documentation
  • ⚪ not applicable: no served HTML surface; this is a checker library/CLI with AsciiDoc documentation

Scope: static findings reported by each row's tool at the named commit. The table grades only findings in files this change touches, so the colour answers "does this change introduce anything?", not "what does the whole repository still carry?". Standing findings are counted in each accordion and in report.json; the baseline filter remains the place where acknowledged debt is recorded. The lane state is the worst GATING row; advisory rows are listed and counted but never set it. Purple, red, yellow and blue grade the worst GRADED finding present; orange is evidence missing, malformed or a scanner that did not run; grey is an explicit scope exclusion with its reason. No row is a security certification. report.json, badge.json and the raw findings are in the verdict-grid artifact on the linked run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants