Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/WORKSPACE_ACCESS_AUDIT.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ scans the Simplicio-owned source scopes and emits
`simplicio.workspace-access-manifest/v1`.

Every direct filesystem, process, or tree-walk call site must have an owner,
rationale, and classification. `violation` and unclassified findings fail the
rationale, and classification. The audit rejects manifest rules that omit a
non-empty owner or rationale before scanning source. `violation` and unclassified findings fail the
gate; test fixtures and the short bootstrap allowlist remain explicit. The
manifest intentionally records the current `xai-grok-workspace` bypasses as
violations so the audit cannot be mistaken for proof that the migration is
Expand Down
5 changes: 5 additions & 0 deletions scripts/audit_workspace_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ def audit(root: Path, manifest: Path) -> dict[str, Any]:
rules = spec.get("rules")
if not isinstance(rules, list):
raise ValueError("manifest rules must be a list")
for index, rule in enumerate(rules):
if not isinstance(rule, dict):
raise ValueError(f"manifest rule {index} must be an object")
if not str(rule.get("owner", "")).strip() or not str(rule.get("rationale", "")).strip():
raise ValueError(f"manifest rule {index} requires owner and rationale")

findings: list[dict[str, Any]] = []
for scope in spec.get("scopes", ["crates/codegen"]):
Expand Down
1 change: 1 addition & 0 deletions scripts/tests/test_workspace_access_audit.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ def test_baseline_allows_removing_an_occurrence(tmp_path):
[
({"schema": "wrong"}, "unsupported manifest schema"),
({"rules": {}}, "manifest rules must be a list"),
({"rules": [{"path": "src/**", "kind": "process", "classification": "bootstrap-allowlisted", "owner": ""}]}, "requires owner and rationale"),
({"baseline": {}}, "manifest baseline must be a list"),
({"baseline": ["bad"]}, "baseline entries must be objects"),
({"baseline": [{}]}, "baseline entries require"),
Expand Down
Loading