Skip to main content

Trust Infrastructure for AI Agents โ€“ Security audits, cryptographic certificates, and Trust Handshake Protocol

Project description

AgentShield Audit - ClawHub Skill

๐Ÿ”’ Audit your AI agent's security and obtain verifiable trust certificates for inter-agent communication.

AgentShield License Python


What is AgentShield?

AgentShield is a security audit framework for AI agents. It tests your agent against common attack vectors, generates cryptographic identity certificates, and enables secure inter-agent communication through verifiable trust chains.

Think of it as: Let's Encrypt for AI Agents ๐Ÿ›ก๏ธ


๐Ÿš€ Quick Start

Installation

Option 1: pip (Python developers)

pip install agentshield-audit

Option 2: ClawHub (OpenClaw agents)

clawhub install agentshield-audit

Run Your First Audit

cd ~/.openclaw/workspace/skills/agentshield-audit
python initiate_audit.py --auto

That's it! Your agent will be audited in ~30 seconds and receive a signed certificate.


โœจ Features

  • โœ… Zero external fetching - All scripts bundled locally
  • โœ… Human-in-the-loop - Explicit approval required before reading files
  • โœ… Cryptographic identity - Ed25519 keypair generation with local private key storage
  • โœ… Security audit - Tests against 5+ common attack vectors
  • โœ… Verifiable certificates - 90-day validity, signed by AgentShield CA
  • โœ… Peer verification - Verify other agents' certificates before trusting them
  • โœ… No API key required - Free for basic usage (1 audit/hour rate limit)
  • โœ… Privacy-first - Private keys NEVER leave your workspace

๐Ÿงช What Gets Tested?

Your agent is tested against these attack vectors:

Test Description Risk Level
System Prompt Extraction Attempts to extract the agent's system prompt High
Instruction Override Tries to override safety instructions Critical
Tool Permission Check Verifies proper tool access controls High
Memory Isolation Tests for context leakage between sessions Medium
Secret Leakage Scans for exposed API keys, tokens, passwords Critical

Your Security Score: 0-100 based on passed tests


๐Ÿ“ฆ Bundle Contents

agentshield-audit/
โ”œโ”€โ”€ SKILL.md                 # Complete skill documentation
โ”œโ”€โ”€ README.md                # This file
โ”œโ”€โ”€ clawhub.json            # ClawHub manifest
โ”œโ”€โ”€ requirements.txt        # Python dependencies
โ”œโ”€โ”€ sandbox_config.yaml     # Tool sandbox configuration
โ”œโ”€โ”€ CHANGELOG.md            # Version history
โ”œโ”€โ”€ INSTALLATION.md         # Detailed installation guide
โ”œโ”€โ”€ QUICKSTART.md           # Step-by-step tutorial
โ”‚
โ”œโ”€โ”€ Core Audit Scripts:
โ”‚   โ”œโ”€โ”€ initiate_audit.py   # Main script - start new audit with consent
โ”‚   โ”œโ”€โ”€ verify_peer.py      # Verify another agent's certificate
โ”‚   โ”œโ”€โ”€ show_certificate.py # Display your certificate
โ”‚   โ””โ”€โ”€ audit_client.py     # Low-level API client
โ”‚
โ”œโ”€โ”€ Security Modules:
โ”‚   โ”œโ”€โ”€ input_sanitizer.py  # Input validation
โ”‚   โ”œโ”€โ”€ output_dlp.py       # Output data loss prevention  
โ”‚   โ”œโ”€โ”€ tool_sandbox.py     # Tool execution sandbox
โ”‚   โ”œโ”€โ”€ echoleak_test.py    # Echo leakage detection
โ”‚   โ”œโ”€โ”€ secret_scanner.py   # Secret scanning
โ”‚   โ””โ”€โ”€ supply_chain_scanner.py  # Supply chain security
โ”‚
โ””โ”€โ”€ Setup:
    โ”œโ”€โ”€ setup.py            # Package setup script
    โ”œโ”€โ”€ __init__.py         # Module init
    โ””โ”€โ”€ verify_bundle.py    # Bundle verification

All scripts are bundled locally - no external code fetching.


๐Ÿ” Human-in-the-Loop Consent

Before accessing any sensitive files (IDENTITY.md, SOUL.md, system prompts), AgentShield explicitly asks for user approval:

Before proceeding, I need to:

1. Read these files (to detect agent name):
   โ€ข IDENTITY.md
   โ€ข SOUL.md

2. Generate a cryptographic keypair
   (stored locally in ~/.agentshield/)

3. Send public key to AgentShield API

Proceed? [y/N]: 

User must explicitly type 'y' or 'yes' to continue.

Skip File Reading

To avoid any file access, provide info manually:

python initiate_audit.py --name "MyAgent" --platform telegram

๐Ÿ” Privacy & Security

What Gets Stored Locally?

All sensitive data stays in ~/.openclaw/workspace/.agentshield/:

.agentshield/
โ”œโ”€โ”€ agent.key          # Your Ed25519 private key (NEVER shared)
โ”œโ”€โ”€ certificate.json   # Your signed certificate (shareable)
โ””โ”€โ”€ config.json        # Agent configuration

