Skip to main content

Stop your AI agents from breaking things. Intercepts every action and blocks the dangerous ones before they execute.

Project description

Vectimus

Deterministic governance for AI coding tools and autonomous agents.

The problem

AI coding agents execute shell commands, write files, install packages and call APIs with no guardrails. The Clinejection attack in February 2026 compromised over 4,000 developers when a malicious MCP server instructed agents to publish backdoored npm packages. A month earlier, an autonomous agent ran terraform destroy against a production environment because nothing stopped it. Without governance, every agent is one prompt injection away from catastrophe.

What Vectimus does

Vectimus intercepts every action an AI agent takes and evaluates it against Cedar policies before execution. It returns allow, deny or escalate decisions in single-digit milliseconds. It works across Claude Code, Cursor and GitHub Copilot through their native hook mechanisms.

┌─────────────┐     ┌───────────────┐     ┌──────────────┐     ┌──────────┐
│  AI Agent   │────▶│   Vectimus    │────▶│ Cedar Policy │────▶│ Decision │
│ (tool call) │     │  Normaliser   │     │   Engine     │     │ allow /  │
│             │◀────│               │◀────│              │◀────│ deny     │
└─────────────┘     └───────────────┘     └──────────────┘     └──────────┘
                           │
                           ▼
                    ┌──────────────┐
                    │  Audit Log   │
                    │  (JSONL)     │
                    └──────────────┘

Quick start

Two commands. 81 rules active out of the box.

pip install vectimus
vectimus init

Or with uv:

uv pip install vectimus
vectimus init

That's it. Your agents are now governed. Dangerous commands, secret access, infrastructure changes and supply chain attacks are blocked before execution.

Observe mode

If you want to trial Vectimus without blocking anything, observe mode logs all decisions to the audit trail but always allows actions.

vectimus observe on       # Enable observe mode
vectimus observe off      # Switch to enforcement
vectimus observe status   # Show current mode

Review the audit log at ~/.vectimus/logs/ to understand which actions your policies would block. For CI pipelines, set VECTIMUS_OBSERVE=true as an environment variable.

Uninstall

To remove Vectimus hooks from all detected tools in the current project:

vectimus remove

This strips Vectimus entries from your tool configs while preserving any non-Vectimus hooks. Your ~/.vectimus/ config and audit logs are not touched.

Supported tools

Tool Hook mechanism Status
Claude Code HTTP hook or command hook Supported
Cursor Command hook Supported
GitHub Copilot (VS Code) Command hook Supported

Example policy

@id("vectimus-base-015")
@description("Block npm publish to prevent supply-chain attacks")
@incident("Clinejection: malicious npm packages published by compromised AI agent, February 2026")
@controls("SLSA-L2")
forbid (
    principal,
    action == Vectimus::Action::"package_operation",
    resource
) when {
    context.command like "*npm publish*"
};

Every rule references the real-world incident that motivated it. Governance rules that exist "because best practice" are weak. Rules that exist because a specific attack compromised thousands of developers are compelling.

MCP server governance

Vectimus blocks all MCP tool calls by default. During vectimus init, it reads your existing tool configs (Claude Code, Cursor, VS Code) and offers to approve the MCP servers you already use:

MCP servers detected:
  Claude Code:  posthog, slack
  Cursor:       github

Allow all 3 servers? [y/N]:

To skip the prompts and approve everything automatically:

vectimus init --allow-mcp

You can also manage the allowlist manually at any time:

vectimus mcp allow github
vectimus mcp allow slack
vectimus mcp list

Or via environment variable for CI/CD:

export VECTIMUS_MCP_ALLOWED="github,slack,jira"

Approved servers still go through input inspection rules that check for credential paths, CI/CD file tampering and dangerous commands in tool parameters. See Writing policies for details.

Per-project rule overrides

Disable specific rules for specific repositories without affecting global policy:

# Disable a rule for the current project only
vectimus rule disable vectimus-base-010

# Disable a rule everywhere
vectimus rule disable vectimus-base-010 --global

# View project-specific overrides
vectimus rule overrides

Overrides are stored in .vectimus/config.toml in the project root. The .vectimus/ directory is protected by policy — agents cannot modify it.

Documentation

Configuration

Create a vectimus.toml in your project root:

[policies]
dir = "./policies"

[server]
host = "0.0.0.0"
port = 8420

[logging]
dir = "~/.vectimus/logs"

[mcp]
allowed_servers = ["github", "slack"]

[identity]
resolver = "git"

Or use environment variables:

Variable Purpose
VECTIMUS_POLICY_DIR Policy directory path
VECTIMUS_SERVER_URL Server URL for hook forwarding
VECTIMUS_LOG_DIR Audit log directory
VECTIMUS_OBSERVE Set to true for observe mode
VECTIMUS_MCP_ALLOWED Comma-separated approved MCP servers
VECTIMUS_API_KEY API key for server authentication

Contributing

Contributions are welcome. Please open an issue before submitting large changes.

  1. Fork and clone the repository
  2. Install dev dependencies: uv pip install -e ".[dev]"
  3. Run tests: pytest
  4. Run linting: ruff check src/ tests/

License

Apache 2.0. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vectimus-0.14.1.tar.gz (191.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vectimus-0.14.1-py3-none-any.whl (87.7 kB view details)

Uploaded Python 3

File details

Details for the file vectimus-0.14.1.tar.gz.

File metadata

  • Download URL: vectimus-0.14.1.tar.gz
  • Upload date:
  • Size: 191.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for vectimus-0.14.1.tar.gz
Algorithm Hash digest
SHA256 82a6d5950279e3e31663b28ab642d8b66fbec2c1aba446e2701ee6b3e1793e36
MD5 622964d38e12bbdfcaade378074ab393
BLAKE2b-256 ddd5d03d366756065e211672a655451c42dc1472aff66ae48e82e23dcb50ec68

See more details on using hashes here.

File details

Details for the file vectimus-0.14.1-py3-none-any.whl.

File metadata

  • Download URL: vectimus-0.14.1-py3-none-any.whl
  • Upload date:
  • Size: 87.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for vectimus-0.14.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1dd1003379a8bc14621b4af420a705a96273b84d6ff5fb17b0b36aaeda90c935
MD5 d9d994c56b9682d1d45a3581c142d623
BLAKE2b-256 cdcd66112416d840b6c5e84e4032347b6e84daa848df5732de3cc5de3fc81d82

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page