fix(P1): fail-closed install/settle/X-base/cloud-write + full receipt sha256 - #11
Merged
Merged
Conversation
… sha256 Additive ADVERSARY P1 hardening: transactional Claude init/helpers, settle API gate, X API host allowlist, cloud vector write gate, doctor CLAUDE_SOT_CLEARED pin, and full sha256 receipt integrity. Co-authored-by: Daniel Meyer <scrimshawlife@gmail.com>
|
CC @Zero-State-LLC/partner-agents. Flagged for shared triage. |
Skill Validation used checkout depth=1, so merge-base could not see feba4b5 and doctor tests failed closed. Fetch the pin's ancestors locally (still no live GitHub SoT lookup) and report missing pin objects. Co-authored-by: Daniel Meyer <scrimshawlife@gmail.com>
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.
Code-drop envelope
ADVERSARY P1 fail-closed hardening on org SoT (
feba4b51). Additive only. No PyPI publish. No new bots/services. No exploit PoCs. No phenomenology. LICENSE / LICENSE_POLICY / AGENTS.md unchanged.Workflows: anti-slop-code · production-systems · google-developer-style.
Acceptance
P1-1 Claude transactional (a)+(b)
hyperlex init --target claude/init_skill: refuse symlink dest; target-keyed backup before overwrite; staged smoke unless--skip-smoke→ UNVERIFIED; dry-run writes nothing../install.sh --claudeand--claude-plugincopy CLAUDE_HELPERS only throughscripts/install_transaction.py(hyperlex-helperkind). Unguardedcopy_claude_helpersdeleted.P1-2 Settle fail-closed
Gate in
settle()/settle_and_log()(not CLI-only). Scored TRUE/FALSE require human token (HYPERLEX_SETTLE_TOKEN/--settle-token) or interactive TTY confirm (SETTLE);authority.refnon-empty; kind ≠ advisory. Piped yes / non-TTY stdin without token is refused. Missing gate → exception, no score_log append. Raw token is never stored.P1-3 X API base allowlist
Hosts:
api.twitter.com,api.x.com— https only. Reject non-https, userinfo, non-default ports, off-allowlist host unlessHYPERLEX_X_API_BASE_ALLOW_CUSTOM=1. No request on refuse; bearer never logged.P1-4 Cloud vector write gate
Writes require
HYPERLEX_CLOUD_WRITE=1or TTY--i-understand-cloud-write. Gate: CloudClient upsert,force_cloudtransfers, autoindex cloud stores. Auto-loaded~/.hermes/.env/~/.hyperlex/.envkeys alone ≠ write permission. Local PersistentClient unchanged.P1-5 Tip skew doctor marker
hyperlex doctoremitsCLAUDE_SOT_CLEARED=true|falsefrom local pinreferences/claude-sot-cleared.jsonplus git/install provenance (not live GitHub). Fails when Claude packaging is claimed and uncleared. Pin SHA:feba4b515cf7856dd0cb85cdc24291caf1330e1b(#10 Claude helpers). Shallow clones that lack the pin commit stay uncleared; Skill Validation now fetches full history so ancestry is local.P1-6 Full receipt sha256
receipt.integrityis the full 64-char digest.emit_receipt(..., validate=True)default; CLI--no-validateescape. Legacy 12-char verify only ifHYPERLEX_RECEIPT_LEGACY_INTEGRITY=1. Goldens updated.Cheap folds
HYPERLEX_LLM_BASE_URL/ embed base (file://refused).permissions: contents: readon.github/workflows/ci.yml.Validations (local, this tree)
PYTHONPATH=src pytest -q→ 303 passed, 5 skipped, 20 subtests (pre-follow-up). Follow-up:tests/test_p1_fail_closed.py38 passed; doctor/SoT subset 8 passed.tests_audit→ 25 passed (pre-follow-up).hyperlex doctor→ok True,CLAUDE_SOT_CLEARED True(HEAD descends fromfeba4b51; Claude packaging not claimed).install.sh --dry-runand--claude --dry-runwrite nothing.mkdocs build --strictsucceeded (nav warnings only, pre-existing).CI note
First Skill Validation run failed on 3.10/3.11/3.12 because
actions/checkoutdepth=1 hid pinfeba4b51, somerge-base --is-ancestorcould not prove descent (honest fail-closed). Follow-up commit setsfetch-depth: 0and reports missing pin objects without a live GitHub SoT lookup.Unresolved residuals
scrimshawlife-ctrltip may still lag org SoT post-feat: mirror Claude Code packaging helpers from personal tip #10 until that tree contains this pin / is a descendant offeba4b51.Do not merge — Boof/Danny auto-land.