fix(security): close Lane B findings from adversarial review c6c486 - #148
Merged
Conversation
Apply recommended variants for SEC-004/005/009/010 and ARCH-004/005: SHA-pin Actions, fail-closed reviewer sandbox without bwrap/sandbox-exec, registry-lint security ack, register exploratory missions, unify archive collectors, and opt-in strict stop-verify on missing repo.
Close P0/P1 doc-sync drifts from the adversarial review (fail-closed kill switches, reviewer refuse-without-sandbox, exploratory count, skills CLI pin). Sync Starlight generated copy. Add/adjust tests for Lane B remediation and keep stop-verify hook exit 0 on strict block.
ravidsrk
marked this pull request as ready for review
July 8, 2026 19:54
Update action.yml assertion for setup-python SHA pin, bump README/CHANGELOG test counts to 73/1576, use <SUBSTRATE> path in knobs docs, sync substrate stop_verify + bump autonomous-fleet-core to 1.3.4 with refreshed lock hash.
Cover non-positive auth timeout, invalid UTF-8 findings docs, ARCH-004 exploratory registry orphans, and BUG-004 table resume edge cases so the fail-under=100 gate passes.
|
Want your agent to iterate on Greptile's feedback? Try greploops. |
Cover recovery_scan.py:548 so the 100% coverage gate passes after Lane A table-format resume counting.
Make the keyed readiness file strictly newer so the promotion-readiness-prefers-canonical mutation cannot survive via same-second name-sort falling back to the canonical path.
Route the CLI through lint_registry() so ARCH-004's on-disk exploratory check runs once (matching the library aggregator) and cannot drift.
ravidsrk
force-pushed
the
cursor/lane-b-remediation-256a
branch
from
July 9, 2026 07:02
e8e0164 to
8a42ce8
Compare
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
Closes the six Lane B findings from adversarial review
c6c486, plus post-fix doc-sync, CI green-up, and Greptile review fixes.Integration PR #134 (Lane A) is already on
main.Lane B (recommended variants)
action.yml,.github/workflows/ci.yml,docs-site.ymlsandbox-exec/bwrapunlessFLEET_SECURITY_OVERRIDE_ACK=1FLEET_DISABLE_REGISTRY_LINTfail-closed without ackscaffold-align,contract-first-build,agents-layer+ on-disk registry lintcollect_run_archives(); validate CLIs useRUN_ID_PATTERNFLEET_STOP_VERIFY_STRICT=1→ BLOCK JSON on missing repo (exit still 0 for CC hook contract)Review fixes (Greptile)
scripts/registry_lint.pynow callslint_registry()once (no doublelint_exploratory_on_disk_registered)stop_verifystrict path already returns0(synced withscripts/)Local verification
./scripts/validate-all.sh— pass (100% coverage)./scripts/mutation-check.sh— 72/72 caughtReady for human merge.
Greptile Summary
This PR hardens the fleet validation substrate and syncs the related docs, assets, and tests. The main changes are:
registry_lint.pyfail closed for bareFLEET_DISABLE_REGISTRY_LINTwithoutFLEET_SECURITY_OVERRIDE_ACK.sandbox-execorbwrapunless the security override ack enables the detect-only fallback.stop_verify.pywhile preserving the hook exit-zero contract.Confidence Score: 5/5
Safe to merge with minimal risk.
The security-sensitive scripts, shared helpers, substrate mirrors, and related tests are consistent with the intended behavior. The earlier duplicate registry lint and hook exit-code issues are addressed. No remaining runtime bugs were identified in the changed paths.
No files require special attention.
What T-Rex did
Important Files Changed
Sequence Diagram
%%{init: {'theme': 'neutral'}}%% sequenceDiagram participant Operator participant ReviewerCLI as run-sandboxed.sh --role reviewer participant RegistryCLI as registry_lint.py participant StopHook as stop_verify.py participant SharedLib as Shared substrate helpers Operator->>ReviewerCLI: Run reviewer command ReviewerCLI->>ReviewerCLI: Prefer sandbox-exec, then bwrap alt Real sandbox available ReviewerCLI-->>Operator: Execute in read-only reviewer sandbox else No sandbox binary ReviewerCLI->>SharedLib: Check FLEET_SECURITY_OVERRIDE_ACK alt Ack present ReviewerCLI-->>Operator: Execute with post-exec hash audit else Ack missing ReviewerCLI-->>Operator: Refuse with exit 4 end end Operator->>RegistryCLI: Run registry lint RegistryCLI->>SharedLib: Check FLEET_DISABLE_REGISTRY_LINT and ack alt Bare disable RegistryCLI-->>Operator: Fail closed else Acked disable RegistryCLI-->>Operator: Disabled notice, exit 0 else Enabled RegistryCLI->>SharedLib: lint_registry() including exploratory SKILL registration RegistryCLI-->>Operator: Report lint result end Operator->>StopHook: Claude Code stop hook StopHook->>SharedLib: Check FLEET_STOP_VERIFY_STRICT when repo missing alt Strict missing repo StopHook-->>Operator: JSON block decision, exit 0 else Default missing repo StopHook-->>Operator: JSON allow decision, exit 0 end%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%% sequenceDiagram participant Operator participant ReviewerCLI as run-sandboxed.sh --role reviewer participant RegistryCLI as registry_lint.py participant StopHook as stop_verify.py participant SharedLib as Shared substrate helpers Operator->>ReviewerCLI: Run reviewer command ReviewerCLI->>ReviewerCLI: Prefer sandbox-exec, then bwrap alt Real sandbox available ReviewerCLI-->>Operator: Execute in read-only reviewer sandbox else No sandbox binary ReviewerCLI->>SharedLib: Check FLEET_SECURITY_OVERRIDE_ACK alt Ack present ReviewerCLI-->>Operator: Execute with post-exec hash audit else Ack missing ReviewerCLI-->>Operator: Refuse with exit 4 end end Operator->>RegistryCLI: Run registry lint RegistryCLI->>SharedLib: Check FLEET_DISABLE_REGISTRY_LINT and ack alt Bare disable RegistryCLI-->>Operator: Fail closed else Acked disable RegistryCLI-->>Operator: Disabled notice, exit 0 else Enabled RegistryCLI->>SharedLib: lint_registry() including exploratory SKILL registration RegistryCLI-->>Operator: Report lint result end Operator->>StopHook: Claude Code stop hook StopHook->>SharedLib: Check FLEET_STOP_VERIFY_STRICT when repo missing alt Strict missing repo StopHook-->>Operator: JSON block decision, exit 0 else Default missing repo StopHook-->>Operator: JSON allow decision, exit 0 endComments Outside Diff (3)
General comment
FLEET_DISABLE_REGISTRY_LINT=1still yielded CLI rc 1,MISSION_DOCScontains extraagents-layer,contract-first-build, andscaffold-alignentries compared with the expected public values fixture, and the reviewer sandbox fallback test receives a hard refusal about missingsandbox-exec/bwrapinstead of the expected hash-audit fallback detection message.General comment
skills-lock.jsonrecordsautonomous-fleet-corewith locked hash4cf401591b7d…, while the recomputed on-disk skill hash is84bbd3e0c182…. This breaks the PR's stated security/registry validation path.skills-lock.jsonwas not refreshed after changes to theautonomous-fleet-coreskill contents, or the content change was not reverted.autonomous-fleet-corecomputedHashentry inskills-lock.jsonusing the repo's intended lock update flow, or revert the uncommitted/unlocked skill content change so the lock and on-disk files match.General comment
python3 scripts/sync_substrate_assets.py --checkfails, reporting that bundledstop_verify.pydiffers from the scripts source and thatlib/__pycache__/*.pycfiles are orphaned inside the substrate bundle. This means the substrate assets shipped with the skill are not a clean synchronized copy.skills/autonomous-fleet-core/assets/substratewas not regenerated/cleaned after source changes, and generated Python bytecode cache files are present in the bundle.scripts/sync_substrate_assets.py) and commit the resulting source/bundle parity changes; remove generated__pycache__files from the bundled substrate and ensure they are ignored going forward.Reviews (9): Last reviewed commit: "fix(registry-lint): drop duplicate explo..." | Re-trigger Greptile