Catalog PyPI
Back to packageRELEASE DETAILS

0.3.1

PyPI

agentconfigguard

Preflight security auditor for AI-agent and MCP configuration.

agent-securityai-agentsai-securitygithub-actionsmcpprompt-injectionsecuritystatic-analysis
Published8 Oct 2026
Direct dependencies1
Transitive dependenciesNot calculated

README

Version 0.3.1 documentation

🛡️ AgentGuard

Preflight security auditing for AI-agent configuration and MCP — before your agent runs.

Tests PyPI PyPI downloads Python License GitHub stars

Audit your AI agents before they audit your code.

AgentGuard is an open-source CLI and GitHub Action that scans AI-agent instructions and MCP configuration for high-signal security and policy risks.

It is local, deterministic, read-only, and CI-friendly: AgentGuard does not invoke agent tools or connect to configured MCP servers during a normal scan.

Why AgentGuard?

Modern coding agents can read files, run commands, call MCP tools, access secrets, and follow large instruction files. A small configuration mistake can therefore become a security boundary problem.

AgentGuard is the preflight check that runs before the agent:

repository
   │
   ├── agent instructions
   ├── MCP configuration
   ├── provider settings
   │
   ▼
┌─────────────────────────────┐
│         AgentGuard          │
│  deterministic local audit  │
└──────────────┬──────────────┘
               │
        findings + score
               │
        ┌──────┴──────┐
        ▼             ▼
      local           CI
      review       GitHub checks

Try it in 10 seconds

python -m pip install agentconfigguard
agentguard demo

The demo is synthetic and performs no network access and no file writes.

Then scan a real repository:

agentguard scan .

Useful outputs:

agentguard scan . --json
agentguard scan . --sarif agentguard-results.sarif
agentguard scan . --html agentguard-report.html
agentguard scan . --adapters
agentguard scan . --context

What it checks

RuleDetectsSeverity
AG-SEC-001Credential-like values in tracked configHigh
AG-EXEC-001Shell / terminal / command-execution capabilitiesHigh
AG-FS-001Broad filesystem or workspace accessHigh
AG-MCP-001MCP trust=true confirmation bypassHigh
AG-MCP-002Unencrypted remote MCP http:// endpointsMedium
AG-MCP-003Remote MCP servers without provenance metadataLow
AG-POLICY-001Untrusted input + private data + outbound actionsCritical
AG-CODEX-001Codex full-access + no-approval combinationHigh
AG-GEMINI-001Gemini persistent approval defaultMedium
AG-OPENCODE-001OpenCode unrestricted shell permissionHigh
AG-OPENCODE-002OpenCode unrestricted edit permissionHigh
AG-PROMPT-001Common prompt-injection patternsMedium
AG-CONTEXT-001Oversized agent instruction filesLow
AG-CONTEXT-002Instruction files above a configured context budgetMedium

Supported agent/config markers include Claude, Codex, Cursor, Gemini, OpenCode, and MCP.

GitHub Actions

Add AgentGuard to any repository:

name: AgentGuard

on:
  push:
  pull_request:

jobs:
  audit:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - uses: atilaamorim/agentguard@v0.3.1
        with:
          path: .
          fail-on-severity: "high"

The Action can emit:

  • GitHub annotations
  • JSON
  • SARIF
  • HTML reports
  • CI failure gates

It also supports policy files, baselines, and context budgets.

Current stable Action: v0.3.1. The main branch contains the upcoming v0.3.0 feature set.

Policy as code

Keep the security gate with the repository:

version: 1
fail_on_severity: high
max_context_tokens: 12000

ignore:
  - rule: AG-MCP-002
    paths:
      - "configs/local/*"

AgentGuard discovers .agentguard.yml / .agentguard.yaml automatically.

Baselines

Existing repositories can adopt AgentGuard without fixing everything at once:

agentguard scan . --write-baseline agentguard-baseline.json
agentguard scan . --baseline agentguard-baseline.json

Only findings that are not already in the baseline are returned.

Pre-commit

repos:
  - repo: https://github.com/atilaamorim/agentguard
    rev: v0.3.1
    hooks:
      - id: agentguard

Design principles

PrincipleMeaning
LocalNo remote service is required for a normal scan
DeterministicThe same input should produce reproducible findings
Read-onlyThe scanner does not execute commands from the project
ExplainableFindings have stable rule IDs and remediation guidance
ComposableCLI, CI, SARIF, HTML, policy, and baseline modes can be combined

Where AgentGuard fits

AgentGuard is deliberately a static configuration auditor, not a runtime firewall.

CapabilityAgentGuard
Local configuration audit✅
MCP trust / transport / provenance checks✅
Provider-specific checks✅
Dangerous capability-chain checks✅
JSON / SARIF / HTML✅
GitHub Actions✅
Policy-as-code✅
Baseline mode✅
Runtime tool-call enforcement❌
Live MCP probing❌
LLM-powered verdicts❌
Security certification / guarantee❌

A clean scan is not proof that an agent, MCP server, repository, or deployment is secure. Rules are heuristic and can have false positives or false negatives.

Security regression benchmark

AgentGuard ships deterministic risky and safe fixtures under tests/fixtures/.

Run the suite locally:

pytest -q

Rules should include positive and negative regression coverage whenever practical.

Documentation

Roadmap

  • Local filesystem scanner
  • JSON/YAML MCP inspection
  • Secret detection
  • Prompt-injection heuristics
  • Permission-risk heuristics
  • MCP trust / cleartext HTTP checks
  • Dangerous capability-chain detection
  • Claude / Codex / Cursor / Gemini / OpenCode detection
  • JSON / SARIF / HTML output
  • GitHub Action
  • GitHub annotations
  • Context-cost estimation
  • Context budget gate
  • Baseline mode
  • Policy-as-code
  • PyPI package metadata
  • Expand provider-specific coverage
  • Add more safe/risky MCP provenance cases
  • Improve interactive demo and onboarding
  • Add more integrations and examples

Contributing

Good starting points:

Small, focused pull requests are welcome. New security rules should include regression coverage and remediation guidance.

Security issues should follow SECURITY.md.

License

MIT

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 1

Native requirements
1 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
PyYAML
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
PyYAML>=6.0runtime

Distribution files

2 collected
agentconfigguard-0.3.1-py3-none-any.whl

bdist_wheel · 17.66 KB · Python py3

Source file
agentconfigguard-0.3.1.tar.gz

sdist · 18.77 KB · Python source

Source file

Repository

ACCESSIBLE
atilaamorim/agentguard

Shared repository data · GitHub

License detected in repository
NOASSERTION
License branch / ref
main
Last push
8 Oct 2026
Archived
No
Contributor identities
— · partial collection

Public sponsor counts have not been collected. These signals belong to the repository owner.

Downloads & popularity

1count
Gauge · observed snapshots22 Oct 2026
10.50
2026-10-22: 1 · observed 2026-10-22T10:26:21.1763257Z
22 Oct22 Oct

github · 1 observations shown. Missing days are unknown.

View observed values
Date / source periodValueObserved at
2026-10-2212026-10-22T10:26:21.1763257Z

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 21:41 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:67e359d00be232e905f0a0b26331ab057c5e9ada6960a15f0652b0b7ecf96a45

Other collected versions

View all collected versions →