Introducing a new way to review your PRs.

Read the announcement

sheeki03 / tirith

Terminal security for developers and AI agents. Intercepts homograph URLs, pipe-to-shell, ANSI injection, obfuscated payloads, data exfiltration, and malicious AI skills/configs before they execute.

View on GitHub

19 documents · Updated Nov 23, 2026

overview

Knowledge Base updated: 2026-11-22

Tirith knowledge base

Tirith is a command-safety and supply-chain security tool. It evaluates commands and execution context, applies policy and risk decisions, protects agent and MCP interactions, and records audit and provenance data.

Its primary parts are the analysis and rule engine, CLI workflows, agent/MCP gateway protections, artifact and registry intelligence, execution capsules, and audit/reporting surfaces.

Critical state includes policies and suppressions, execution receipts and provenance records, audit/event storage, ThreatDB feed data, and configuration used by CLI and integration workflows.

flowchart TD
  CLI[CLI workflows] --> Engine[Command safety engine]
  Agent[Agent context] --> MCP[MCP gateway]
  MCP --> Engine
  Engine --> Rules[Rule detection]
  Rules --> Policy[Policy and verdicts]
  Policy --> Risk[Risk scoring]
  Risk --> CLI
  Engine --> Capsules[Execution capsules]
  Capsules --> Provenance[Execution provenance]
  Engine --> Artifacts[Artifact analysis]
  Artifacts --> Intel[ThreatDB and registry intelligence]
  Intel --> Policy
  Engine --> Audit[Audit data]
  Provenance --> Audit
  Audit --> Reports[Reporting outputs]

Glossary

  • ThreatDB — Tirith's threat-intelligence data and feed source for package and ecosystem correlation.
  • Capsule — a platform-specific isolated execution boundary for child processes.
  • Receipt — a persisted record used to communicate and verify an execution or decision outcome.
  • Command card — contextual information presented when agent-originated activity requires safety guidance.
  • Verdict — the actionable decision resolved from findings, policy, approvals, and suppressions.

Codebase-wide invariants

  • Safety findings must resolve through policy and scoring before they become user-facing execution decisions; evidence: **/*policy*, **/*verdict*, and **/*risk*.
  • Agent and MCP-originated requests are subject to the same safety-analysis boundary as CLI-originated commands; evidence: **/*mcp* and **/*agent*.
  • Execution isolation and provenance records must remain associated with the child execution they describe; evidence: **/*capsule*, **/*provenance*, and **/*receipt*.
  • Threat intelligence is data-driven and must remain traceable to its manifest/feed inputs; evidence: threatdb-manifest.json and **/*threatdb*.
  • Audit/reporting outputs must preserve machine-readable safety information while applying their output-handling rules; evidence: **/*audit*, **/*sarif*, and **/*report*.

Routing table