Sentinel is an offline-first security scanner for AI applications, agents, prompts, MCP servers, workflow files, and repository configuration. It is designed for the AI security risks that traditional application scanners usually miss: prompt injection, jailbreak content, secret leakage, unsafe tool exposure, excessive agent permissions, and risky automation.
Install the latest release on Linux or macOS:
curl -fsSL https://raw.githubusercontent.com/notzenco/sentinel/main/scripts/install.sh | shInstall the latest release on Windows PowerShell:
iwr https://raw.githubusercontent.com/notzenco/sentinel/main/scripts/install.ps1 -UseB | iexRelease archives include SHA-256 checksum files. The install scripts verify checksums before copying the binary.
cargo install --path apps/clisentinel scan .
sentinel scan prompts/ --json
sentinel scan mcp/ --sarif --output sentinel.sarif
sentinel scan . --html --output report.html
sentinel scan . --severity high
sentinel scan . --only-rule MCP001
sentinel scan . --exclude-rule PROMPT004
sentinel ci . --fail-on high
sentinel claude .
sentinel cursor .
sentinel rules validate rulesExample terminal output:
Sentinel Security Scan
Target: examples
Files scanned: 9
Security Score: 0/100
Findings: 10 critical, 14 high, 1 medium, 0 low, 0 info
Severity Confidence Rule Title Location
------------------------------------------------------------------------------------------------
critical high MCP001 Dangerous MCP tool exposed mcp-server/server.json:5
high high PROMPT001 Prompt instruction override vulnerable-prompts/system.md:3
- Prompt injection phrases such as instruction overrides, system prompt disclosure requests, and tool coercion.
- Jailbreak attempts such as unrestricted roleplay, policy evasion, and stay-in-character chains.
- Secrets including OpenAI, Anthropic, GitHub, AWS, database URLs, JWTs, Azure storage connection strings, and high-entropy secret assignments.
- Structured AI config risks in MCP, Claude Code, Cursor, OpenAI Agents, LangGraph, CrewAI, and AutoGen files.
- MCP and agent risks including dangerous tools, unrestricted filesystem/network access, root execution, database admin access, recursive self-calls, unbounded execution, automatic approval, and explicit upload/webhook destinations.
- GitHub Actions risks including
pull_request_target, broad token permissions, remote script execution, and mutable action references.
Sentinel does not upload source code or prompts. The first implementation is deterministic and offline.
Terminal output is the default and includes a score, severity counts, and a finding table.
JSON output uses this stable shape:
{
"tool": "sentinel",
"version": "0.1.3",
"summary": {
"target": ".",
"scanned_files": 12,
"findings_count": 1,
"score": 85
},
"findings": [
{
"id": "SENT-0001",
"rule_id": "PROMPT001",
"title": "Prompt instruction override",
"description": "The prompt contains language that attempts to override higher-priority instructions.",
"severity": "high",
"confidence": "high",
"category": "prompt_injection",
"location": { "path": "prompts/system.md", "line": 1, "column": 1 },
"recommendation": "Treat this content as untrusted input and isolate it from system or developer instructions."
}
]
}SARIF output targets GitHub code scanning. HTML output creates a self-contained report file.
Rules are YAML files under rules/ and use version: 1.
version: 1
id: MCP001
name: Dangerous Shell Execution
category: mcp_security
severity: critical
confidence: high
description: Detects command execution tools exposed through MCP.
recommendation: Remove the tool or restrict it with explicit approval and allowlists.
match:
regex:
- '(?i)"name"\s*:\s*"execute_shell"'
path_contains:
- mcpSupported match fields are text, regex, file_extensions, path_contains, tool_name, and config_key. Sentinel emits at most one finding per rule per file so multi-pattern rules do not flood reports.
Validate a local rule pack before using it in CI:
sentinel rules validate rulesBuilt-in config findings use stable ids by family:
MCP###for MCP server and tool exposure risks.AGENT###for autonomy, approval, and permission risks.EXFIL###for explicit external send, upload, webhook, or callback risks.
Sentinel automatically loads sentinel.yml from the working directory when present. Use --config <file> to select a specific config file.
rules_dir: rules
exclude:
- target/**
- examples/**
- rules/**
max_file_bytes: 2097152Relative rules_dir values resolve from the config file directory. Exclude patterns match repository-relative paths.
Common AI config scans:
sentinel scan .claude
sentinel cursor .
sentinel scan langgraph.json
sentinel scan crew.yaml
sentinel scan autogen/See docs/ai-config-detection.md for supported config families and conservative detection behavior.
Use a local suppression only for intentional fixtures or documented examples:
sentinel:ignore PROMPT001 documented red-team fixture
Suppressions apply to the line containing the directive and the immediately following line. A directive may name a rule id, category, or all.
Use the repository action in a workflow:
name: Sentinel
on:
pull_request:
push:
branches: [main]
jobs:
scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: notzenco/sentinel@v1
with:
path: .
fail-on: high
sarif-output: sentinel.sarifFor this source tree, use uses: ./ after checkout.
apps/cli CLI binary
crates/ai-config AI config discovery and structured parsing
crates/scanner scan orchestration
crates/findings public finding/report types
crates/rules YAML rule parsing and text matching
crates/prompt-analysis prompt injection checks
crates/jailbreak-analysis jailbreak checks
crates/secret-analysis secret and entropy checks
crates/mcp-analysis MCP and agent configuration checks
crates/github-actions workflow checks
crates/sarif SARIF 2.1.0 output
crates/html-report self-contained HTML reports
rules/ default rule pack
docs/ architecture, threat model, ADRs
cargo fmt --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspaceMaintainers cut releases by pushing a version tag:
git tag -a v0.1.3 -m "v0.1.3"
git push origin v0.1.3The release workflow builds Linux, macOS Intel, macOS Apple Silicon, and Windows x64 archives, publishes SHA-256 checksums, and smoke-tests the published install scripts against the release assets.