AgentSec Triage

September 1, 2026 · View on GitHub

Florian Bruniaux Florian BRUNIAUX · AI Founding Engineer @ Méthode Aristote
13 years from developer to CTO / VP Eng · Blog ↗ · Projects ↗

Tests Python 3.11+ Status: alpha

Turn sourced threat intelligence into deterministic checks for local repositories. AgentSec scans one explicit root, reports what it inspected, and fails closed when applicable evidence cannot be read reliably.

Scans are read-only and offline by default. AgentSec does not certify that a repository, workstation, dependency set, or account is clean.

AgentSec workflow: repository source, lockfiles, and agent configuration pass through a bounded offline scan, campaign detection, coverage-aware reporting, and manual response outputs.

AgentSec is a public source repository in alpha. Install it from a checked-out copy; no package or tagged release is authorized yet.

Start here

GoalCommand or guideResult
Install from sourceInstallation guideLocal agentsec command and runtime verification
Check the installationagentsec doctorDatabase, schema, and packaged-resource status
Scan one repositoryagentsec scan /path/to/repo --progress --verbose --redactHuman verdict with phase and bounded progress details on stderr
Produce machine outputagentsec scan /path/to/repo --format json --redactVersioned scan-result v2 JSON
Export for code scanningagentsec scan /path/to/repo --format sarif --redact > agentsec.sarifSARIF 2.1.0 with completion and coverage metadata
Explain one detectoragentsec detectors explain shai-hulud-keyvRules, inputs, sources, limits, and not_scanned capabilities
Scan an explicit listagentsec batch /repo/a /repo/b --format json --redactOrdered batch result with aggregate exit status

Read the examples and verdict guide before automating the result. Exit code 2 means incomplete coverage, not success.

When to use AgentSec

Use AgentSec before trusting a repository with a coding agent, after a tracked campaign disclosure, or in CI when you need repository-local evidence tied to reviewed threat intelligence.

NeedUse AgentSec?
Check supported lockfiles, package metadata, payload hashes, hooks, or skill instructions against an implemented campaign detectorYes
Know which applicable inputs were inspected, skipped, unsupported, or unreadableYes
Find general application vulnerabilities, secrets, or every vulnerable dependencyNo. Add SAST, secret scanning, and SCA tools.
Inspect running processes, network traffic, credentials, persistence, live MCP servers, or registry historyNo. Use host and runtime controls.

AgentSec differs from broad repository and agent scanners through traceability: each active rule links a reviewed source, campaign evidence, a deterministic fixture, a finding, stated coverage, and response guidance. Its current breadth is smaller than several alternatives, so it should complement rather than replace general security tooling. See when to use AgentSec and how it compares and the dated scanner ecosystem study.

AgentSec grew from the threat database behind the Claude Code Guide security page. A scan does not query that website: it uses a validated, versioned database bundled with the installed source, then reports the database version in its output. AgentSec exports reviewed metadata back to the guide and landing page, and CI rejects feed drift. The page tracks more intelligence than the two detector families currently implemented by the scanner.

What it checks today

AgentSec currently ships two detector families. The wider intelligence catalogue contains research that has not been promoted into executable checks.

DetectorRepository evidenceMain inputs
shai-hulud-keyvDocumented compromised package versions, payload hashes, lifecycle scripts, and repository startup hooks associated with the Shai-Hulud/Keyv campaignSupported npm, pnpm, Yarn, and text Bun lockfiles; installed package metadata; .claude settings; VS Code tasks; regular-file SHA-256
clawhavoc-skillExact bundled campaign domains in SKILL.md or explicitly delegated same-skill setup instructionsRepository-local SKILL.md and referenced Markdown setup files

Run agentsec detectors explain DETECTOR_ID --format json for the current coverage contract. Binary bun.lockb, Git history, remote repositories, registry history, remote payloads, runtime behavior, host credentials, and host processes are not inspected.

Concrete examples

These examples come from inert test fixtures shipped with AgentSec.

