fix(security): enforce SSH-only git remotes estate-wide (standards#69)#147
Merged
Conversation
Wire token-in-URL detection into the estate CI gate (governance-reusable.yml security-policy job) so any `.git/config` containing an x-access-token/gho_/ ghp_/ghs_/github_pat_ HTTPS credential fails the PR check immediately. Update REMOTE-URL-POLICY.adoc (→ v1.1.0) to: - record the 2026-05-19 recursive audit result (1 offender: file-soup, now fixed) - upgrade the detection one-liner to recurse all .git trees (not just ~/dev/*/) - expand the Enforcement section: CI gate reference, recommended pre-push hook, provisioning guidance The local remediation (file-soup origin → SSH) was applied directly to the .git/config; it is a local change, not a commit. Outstanding owner action: rotate token gho_**** (found in file-soup/.git/config) at https://github.com/settings/tokens — see REMOTE-URL-POLICY.adoc §4. Refs #69 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
🔍 Hypatia Security ScanFindings: 101 issues detected
View findings[
{
"reason": "Issue in quality.yml",
"type": "missing_workflow",
"file": "quality.yml",
"action": "create",
"rule_module": "workflow_audit",
"severity": "high"
},
{
"reason": "Issue in security-policy.yml",
"type": "missing_workflow",
"file": "security-policy.yml",
"action": "create",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Action hyperpolymath/standards/.github/workflows/governance-reusable.yml@main needs attention",
"type": "unpinned_action",
"file": "governance-reusable.yml",
"action": "pin_sha",
"rule_module": "workflow_audit",
"severity": "high"
},
{
"reason": "Action hyperpolymath/standards/.github/workflows/governance-reusable.yml@main needs attention",
"type": "unpinned_action",
"file": "governance.yml",
"action": "pin_sha",
"rule_module": "workflow_audit",
"severity": "high"
},
{
"reason": "Python file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/standards/standards/a2ml-templates/state-scm-to-v2.py",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/standards/standards/a2ml/bindings/deno/mod.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/standards/standards/lol/test/vitest.config.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/standards/standards/k9-svc/bindings/deno/mod.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "believe_me undermines formal verification (1 occurrences, CWE-704)",
"type": "believe_me",
"file": "/home/runner/work/standards/standards/lol/src/abi/Locale.idr",
"action": "flag",
"rule_module": "code_safety",
"severity": "critical"
},
{
"reason": "Wildcard CORS -- restrict to specific origins or use env var (1 occurrences, CWE-942)",
"type": "js_wildcard_cors",
"file": "/home/runner/work/standards/standards/consent-aware-http/examples/reference-implementations/deno/aibdp_middleware.js",
"action": "flag",
"rule_module": "code_safety",
"severity": "high"
}
]Powered by Hypatia Neurosymbolic CI/CD Intelligence |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
governance-reusable.yml(security-policyjob) as a new SSH-remote policy step: scans every.git/configpresent in the checkout tree forx-access-token:,gho_,ghp_,ghs_, andgithub_pat_credentials embedded in HTTPS remote URLs; fails hard on any hit. All downstream repos that call the governance bundle inherit this check automatically via the singleuses:delegation.REMOTE-URL-POLICY.adoc(→ v1.1.0): records the 2026-05-19 recursive audit (1 offender found and remediated locally), upgrades the detection one-liner to recurse all.gittrees rather than just~/dev/*/, and expands the Enforcement section with the CI gate reference, a recommended pre-push hook, and provisioning guidance.Audit result (2026-05-19)
Full recursive sweep of ~130
.git/configfiles under/home/hyperpolymath/dev(repos, scratch, tools, worktrees, audit clones):dev/repos/file-souporiginhttps://x-access-token:gho_****@github.com/hyperpolymath/file-soupgit@github.com:hyperpolymath/file-soup.git(local .git/config only)All other repos were already on SSH or plain HTTPS (no embedded credential).
Outstanding owner action (EXTERNAL — not resolved by this PR)
Token rotation required.
The token
gho_****(prefixgho_1q9dB2…) was found indev/repos/file-soup/.git/config. A token that has appeared in a URL is considered compromised regardless of whether it was pushed. The owner must revoke/rotate it at:https://github.com/settings/tokens
This is a manual browser action; it cannot be automated here.
Test plan
git remote -vindev/repos/file-soupshows SSH form--admin; Refs not Closes)Refs #69