Repository navigation
Move the example policy to acs.examples and check the import direction - #486
bar-capsule wants to merge 2 commits into
Conversation
The destructive-command patterns move to acs.examples, and an import-linter contract keeps imports flowing integrations, client, core. Signed-off-by: Bar Kaduri <bar@capsule.security>
Each mapping page says its adapter covers the ACS-Core floor its table lists. Signed-off-by: Bar Kaduri <bar@capsule.security>
drk-ram
left a comment
There was a problem hiding this comment.
Reviewed commit c59c00e8c7c37a019a09c802546bcd45fa3a036a against its stated stacked base.
No additional blocking finding in this slice.
The policy move preserves the pattern set, scan cap, and both scanner bodies exactly; I compared their parsed syntax trees against the parent, accounting only for the matcher's public rename. The Guardian imports the matcher it actually calls. Both import contracts pass and cover the intended dependency direction plus the prohibition on production-layer imports from Guardian, example, or testing packages. The lockfile adds only grimp and import-linter, with the corresponding local-package metadata update.
The focused matcher tests below passed on Windows/Python 3.11; lint-imports kept both contracts. The broader selection had 119 passed, 10 failed, and 4 setup errors, including the inherited Windows state-publication issue raised on #483 and POSIX-only permission/Guardian fixtures. This is approval of the extraction and import-rule delta, not clearance of those lower-stack issues.
Local validation (from adapters, Python 3.11):
python -m pytest tests/common/test_security.py -k "Item12 or Item13" -q --tb=short
Result: 7 passed, 39 deselected in 0.27s
|
Closing this slice because PR #22 (the reference adapters for Claude Code, Cursor and NAT) merged into integration as 2630ec2, and that merge carries every slice in this stack. The top of the stack had the same files as PR #22's final commit, so nothing in this slice was left behind. Thanks, Bar, for cutting the adapters into pieces this size, because it made the review possible. |
Stacked on #485. Next: #487. The full stack is listed in #22.
What changed
acs/guardian/example_guardian.pytoacs/examples/destructive_bash.py; the example Guardian imports the matcher it uses.import-lintercontract keeps imports flowingintegrations → client → core, and keeps all three from importingacs.guardian,acs.examplesoracs.testing. CI runsuv run lint-imports.acs/examplesand the import rule, and namesACS_REQUIRE_PROFILESamong the settingsConfigreads. A security test patches the state directory instead of reloadingacs.client._store.c59c00e8qualifies the mapping pages' conformance claim to match the adapters README: they cover the floor their tables list, not full ACS-Core conformance, and name the three Core requirements from later specification changes that Align the adapters with the current spec #488 then implements (Fix the HMAC key derivation, define key_id, and record an unresolved request_id_ref #272, Record every decision failure and count them at session end #273, and a signature on every request).Ariel's findings this answers
examples/split and theimport-lintercontract.Which issue does this implement
Part of #134
Base branch
Stacked on #485, not on
integration. It lands through #22; see the stack in #22.Type of change
I tested this
At this slice's top (
c59c00e8), withclauderemoved from PATH andACS_LIVE_CLAUDEandACS_SPEC_DIRunset: 456 passed and 3 expected skips with the NAT extra, 392 passed and 3 expected skips without it. The skips are the two opt-in live Claude Code tests and the manual Cursor procedure. CI passes on this PR, includinglint-importsand the installed-wheel check on Python 3.11 and 3.12.Checklist
git commit -s(required by the DCO)Security
Unchanged decisions; the example policy moves, and the import direction is checked.