Skip to main content

Threat Model#

Scope: the ACKit CLI, its MCP server, and every artifact they generate. Default trust stance (REQ-SEC-002): repository content is UNTRUSTED input. Every threat below is from MS§26 and names its deterministic mitigation and the regression surface that keeps it closed.

#ThreatMitigationRegression coverage
T1Malicious instruction/skill content (prompt poisoning)Advisory-only analysis with deterministic evidence; no LLM verdicts; hidden-unicode/external-ref/root-escape flagsTASK-0273 fixtures (ACKIT310-314), no-critical-without-evidence policy
T2Malicious links / external referencesExternal URLs flagged as advisories; nothing is fetched at runtimereferences scan + network-spy test in policy resolution
T3Data exfiltration via generated artifactsOffline-first: zero network calls in product code; packs scrub machine-local absolute paths; secrets hard-excluded from pack candidatesREQ-GOV-001/002 sweep, context-pack exclusion tests
T4Skill/policy poisoning through install/syncOwnership lock (skills.lock.json) with checksums; third-party names refused; locked rules cannot be weakenedskills install tests (refused-third-party), POL-LOCKED-CONFLICT
T5Unsafe script execution (skill scripts/)Scripts are detected and reported, NEVER executedchild_process spy test asserting zero invocations
T6Plugin/code-execution riskNo JS plugin system; policies are declarative YAML onlyADR-0011 boundary; grep-gate on final gate
T7Supply-chain compromise of dependenciesMinimal dep set, lockfile frozen, CI installs with --frozen-lockfile, Actions pinned by SHA (TASK-0286)CI config tests
T8Path traversal / root escape via links or globsEvery access passes normalize→realpath→containment against canonical root; escapes denied with FS-PATH-ESCAPES-ROOTfilesystem security fixture suite (Windows+POSIX CI)
T9Secret leakage into reports/logs/terminalRedaction at finding construction before any reporter; baselines store structural fields only; pack excludes secret-shaped filesredaction regressions across terminal/JSON/SARIF/HTML
T10Terminal/ANSI injection & log forgingAll diagnostic/report text sanitized (ANSI escape + C0 control stripping)diagnostics unit tests
T11Resource exhaustion (huge repos/files)Engine-level limits (maxFiles/maxFileBytes/maxTotalBytes/maxDepth/deadlineMs) each emitting diagnostics; watch debounce coalescingwalk-limits suite
T12Symlink/junction cyclesVisited-canonical-set termination with FS-CYCLE-SKIPPEDcyclic-link fixture
T13Malformed inputs (YAML/frontmatter/config)Real parsers with structured errors carrying file:line; walker never crashes on unreadable entriesconfig error snapshots, dangling-link fixture
T14Malicious glob patterns (ReDoS/overreach)Conservative glob engine (picomatch), user excludes validated by zod before fs layer; applyTo unreachable-glob advisoryconfig validation tests
T15Dangerous MCP writesServer ships read-only tools ONLY; any future write tool requires an explicit capability-gate design (documented in TASK-0283)tools/list contract test asserting exact read-only set
T16Malicious repository content altering workflow state (.ackit/workflow/)State files are strict-schema validated (unknown fields rejected); ids validated ^TASK-\d{4}$ before any path construction; writes contained under canonical root; workflow state is advisory to the committed task docTASK-0045 workflow store unit tests (tamper + traversal fixtures)
T17Forged evidence (fabricated verification records)Criterion source of truth is the committed task doc; registry criteria must match it (forged ids rejected); evidence refs are length-capped, secret-gated strings never executed; manual-only evidence insufficient unless configuredTASK-0050 evidence validation tests + TASK-0060 forgery security tests
T18Forged verifier verdictVerifier authors ackit.verdict.v1; ACKit persists state-bound ackit.verdict.v2 (binding + reviewed-bundle reference); registration validates task existence, criterion references, and blocking-finding/verdict consistency; append-only store (a REWORK verdict cannot be overwritten, only superseded by a later registered verdict)TASK-0052 verdict validation matrix + TASK-0060 forgery tests
T19Path traversal in artifact refs (intent/spec/plan/verdict/checkpoint ids and paths)All ids regex-validated before path construction; all path refs repository-relative POSIX and containment-checked against the canonical root; absolute paths rejectedTASK-0046/0047/0048/0052 traversal security tests
T20Stale checkpoint reuse (resuming against moved git state)ackit checkpoint validate compares recorded gitHead/changed-areas vs current; STALE_CHECKPOINT finding; git-unavailable is an explicit advisory, never a fabricated fresh stateTASK-0048 staleness tests
T21Task-id collision / cross-repository artifact confusionWorkflow/evidence/verdict/checkpoint state keyed under per-repository .ackit/workflow/TASK-####/; a task id resolves only inside the canonical root that owns it; stores refuse ids that do not exist in the owning task setTASK-0060 cross-repo confusion test
T22Manipulated git state feeding drift/bundle surfacesgit is invoked read-only through the existing bounded runner; outputs used only for deterministic comparisons; failures degrade to explicit advisories, never silent assumptionsTASK-0051 drift input tests (git-unavailable paths)
T23Policy bypass (autonomy tier evasion)Deny in any active layer denies; --force completion override is itself tier2-enforced (POLICY-TIER-DENIED exit 4); enforcement points enumerated in ADR-0028; non-tty ask is treated as deny (no silent bypass)TASK-0054 enforcement tests
T24Unsafe hook execution / shell injection via configGate schema is declarative-only and structurally cannot represent commands (contract test proves command/script/run fail validation); the only executed hook is the user-installed managed pre-commit block invoking the repository-built ACKit CLITASK-0055 no-execution schema test
T25Provider-specific metadata spoofing (verifier agent labels, role claims)verifier.agent is a bounded free-form label never resolved or executed; role contracts are data-only; bundles embed the built-in verifier contract that cannot be shadowed by repository contentTASK-0052/0056 validation + non-shadowing tests
T26Secret/absolute-path leakage into new artifacts (bundles, checkpoints, resume, journal)Same canonical secret-gate and scrubber as packs run over every emitted surface (defense in depth, single rule source); journal redacts at construction with a closed event-kind listTASK-0048/0052/0058 output gates + TASK-0060 offline-runtime extension

