Task 1.2: introduce a single path resolver so no harness script hardcodes
`.specify/...` scattered across the tree. casan-paths.sh resolves four roots
(HARNESS/STATE/GOVERNANCE/APP) by marker-based walk-up from its own location —
never `git rev-parse` (git root is the repo PARENT here, not the app dir).
- 101 bash scripts/tests: 238 hardcoded `$PROJECT_ROOT/.specify/...` refs rewritten
to CASAN_HARNESS_ROOT (code) / CASAN_STATE_ROOT (logs,state) / CASAN_GOVERNANCE_ROOT.
Sandbox test vars ($WORK/$TP/$FP/$T1_WORK) left untouched.
- Roots are NOT exported: each script/subprocess self-resolves from its own tree,
matching the original per-script semantics and preserving hermetic sandbox isolation
(node casan-step.mjs, copied telemetry/rollback scripts must not inherit real roots).
- Sandbox tests that copy a harness script now also copy casan-paths.sh (its new
sibling dependency): adversarial (verify-audit-chain/verify-tool-audit/rollback) +
track-a (security-check/telemetry-integrity).
- control-plane-settings.json reclassified as STATE (untracked runtime store).
Roots all still resolve to `.specify` in this monolithic layout, so behavior is
unchanged. Full gate: PASS=64 FAIL=0 SKIP=3 (adversarial 44/0, track-a 25/0).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
C1 (V17) action-gate.sh: gates the ACTION, not just the tool name. Outcome model
ALLOW/WARN/REQUIRE_APPROVAL/BLOCK. BLOCK on sensitive-file writes (.env, *.pem,
id_rsa, .github/workflows, .ssh, .aws/credentials, .npmrc) and destructive/
remote-exec commands (rm -rf /, curl|bash, chmod 777, git push --force);
REQUIRE_APPROVAL on dependency installs and non-local network egress (clears
only with an audited CASAN_ACTION_APPROVER). Decisions logged to action-gate.jsonl.
C2 (V18) supply-chain-gate.sh + supply-chain-scan.py: diffs package.json /
requirements.txt / pom.xml / build.gradle against a baseline (explicit or git
HEAD). BLOCK on denylisted/known-malicious packages, typosquats (edit-distance 1
to a known package), and dangerous lifecycle scripts (pre/post/install);
REQUIRE_APPROVAL on any new dependency. Emits a dep-diff report and records
which live scanners (npm audit / pip-audit / osv-scanner) are available.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>