Repository navigation
fix: keep standard scoped scans out of ranking - #71
createsomethingtoday wants to merge 2 commits into
Conversation
|
Post-fix recovery validation completed without another model turn. I preserved the failed original scan, registered a parent-linked recovery scan at the same repository revision and scope, copied the unsealed artifacts, and completed it through this branch. The corrected workbench sealed the contract successfully: |
|
Fresh natural-terminal validation now confirms this branch on the ordinary live path, not only recovery. A |
Preserve and harden the scoped-inventory design from external PR #71. Keep standard workflow instructions, explicitly selected dependency scopes, both attested inventories, and authoritative target finalization consistent with the released 0.1.3 base. Co-authored-by: Create Something <[email protected]>
|
The extended exact-commit validation run reached completion after 56 minutes and surfaced two source-validated findings in the target project, but final save failed because immutable diff targets did not carry the required snapshotDigest. I opened focused follow-up PR #112 with a regression and the completion binding fix. The partial findings were retained and are being remediated before a fresh sealed run. |
* fix: make standard scan inventory authoritative * test: verify scan inventories across Windows line endings * fix: close authoritative scan inventory gaps Preserve and harden the scoped-inventory design from external PR #71. Keep standard workflow instructions, explicitly selected dependency scopes, both attested inventories, and authoritative target finalization consistent with the released 0.1.3 base. Co-authored-by: Create Something <[email protected]> * fix: isolate authoritative inventory outside writable scan roots Address the fresh exact-head review findings without relying on recoverable snapshot hashes or fragile CLI configuration overrides. Keep the private inventory physically outside configured state, output, and repository roots; fail closed if no safe location exists; and honor manually selected dependency scopes. Co-authored-by: Create Something <[email protected]> * fix: enforce authoritative standard scan coverage Verify exhaustive sealed per-file review, candidate scope, and completion against the protected host inventory. Make the fail-closed protected-root regression deterministic across Windows drive layouts. Co-authored-by: Create Something <[email protected]> * test: keep authoritative inventory regressions portable Use the current workbench registration contract and a deterministic unavailable inventory-root fixture on every operating system, including native Windows. Co-authored-by: Create Something <[email protected]> * fix: complete authoritative scan verification Reconcile candidate outcomes and sealed findings, validate full phase closures and empty scopes, enforce bounded inventory traversal, and execute verification from the isolated plugin copy. Co-authored-by: Create Something <[email protected]> * fix: preserve bounded review and diff target contracts Allow independently bounded exhaustive review receipts, bind the authoritative digest for all Git diff modes, and preserve valid POSIX colon filenames without relaxing Windows path safety. Add failing-first regressions against the real inventory verifier and workbench finalizer. Co-authored-by: Create Something <[email protected]> * fix: seal authoritative scan verifier and candidate payloads Stage the isolated Python verifier outside all model-writable roots before starting a scan. Bind reportable finding CWE, precise locations, severity, confidence, validation evidence, and attack-path closure to the authoritative candidate. Reject coverage surfaces that finalization cannot seal and document the exact durable-artifact mapping. Co-authored-by: Create Something <[email protected]> * fix: reverify finalized authoritative scan coverage Verify sealed candidate and review artifacts again immediately after workbench recovery and before publishing completion. Materialize the actual installed plugin in the injection-resistant prompt fixture so the isolated verifier passes unchanged on Windows, macOS, and Linux. Co-authored-by: Create Something <[email protected]> * fix: preserve honest deferred inventory coverage Validate host-attested inventory paths lexically so disappeared files remain durable deferred coverage, require the associated receipt surface to signal follow-up, and normalize supported list-valued change conditions into the canonical finding schema. Prove each edge case with failing-first real-helper regressions. Co-authored-by: Create Something <[email protected]> * fix: seal complete standard scan provenance Seal the exact attested inventory and normalized candidate ledger alongside exhaustive review receipts. Preserve independently reportable child instances, canonical severity fields, escaped-path security, and deferred files after deletion; independently verify every protected input and final finding. Co-authored-by: Create Something <[email protected]> * fix: protect scan verifier interpreter and proof gaps Reject a Python verifier inside model-writable scan state before starting Codex, bind deferred coverage to its exact validated proof gap, and regression-test protected interpreter, complete sealed provenance, independent child findings, and finalizer recovery. Co-authored-by: Create Something <[email protected]> * fix: verify every standard scan completion Verify prompt-only scans before sealing, reconcile every source and shared sink across split findings, and regression-test both manual completion and scoped attack paths against current main. Co-authored-by: Create Something <[email protected]> * fix: reject writable Python verifier aliases Reject both direct writable interpreter symlinks and symlinked state parents before starting a standard scan, while retaining trusted system Python and cross-platform test doubles. Co-authored-by: Create Something <[email protected]> * fix: seal complete standard scan provenance Bind all authoritative scope receipts to one coverage surface, enforce one validated deferred proof gap per candidate, and regression-test contradictory, malformed, and falsely complete coverage. Co-authored-by: Create Something <[email protected]> * fix: reconcile native scan paths and deferred coverage Preserve literal POSIX repository filenames across normalization, finalization, SARIF, and SDK contracts without weakening Windows or artifact paths; require every deferred row to resolve to an actually deferred candidate. Co-authored-by: Create Something <[email protected]> * fix: bind standard scan exclusions to coverage Declare omitted Git metadata and installed dependency trees in the exact workbench, canonical coverage, and manual scan scope without hiding directly selected dependencies. Co-authored-by: Create Something <[email protected]> * fix: preserve overlapping scan scope coverage Carve explicitly requested dependencies out of broader inventory exclusions, attest omitted sibling and transitive trees, and verify downstream workbench coverage against real overlapping scopes. Co-authored-by: Create Something <[email protected]> * fix: persist authoritative standard scan exclusions Snapshot host-owned scan exclusions at registration, declare every omitted symbolic link, and preserve coverage when requested paths disappear. Validate upgrade compatibility and fail closed on tampered exclusion state. Co-authored-by: Create Something <[email protected]> * fix: attest standard scan exclusions and bound source reads * test: cover complete registered inventory exclusions * test: accept Windows inventory line endings * fix: attest standard scan exclusions and bounded inventories * test: terminate synthetic login process after emitting its result * fix: authenticate complete registered scan exclusions * fix: verify authoritative coverage before app scan completion * test: synchronously flush synthetic ChatGPT login prompts * fix: attest standard scan scope and recovered inventory * refactor: deduplicate secure scope inventory handling * fix: attest inventory contents and captured exclusions * fix: bound inventory verification and escape scope exclusions * fix: bound inventory hashing and reject special files * Reject symlink scopes before processing parent traversal * Keep tracked scoped files and reject Windows junctions * fix(scan): exclude dependencies and binaries from broad scopes * Preserve complete scoped inventories while rejecting redirecting links * Reject every redirecting Windows reparse point --------- Co-authored-by: Create Something <[email protected]>
|
Superseded by #88, which preserved and hardened the scoped-inventory design and validation evidence from this PR. #88 merged as |
What
make-repo-rank-inputbootstrap with a deterministicmake-scope-inventorycommand.git,node_modules, and symlinksWhy
The scoped-path SDK prompt instructed a standard scan to call
make-repo-rank-input, even though the standard-scan skill explicitly says not to rank or filter files. That helper deliberately excludes tests, README files, binaries, and other non-source-like files.A first report-only pilot against a 28-file authentication package spent 5.34M input tokens and reached its $5.049 cost limit while still in preflight. It produced a 20-row
rank_input.jsonl, zero worklist rows, and no contract, coverage, report, or findings artifacts. The eight omitted files were the package README and its test files. This is one concrete failure mode behind the cost-without-findings behavior discussed in #25.A second capped run using the initial version of this PR proved that changing only the prompt/helper contract was insufficient: the model could still defer the inventory step. It reached $5.078 after 9 minutes with 5.48M input tokens, no inventory, and no worklist.
An explicitly uncapped run then reached the natural terminal after 63m47s and an estimated $56.302 (71.39M input tokens, 68.94M cached, 320k output). It demonstrated the scanner's substantive value by producing a threat model, 55 candidate-ledger rows, and 48 partial finding drafts. It also exposed two deterministic integration defects:
node_modules/.binwrappers in addition to the 28 requested first-party files;git_worktreekind even though the clean workbench target permitted onlygit_revision:scan.target.kind: must match the workbench target.This revision fixes both defects. The uncapped findings remain partial/unsealed and application remediation is intentionally outside this PR.
Validation
pnpm run formatpnpm run typespnpm test(378 passed, 3 skipped, 0 failed)pnpm run buildpnpm pack --pack-destination ../../distpnpm run check:package ../../dist/openai-codex-security-0.1.1.tgz(179 entries; public import, CLI, and 95 bundled plugin files validated)pnpm run test:packageRegression coverage proves that:
.git,node_modules, and symlinks do not;