Skip to main content

Crate agentshield

Crate agentshield 

Source
Expand description

AgentShield — Security scanner for AI agent extensions.

Offline-first, multi-framework, SARIF output. Scans MCP servers, OpenClaw skills, and other agent extension formats for security issues.

§Quick Start

use std::path::Path;
use agentshield::{scan, ScanOptions};

let options = ScanOptions::default();
let report = scan(Path::new("./my-mcp-server"), &options).unwrap();
println!("Pass: {}, Findings: {}", report.verdict.pass, report.findings.len());

Modules§

adapter
analysis
baseline
Baseline schema for tracking known findings across scan runs.
certify
DSSE envelope and in-toto attestation for scan results.
config
doctor
egress
Egress policy module for runtime network enforcement.
error
fix
ir
Unified Intermediate Representation for agent extension analysis.
output
parser
rules
ux

Structs§

ScanOptions
Options for a scan invocation.
ScanReport
Complete scan report.

Functions§

render_report
Render a scan report in the specified format.
render_report_with_experimental_risk
Render a scan report with the opt-in experimental informational risk index.
scan
Run a complete scan: detect framework, parse, analyze, evaluate policy.
scan_with_path_filter_overrides
Run a complete scan with optional include/exclude patterns layered on top of the scan configuration.