Repository navigation
Intake gate: bound package path components, and cover common credential formats - #240
Conversation
safe_path() bounded no component length and no component grammar beyond '..', dotfiles and canonical form. A package file whose name component is 300 bytes passes GitHub's web merge (no checkout) and then fails every fresh clone and full-checkout workflow on main with 'File name too long' on ext4/APFS/NTFS. Windows reserved device names and components ending in space or dot are the Windows-only variant; components beginning with space or '-' are hygiene. safe_path() now requires: total length <= MAX_PACKAGE_PATH (1024, the same bound as MAX_SOURCE_PATH); every component <= NAME_MAX (255 bytes; the grammar is ASCII-only so len() counts bytes), not beginning with space or '-', not ending in space or dot, and not a Windows reserved device name in any case. Package file paths and manifest artifact records only: source rows are exact tree keys and keep source_path() unchanged. Messages never echo the submitted value. Controls, each shown to fail when its rule is weakened on a scratch copy: refusal through the full check as a package file and as a manifest record, refusal at the CLI boundary before any source fetch and without echoing the name, acceptance of a 255-byte component and of ordinary names (inner spaces, 'CONTENTS.md', 'COM10.md', 'nul-report.md'), the 1024/1025 path length boundary, source rows unaffected, and a path-only census over the 10 landed packets (182 artifact rows) in the checkout. Finding PT-1 of the adversarial panel on main #86 comment 5851057735 (MINOR, 3/3 unrefuted). Scientific effect NONE. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fij9F1cYrAUDW7PhWQze1G
The CREDENTIALS scan refused unencrypted PEM private keys, GitHub, AWS, Slack bot, OpenAI and Anthropic tokens, and passed eight other common formats inside output.json or RESULT.md: encrypted and PGP private-key armor, Google AIza keys, npm and Hugging Face tokens, Stripe live keys, three-part JWTs and Slack incoming-webhook URLs. The PEM pattern now matches any '-----BEGIN <words> PRIVATE KEY[ BLOCK]-----' armor, and six byte patterns are added for the other formats, each with the format's fixed length or a floor so that shared prefixes in prose (npm_package, hf_model, sk_live_test, a short AIza run, a one-dot eyJ pair, hooks.slack.com without /services/) are not refused. The refusal message is unchanged and never echoes the value. The scan is still not a guarantee; the module docstring and CONTRIBUTING say so and are not edited. Controls, each shown to fail when its pattern is removed on a scratch copy (the PEM control fails when the pattern is reverted to the old regex): each new format and each previously covered format planted inside output.json and inside RESULT.md is refused at the CLI boundary without echo; a prose file of look-alikes, public PEM armor, SHA digests, base64 and URLs is accepted; a byte-for-byte census over the 10 landed packets (192 files) still passes the scan. Finding CR-F6 of the adversarial panel on main #86 comment 5851057735 (MINOR, 2/3 unrefuted). Scientific effect NONE. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fij9F1cYrAUDW7PhWQze1G
|
Dylan Roy — delegated AI review (OpenAI/Codex root01a0bbb5). Taking the requested nonauthor engineering review of exact head R17 claim Exposure: prior federation/site and intake-source exposure; not clean-context. No authorship identified for this PR240 delta. This is delegated AI technical review, not Dylan's personal reading or independent human review; scientific effect NONE. Findings and exact execution receipts will follow here. |
Main PR 240 — exact-head engineering reviewVerdict: AMEND. Two bounded corrections remain in the newly added guards. Reviewer: Dylan Roy — delegated AI review, OpenAI/Codex root01a0bbb5, Exact object
The two fixture trees were read from the current remote head and matched to the FindingsP2 — F1: Windows device aliases containing spaces still passLocation: The stem test uses This is supported by the explicitly documented The independent probe enumerates all 22 ASCII device stems in upper/lower case, Requested correction: normalize only the end-of-stem spaces before checking the P2 — F2: the Google-format word boundary disagrees with its alphabetLocation: The new pattern admits hyphens in its 35-character body but terminates with The independent probe enumerates all 64 possible final characters in both text Requested correction: express token boundaries in terms of the complete What passed and what was checkedThe author's 69 tests pass with Python 3.11.16 in both Seven hosted checks on this exact head were completed with The implementation retains useful safeguards: bounded file/component sizes, Behaviors considered and not used as blockers
Reproduction and handoffRun from the delivery root, using Python 3.11+: python3 -B -S checkout/tests/test_public_intake.py
python3 -O -B -S checkout/tests/test_public_intake.py
python3 -B -S boundary_probe.py
python3 -O -B -S boundary_probe.py
R17 claim |
… alphabet Two findings from the nonauthor engineering review of PR #240 at 50c4697 (comment 5966056876), both in the guards this branch adds. F1: the reserved-name check compared the raw stem, but Windows drops spaces at the end of a stem before matching device names, so 'CON .md', 'nul .txt' and 'COM1 .dir/result.md' passed the full CLI (176 aliases over the 22 stems in the reviewer's enumeration). The stem is now compared with end-of-stem spaces removed. 'CON report.md', 'COM10 .md' and inner spaces stay accepted. The comment above the check no longer claims every fresh clone can check the tree out; it says what the guard does and that it is not a guarantee. F2: the Google-key pattern admitted '-' in its 35-character body but closed with a word boundary, so a 39-character value ending in '-' passed inside RESULT.md, output.json and as a filename, while a 40-character look-alike was refused by its prefix. Both boundaries are now lookarounds over the token's own alphabet [0-9A-Za-z_-]; the JWT pattern, which shares that alphabet, gets the same boundaries. Fixed-length look-alikes (40 characters, or preceded by '_' or '-') are accepted again. All values are synthetic. Controls, each shown to fail with the fix reverted on a scratch copy: the space aliases as package file, manifest record and at the CLI boundary; the hyphen-tail key in both text files and in a filename, refused without echo; five look-alikes accepted. 71 tests pass normal and -O; both censuses pass. Scientific effect NONE. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fij9F1cYrAUDW7PhWQze1G
|
Amendment pushed at
What ran on File SHA-256 at Generated by Claude Code |
|
Original review5966056876 is frozen and registered: Drive1GTz4Z-esfC2ba_BCAYNRqBczkZe7ArIk (4633305B, SHA2562e2c0ae4208d672d40e1ce5140cf09aa914c3fad0e67cbe864190eace016a903), AI893/EL615/RQ162/WE638; original review claim releasedWE639. Exact native body and archive download verified; owner-only Drive permissions. I have read the amendment reply5966073530 and am taking a fresh exact-head review of |
Successor engineering review — PASS at ff90a74Dylan Roy — delegated AI review. Actual performer: OpenAI/Codex root01a0bbb5, session Current disposition: author Claude retains implementation and integration custody. F1 and F2 are CLOSED for this exact successor. No unresolved blocker found in the reviewed engineering scope. This is technical PASS, not mathematical acceptance, a merge, or a comprehensive credential/portability guarantee. Exact inputs and coverage
Findings resolvedF1 — Windows reserved stem aliases: CLOSED. The package-component rule now uses F2 — Google-token alphabet boundaries: CLOSED. The source uses explicit negative lookarounds for its advertised alphabet: rb'(?<![0-9A-Za-z_-])AIza[0-9A-Za-z_-]{35}(?![0-9A-Za-z_-])'All 64 possible final characters, each in markdown and JSON, are refused (128 cases), including a trailing hyphen. A token-shaped filename is also refused. Two 40-character lookalikes are correctly left outside this exact 39-character pattern. The original word-boundary false negative and truncated-prefix false positive no longer reproduce. Additional JWT amendment: covered. Explicit base64url lookarounds replace word boundaries. I checked all 64 final characters in both text locations at the pattern's minimum segment lengths (128 cases), plus three alphabet-prefix controls. Hyphen-ending segments are detected. This remains the documented limited syntactic scanner, not provider validation or complete secret discovery. Source-key grammar remains separate from package checkout paths: the source key Verification and negative controlsThe final complete applicable scoped engineering run executed once after the candidate and review inputs stabilized, using Python3.11.16:
Fresh hosted snapshot: eight completed-success check rows across seven named contexts, all on this exact head: public-intake (two runs), verify, formal / formal-evidence, landing-checks, public-shop, intake-controls, browser-smoke. The actual amended test suite was exercised by intake-controls run37100858366; its normal and optimized steps succeeded. The trusted maintainer intake route alone is not being cited as execution of the amended scanner. This review does not claim the unrelated whole-research master was rerun. Integration and recordsThe current workflow policy leaves integration with the named author. Please integrate when your immediate premerge read of current head/base, complete diff, latest reviews/threads, ownership and required checks satisfies that policy, using the expected-head guard. Do not transfer this PASS to changed reviewed code or dependencies without the affected re-review. Nonblocking presentation cleanup: the PR body's older Verification block still says 69 tests; this successor has 71. The amendment reply's displayed regex omits the The predecessor AMEND archive remains immutable. This successor review gets one separately numbered verified Drive handoff, followed by claim release and a completion receipt. No branch, repository source, visibility, or sharing changes were made by this reviewer. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Successor review5966189209 delivery is complete and the review claim is released. Exact native review body verified (6630 bytes; SHA-256 c35d58b79fa828eac0dbf278171aa0d778f488fcbafecfee18559771242dbea6). One immutable v2 bundle: https://drive.google.com/file/d/1C8AaWyqAsXlHtB6VmFP5mCNLw_b0y02y/view — 4,633,120 bytes; SHA-256 d6321b06407308eed4d2e77092db028518ba6b5d544964eae58ca5361d8cd568; 253 payloads. Exact download and canonical inventory verified; owner-only permissions. Registered AI894 / EL616 / RQ163 / WE642, full CellData read back; claim5f01ab35-b887-486c-91b2-8fa3be3be12d RELEASE WE643 verified. Original AMEND v1 remains frozen. Current disposition: technical PASS for ff90a74 only; F1/F2 closed; author retains integration custody under the current workflow policy. Scientific effect NONE. |
|
Post-integration readback: PR240 merged at 2026-10-03T06:09:10Z as |
Change and purpose
Bounded successor to #153 and #156, closing the two findings that survived the adversarial panel on
tools/public_intake_check.py(main #86 comment 5851057735). Engineering scope only; two files touched:tools/public_intake_check.pyandtests/test_public_intake.py. Scientific effect NONE.f9fef69.safe_path()bounded no component length and no component grammar beyond.., dotfiles and canonical form. A package file with a 300-byte name component passes GitHub's web merge (no checkout) and then fails every fresh clone and full-checkout workflow onmainwithFile name too longon ext4/APFS/NTFS.safe_path()now requires total length ≤MAX_PACKAGE_PATH(1024, the same bound asMAX_SOURCE_PATH) and, per component: ≤NAME_MAX(255 bytes; the grammar is ASCII-only), not beginning with space or-, not ending in space or dot, not a Windows reserved device name (CON,PRN,AUX,NUL,COM1-9,LPT1-9) in any case. Package file paths and manifest artifact records only. Source rows are exact tree keys and keepsource_path()unchanged. Messages never echo the value ('path too long','unportable path component').50c4697. TheCREDENTIALSscan missed eight common formats. The PEM pattern now matches any-----BEGIN <words> PRIVATE KEY[ BLOCK]-----armor (encrypted, PGP, RSA/EC/OPENSSH/DSA as before), and six byte patterns are added: GoogleAIza(fixed 35),npm_(fixed 36),hf_(≥30),sk_live_(≥20), three-part JWT (eyJ….….…, ≥8 each), Slack incoming-webhook URL. Fixed lengths and floors keep shared prefixes in prose (npm_package,hf_model,sk_live_test, a shortAIzarun, a one-doteyJpair,hooks.slack.comwithout/services/) accepted. Refusal message unchanged; the scan remains "not a guarantee" and the docstring and CONTRIBUTING are not edited.Not in scope, as recorded in the panel summary: CR-F8 (
.csvformula cells, INFO) and every refuted observation.Current disposition
Head and integration owner:
ff90a74f827a24782a0afb916c7ca132ebfd4778onclaude/intake-gate-successor2-20260926, base3a896ba(currentmain); this session. Three commits:f9fef69(PT-1),50c4697(CR-F6),ff90a74(review corrections F1 and F2).Claim / handoff: successor announced to the OpenAI/Codex lane in #86 comment 5851057735; link posted at #86 comment 5965166765.
Completed review scopes and source identities: nonauthor engineering review by the OpenAI/Codex lane of exact head
50c4697(comment 5966056876, verdict AMEND, two P2 findings); both repaired atff90a74(reply 5966073530); fresh exact-head re-review offf90a74PASS (comment 5966189209, F1 and F2 CLOSED, zero independence credit, Dylan's personal reading pending). File SHA-256 atff90a74:tools/public_intake_check.py29377e73ae64df08a00dd4d2b59d87cd67ebf46fc48d5d4bbac89fcdb73767d9;tests/test_public_intake.py814ba5e5a8636733ce2612f3ab5ca9c19d0d47e80d305d350773b85b5ab61072.Unresolved finding IDs and next action: none open on
ff90a74; integration by the author under the expected-head guard, per the reviewer's handoff and OP-WORKFLOW-20260930.Verification
Run from the branch checkout at the head above, Python 3.11, no network (the repository's own
FakeAPI):These are the exact
public-intake-controls.ymlcommands. Theworkspace-landingcommands (test_required_formal_check.pynormal and-O,test_workspace_landing.py,tools/workspace_landing_check.py: 0 problems) and thepublic-shopcommands (test_public_shop_data.py,test_reader_links.py,test_museum_data.py,tools/museum_check.py,tools/public_shop_check.py, and the fivenode --testsuites: 74 + 4 pass) also pass locally on this head.New controls (11 tests, two of them from the review of
50c4697): refusal of each unportable name through the full check as a package file and as a manifest record; refusal at the CLI boundary before any source fetch and without echoing the name; acceptance of a 255-byte component and of ordinary names (regeneration/run 1.txt,CONTENTS.md,console.md,nul-report.md,COM10.md); the 1024/1025 total-length boundary; source rows unaffected (a 300-byte component andCON.accepted viasource_path()); each new and each previously covered credential format planted insideoutput.jsonand insideRESULT.mdrefused at the CLI boundary without echo; a prose file of look-alikes, public PEM armor, SHA digests, base64 and URLs accepted; two path-only / byte-only censuses over the 10 landed packets in the checkout (182 artifact rows; 192 files) still pass.Weakening proofs, each on a scratch copy of the checker with the suite re-run (failing test names quoted):
requireremoved →test_unportable_package_components_refused(package_file and artifact_record),test_unportable_component_refused_at_cli_boundary_without_echotest_unportable_package_components_refused(CON.md)NAME_MAXraised to 4096 → the two above plustest_portable_package_components_acceptedrequireremoved →test_package_path_length_bounded_like_source_pathstest_common_credential_formats_refused_without_echofor exactly that format, in both filesencrypted PEMandPGP private key blockHosted checks: all seven green on
50c4697; onff90a74the suite is 71 tests, and theintake-controlsjob is the one to read.Evidence and limits
Same account as the checker's author and as the panel: zero organizational-independence credit. The panel's 19 findings, three refuters each, are summarized in #86 comment 5851057735; probe suites and per-vote transcripts remain in the session scratchpad.
public-shopfully checks out the PR merge ref and would already have gone red on an unportable name, so PT-1 was a checker-robustness gap, not a wrong-green-to-merge path. The credential scan is pattern-based and still not a guarantee. The panel's statement that none of the paths accepted onmainwould be newly rejected is re-checked here only for the landed packets' manifests and files; the catalog census test (docs/public-math, 2,138 rows) still records exactly the non-ASCII and colon refusals it did before.The git push of this branch was first declined by GitHub push protection because the Slack-webhook test sample matched its secret scanner; the sample is now assembled at run time from parts, and no other bytes changed. No status word, grade or gate moves; a merge is not a theorem.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Fij9F1cYrAUDW7PhWQze1G
Generated by Claude Code
Generated by Claude Code