What AgentSec surfacesExampleWhat it means
Compromised dependency versioncritical / confirmed / package-lock.json / keyv@6.0.0The exact package-version pair matches bundled campaign intelligence. It proves the resolved version is present, not that its payload executed.
Campaign-correlated startup hookhigh / high / .claude/settings.json / SessionStart: node setup.mjsOpening the repository with the affected agent configuration may invoke a command associated with the campaign. Inspect the referenced file and investigate possible prior execution.
Suspicious but unconfirmed hookmedium / review / .claude/settings.json / SessionStart: echo repository-readyA repository hook can execute automatically, but this command has no campaign correlation. Confirm its owner and purpose before changing it.
Delegated skill instructionhigh / high / setup-installation.md:3 / openclawcli.vercel.appSKILL.md delegates setup to a local file containing an exact campaign domain. Do not follow the instruction; verify the skill's origin and version.
Incomplete coverageerror / bun.lockb / Unsupported binary Bun lockfile formatThis is a diagnostic, not a finding. AgentSec returns exit code 2 because it cannot inspect an applicable authoritative input.

See complete finding examples for full output, every active rule, false-positive boundaries, and diagnostic classes.

Read the result

Exit codeMeaning
0Applicable checks completed and produced no finding. This is not a clean-system certificate.
1At least one finding requires action or review.
2The scan failed or applicable coverage is incomplete. Findings already collected remain in the report.

Reports keep findings, diagnostics, discovery exclusions, per-detector coverage, and unsupported capabilities separate. This prevents a skipped input from being presented as a successful check.

Versioned response playbooks separate evidence collection, manual containment, remediation, and verification. AgentSec does not perform destructive remediation.

Scope and safety

The default source scope excludes installed dependencies, generated trees, caches, binary assets, and VCS metadata while retaining supported lockfiles. Choose a broader scope explicitly when the investigation needs it:

agentsec scan /path/to/repo --scope dependencies
agentsec scan /path/to/repo --scope repository

AgentSec does not execute target content, invoke Git on the target repository, request the network during a scan, or follow filesystem indirection outside the scan root. Unreadable, changed, unsupported, or budget-exceeding applicable inputs make the result incomplete.

AgentSec is not an antivirus, EDR, general SAST, dependency scanner, or secret scanner. Its result covers only the implemented detectors and supported inputs reported by that run.

Outputs and automation

  • Human output for local review.
  • Scan-result v2 JSON and batch-result v1 JSON.
  • SARIF 2.1.0 with AgentSec completion, coverage, diagnostic, and exclusion properties.
  • A repository-local GitHub Action that runs checked-out source, validates SARIF, and preserves exit codes.
  • A versioned public security feed mirrored into the Claude Code Ultimate Guide and its landing page, with drift rejected in CI.

Remote Action use remains blocked until a release is authorized. See the project overview for the data flow, product surfaces, sources of truth, and integration boundaries.

Documentation

NeedDocument
Install and run the first scanInstallation
Interpret human, JSON, SARIF, and incomplete resultsExamples and verdicts
Understand architecture and canonical filesProject overview
Decide when to use AgentSec or another controlUsage and comparison guide
Respond to a findingResponse playbooks
Review sources and dated eventsSecurity intelligence and timeline
Add a source, event, IOC, or detectorIntelligence authoring
Give the task to an LLMCopy-ready prompt and LLM index
Review priorities and shipped workRoadmap and changelog
Report a vulnerability or incorrect resultSecurity policy
Contribute code or intelligenceContributing

The related educational security page is https://cc.bruniaux.com/security/.

Explore the ecosystem

These projects extend the workflow without duplicating this tool:

  • Learn with Claude Code Ultimate Guide: the guide already consumes the scanner's versioned security feed.
  • Validate with ctxharness: cover configuration security and context integrity together.
  • Automate with claude-code-plugins: pair specialist triage with the security-suite workflows.

Browse the complete open-source galaxy

License status

Project-owned code and original documentation use the MIT License. The paths listed in LICENSE-DATA.md remain unavailable for public redistribution while their separate rights and CC BY-SA 4.0 review is open.

Public visibility does not authorize a package, tag, source archive, GitHub Release, or redistribution of gated data. The blocking decisions are recorded in LICENSE-DECISION.md.