File Permissions: Private key is stored with 600 (owner read/write only)

What Gets Sent to AgentShield API?

  1. Public key (Ed25519, generated from your private key)
  2. Agent name (auto-detected or user-specified)
  3. Platform (discord, telegram, etc.)
  4. Audit results (test scores, no sensitive data)

What is NEVER sent:

  • โŒ Private keys
  • โŒ API tokens
  • โŒ System prompts
  • โŒ Conversation history
  • โŒ User data

Rate Limiting

  • Free tier: 1 audit per hour per IP
  • No registration required
  • No payment needed for basic usage
  • Enterprise/high-volume: Contact us

๐ŸŽฏ Usage Examples

1. Auto-detected Audit (Recommended)

python initiate_audit.py --auto

The script will:

  • Ask for explicit user consent before reading files
  • Auto-detect your agent name from IDENTITY.md, SOUL.md
  • Auto-detect platform from environment variables
  • Generate Ed25519 keypair if none exists
  • Run the security audit
  • Save your certificate

2. Manual Audit (Specify Name & Platform)

python initiate_audit.py --name "MyAgent" --platform telegram

No file access required - completely manual.

3. Verify Another Agent

python verify_peer.py --agent-id "agent_abc123xyz"

Returns:

  • โœ… Certificate validity
  • โœ… Expiration date
  • โœ… Security score
  • โœ… Public key fingerprint

4. Show Your Certificate

python show_certificate.py

Displays:

  • Agent ID
  • Validity period
  • Security score
  • Verification URL

๐Ÿ“š Documentation

  • SKILL.md - Complete skill reference with Human-in-the-Loop details
  • QUICKSTART.md - Step-by-step tutorial for first-time users
  • INSTALLATION.md - Detailed installation instructions
  • GitHub - Source code & issues

๐Ÿ› ๏ธ Installation Requirements

  • Python: 3.8 or higher
  • Dependencies:
    • cryptography>=41.0.0 (Ed25519 key generation)
    • requests>=2.31.0 (API communication)

Install dependencies:

pip install -r requirements.txt

๐Ÿ”ง Troubleshooting

"No certificate found"

Solution: Run python initiate_audit.py --auto to generate one

"Challenge failed"

Solution: Check your system clock. AgentShield uses time-based challenge-response authentication (NTP sync required)

"API unreachable"

Solution: Verify internet connection. The API endpoint is https://agentshield.live/api

"Rate limited"

Solution: Free tier allows 1 audit per hour. Wait 60 minutes between audits.

"Auto-detection failed"

Solution: Use manual mode:

python initiate_audit.py --name "YourAgentName" --platform discord

๐Ÿง‘โ€๐Ÿ’ป Development

All scripts are bundled locally. No external downloads.

Security Module Structure

# Security tests are modular - each can be imported independently
from input_sanitizer import sanitize_input
from secret_scanner import scan_for_secrets
from output_dlp import check_output

๐Ÿค Contributing

Contributions are welcome! Please:

  1. Fork the repo
  2. Create a feature branch
  3. Submit a pull request

GitHub: https://github.com/bartelmost/agentshield


๐Ÿ“„ License

MIT License


๐Ÿ’ฌ Support


๐ŸŒŸ Why AgentShield?

As AI agents become more autonomous and interconnected, trust becomes the bottleneck. AgentShield solves this by:

  1. Standardizing security audits - Consistent testing across all agents
  2. Enabling verifiable trust - Cryptographic certificates anyone can verify
  3. Preventing attack vectors - Proactive defense against known threats
  4. Building a trust network - Agents can verify each other before collaboration

Secure yourself. Verify others. Trust nothing by default. ๐Ÿ›ก๏ธ


Made with ๐Ÿ” by the AgentShield team

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

agentshield_audit-1.0.34.tar.gz (59.7 kB view details)

Uploaded Source

Built Distribution

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

agentshield_audit-1.0.34-py3-none-any.whl (62.7 kB view details)

Uploaded Python 3

File details

Details for the file agentshield_audit-1.0.34.tar.gz.

File metadata

  • Download URL: agentshield_audit-1.0.34.tar.gz
  • Upload date:
  • Size: 59.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for agentshield_audit-1.0.34.tar.gz
Algorithm Hash digest
SHA256 b55b7cd561ea587d02fe24e346a27d8f39d218b220c4d5a3a29d7cee0c361441
MD5 de000fd71d834987be888a78af52e1f9
BLAKE2b-256 e024464dcc97c8a93cce58ee8ab7395aa4bf04e2bac4abeb8f52bbb4b925f1c5

See more details on using hashes here.

File details

Details for the file agentshield_audit-1.0.34-py3-none-any.whl.

File metadata

File hashes

Hashes for agentshield_audit-1.0.34-py3-none-any.whl
Algorithm Hash digest
SHA256 5f9267380ff26b39e773125ffa5d13a15b0bc611fc6dd8e1af99997725abbeaa
MD5 eb79c957f1bb3237b711d1b01965dd06
BLAKE2b-256 74a33c35abb981adbeb121eb26c3910ad2b2be55cec252160890fc1c22715a2e

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