Out of scope by product decision (REQ-GOV-009): LLM APIs, vector stores, SAST/SBOM platforms, cloud services — these surfaces cannot introduce threats because they do not exist.

The workflow expansion (ADR-0025..0028) adds no new trust boundary beyond untrusted repository/local content processed by strict validators: no network surface, no executable content, no provider interception. Rows T16–T26 above cover its specific forgery/tamper/traversal/policy threats; each row names the task whose regression tests keep it closed.

Offline-first guarantee (v0.2.1)#

The product/runtime never initiates outbound network access. Distribution/maintainer steps may use the network (npm install/publish, Actions download, Marketplace), but repository analysis/runtime never sends content anywhere.

  • Static gate: scripts/check-offline-egress.mjs + tests/security/offline-egress-contract.test.ts forbid fetch, node:https, http.request/get, net.connect, tls.connect, dgram, dns.resolve, WebSocket, EventSource, axios/got/undici, curl, git network commands. Allowlist: node:http only in src/core/dashboard/server.ts / src/core/reporting/serve.ts for localhost createServer; fetch('/api/...') relative only (no absolute/protocol-relative/dynamic).
  • Runtime harness: tests/security/offline-runtime.test.ts patches fetch, http.request/get, https.request/get, net.connect, Socket.connect, tls.connect, dgram, dns, WebSocket, EventSource and runs doctor, scan, scan --ci, readiness, instructions, pack, optimize, diagnostics, rule-pack evaluation, SDK and MCP consumers — all pass without egress. Dashboard/report may bind 127.0.0.1 loopback only; non-loopback requires --allow-nonlocal warning (see assertBindableHost).
  • Policy isolation: rule packs and provider profiles refuse http/https/ftp locations (POL-NETWORK-REFUSED, PROFILE-NETWORK-REFUSED); missing npm packs are not auto-fetched (POL-OFFLINE-BLOCKED); provider profiles are bundled/local, no API calls; MCP is stdio-only (src/mcp/stdio.ts + McpServer); VS Code extension has no telemetry/network client.

Permanent CI enforcement: scripts/check-offline-egress.mjs + tests/security/offline-* run in normal ci.yml verify job, not release-only. A future commit introducing outbound primitives fails CI (allowlisted loopback servers excluded). Manual verification: node scripts/check-offline-egress.mjs must show PASS and pnpm test must show 21 offline tests green.

Reporting: see SECURITY.md for private vulnerability disclosure.

v0.5 adversarial containment delta (TASK-0084)#

Live adversarial matrix (tests/security/adversarial-paths.test.ts, executed against the built CLI/MCP on Windows; symlink-file rows are OS-gated and additionally execute on Linux/macOS CI): absolute paths, ..//nested/backslash traversal, NUL bytes, file-symlink reads, dir symlink/junction writes, Windows case semantics, repo-root boundary, task-title injection, MCP hostile ids, and the explicit-output contract.

#ThreatMitigationRegression coverage
T27CLI --out write escape via planted links/junctions (lexically contained path redirected outside the root)Link-aware write containment (resolveContainedWritePath: string-level refusal plus realpath of the nearest existing ancestor and of pre-existing final paths against the real root), wired into all root-contained --out writers (verification bundle, checkpoint md/json export, skills export) and the skills scaffold fixed pathMatrix R12/R13 refusal rows + helper regression suite (dir/junction/file-link refusal, legit nested writes)
—Preventive MCP path allow-list (contested proposal)REJECTED on evidence: string containment + link-aware writes + strict id patterns + schema validation on every read already close the matrix; a parallel allow-list would be redundant configuration with its own bypass surfaceMatrix negative findings R1–R11/R15–R20 + allow-list decision record in TASK-0084

Negative findings (contained, no change): file-symlink reads (schema validation is the boundary — attacker-owned bytes cannot become verdicts/bundles/handoffs); scan/diagnostics free --output paths (operator-explicit contract relied upon by CI runner-temp recipes); task titles (slug folding makes traversal unrepresentable); MCP free paths (none exist — root confined at construction, ids pattern-guarded). Known residual (accepted, out of scope): hardlinks aliasing outside files are invisible to any realpath-then-contain scheme — low exploitability (git cannot transport hardlinks; requires a local plant plus an operator --out through the exact path). No new config surface was added.