grith.aidocs

Threat model

Formal threat model — what grith defends, what it doesn't, and where the trust boundaries sit.

This is the formal threat model. For the high-level conceptual overview, see The threat model (concept). This page is the reference for security reviewers.

Asset categorisation

AssetDescriptionSensitivity
Credentials at restAPI keys, SSH keys, cloud creds in user dotfilesCritical
Source codeProject filesHigh
Operational dataCustomer data, internal docsHigh to critical
Operating system stateFiles, processes, registry-equivalentsMedium-high
Network reachabilityOutbound destinations and reachability stateMedium
Reputation tableAccumulated trust signalsLow (leak is uninteresting; tamper is medium)
Audit logRecord of decisions madeMedium (privacy: reveals usage patterns)

Adversary types

A1: Prompt-injection attacker

  • Capability: controls some text the agent will read (README, search result, comment, error message).
  • Goal: exfiltrate credentials, deploy malicious code, pivot to other resources.
  • Threat: high. Most realistic attack today.

A2: Compromised dependency

  • Capability: controls a package or tool the agent will run.
  • Goal: as A1 plus persistence.
  • Threat: high.

A3: Compromised model

  • Capability: malicious model weights, MITM'd inference endpoint, or malicious provider.
  • Goal: as A1.
  • Threat: medium. Requires significant resources.

A4: Confused agent

  • Capability: none — agent is non-malicious but mistaken.
  • Goal: none. Mistakes happen.
  • Threat: medium. Often as costly as actual attacks.

A5: Local userland attacker

  • Capability: runs as the grith user.
  • Goal: bypass grith.
  • Threat: out of scope. Userland trust boundary is the kernel's job.

A6: Local root attacker

  • Capability: root.
  • Goal: anything.
  • Threat: out of scope.

A7: Kernel-level attacker

  • Capability: kernel exploit.
  • Goal: anything.
  • Threat: out of scope.

A8: Network-layer attacker

  • Capability: MITM between grith and grith.ai, or between grith and the agent's provider.
  • Goal: license tamper / model MITM / exfil eavesdrop.
  • Threat: low (TLS + cert pinning). Out of scope for non-TLS variants.

Filter coverage matrix

Attack classPrimary defenceSecondaryNotes
Read credential, send outsensitive_path, taint, dlp, secret_scanreputation, canaryCanary catches when others fuzz.
Read credential, leak via summarydlp, secret_scanegress, reputationModel summary can defeat taint; dlp catches if content shape persists.
Pivot to other projectpath_match, session_containmentsensitive_pathZone enforcement.
Privilege escalationcapability, commandrate_limitHard gate via capability.
Lateral via shellcommand, egressrate_limit, behaviouralCommand parser.
Persistent backdoor (file write)path_match, sensitive_pathbehaviouralWrites outside project.
Beaconing / C2egress, reputationbehavioural, rate_limitAdaptive trust.
Confused agent destructiveoperation_risk, sensitive_pathpath_matchScore lifts on rm-shaped.

Defence-in-depth properties

  • Composition: every call routes through every applicable filter. No single-filter failure compromises the whole pipeline.
  • Determinism: filters don't depend on the model's behaviour, only on the syscall and session state.
  • Hard gates: canary detection and capability enforcement bypass scoring to deny unconditionally.
  • Cold start: new installs widen the queue zone to avoid pathological auto-allow on uncalibrated state.

What grith doesn't promise

  • Bypass impossibility: a determined attacker with sufficient cleverness in prompt construction may find a sequence of calls that, individually, all auto-allow but composed effect a leak. Mitigations: canary, behavioural, cross-session analytics (Pro).
  • Future-proof signatures: secret_scan and dlp_gate have curated pattern sets. New credential formats won't be detected until added.
  • Side-channel defence: timing-based DNS exfil, slow-and-low patterns — partially covered by behavioural, not formally guaranteed.

See also

Last updated: 2026-05-14Edit this page on GitHub →
© 2026 grith. All rights reserved.