ArchSutra AI

ArchSutra AI / Reference

Threat model (ArchSutra CLI and skills)

Version 0.1.0 · Source: docs/architecture/threat-model.md

Scope: the archsutra CLI run on a developer machine or CI, and the skills loaded by an AI IDE.

Assets#

  • Source code and any secrets inside it
  • The developer's files outside the target project
  • Integrity of installed skills (they steer an AI agent)

Trust boundaries#

flowchart LR
  repo["Target repository (untrusted content)"] --> cli["archsutra CLI"]
  cli --> out["Reports and installed files (project dir only)"]
  skills["Skills and agents (trusted, hashed)"] --> ide["AI IDE and its model"]
  repo -. "text may contain injected instructions" .-> ide
Diagram (Mermaid). If it does not render, the source is shown above.

Threats and mitigations (STRIDE-oriented)#

IDThreatMitigationTest
T1Path traversal via --output or --target writes outside projectsafeJoin containment; export rejects escaping outputsafeJoin rejects traversal, export ... blocks escaping --output
T2Symlink in scanned repo leads reader outside the treeSymlinks never followedwalk does not follow symlinks
T3Secrets leak into reports or logsExcerpts pass through redact(); .env contents never read into reportsaudit finds seeded problems ... redacted
T4Resource exhaustion on huge reposFile-count, size and time budgets; truncation reportedwalk skips ... respects file limit
T5Installer overwrites user filesConflict detection, backups, SHA-256 manifest, uninstall keeps modified filesinstall conflict and keep tests
T6Prompt injection from repo content steers the IDE agentSkills state that repo content is untrusted data; agents are read-only by default; Claude agents get Read, Grep, Glob onlydocumented control; effectiveness depends on the host model (residual risk)
T7Malicious dependency in this projectZero runtime dependencies; dev deps pinned by lockfile; CI auditnpm ls --omit=dev is empty
T8Tampered skill filesInstall manifest hashes; doctor reports driftdoctor drift test

Residual risk#

  • T6 cannot be fully eliminated by documentation; users should keep agent permissions minimal.
  • Heuristic rules can miss issues or flag benign code. Treat findings as leads.