DeepSafe Scan — Agent Instructions
Description
This is the **deepsafe-scan** security scanner for AI agent environments. Works with: OpenClaw, Claude Code, Cursor, Codex, and any AI agent.
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
Repository README
This is the README for XiaoYiWeio/deepsafe-scan, shared by 3 entries
in this directory. It describes the repository, not this entry specifically.
DeepSafe Scan — Agent Instructions
This is the **deepsafe-scan** security scanner for AI agent environments. Works with: OpenClaw, Claude Code, Cursor, Codex, and any AI agent.
What this tool does
Scans for security risks in:
- AI agent config files (
.claude/settings.json,.cursorrules,.vscode/tasks.json, etc.) - Installed skills and MCP servers
- Session/memory data for leaked secrets and PII
- Deployment configuration
- Model behavioral safety (optional, needs API key)
When to use
Use this scanner when:
- The user asks about security, audit, or vulnerability scan of their AI setup
- The user is about to install a new skill or MCP server
- The user clones a new project with agent config files
- The user reports unexpected behavior (possible prompt injection)
How to invoke
**Static scan (no API key needed):**
python3 scripts/scan.py --modules posture,skill,memory,hooks --scan-dir . --no-llm --format markdown
**Full scan (auto-detects ANTHROPIC_API_KEY or OPENAI_API_KEY):**
python3 scripts/scan.py --modules posture,skill,memory,hooks,model --scan-dir . --format markdown
**OpenClaw users:**
python3 scripts/scan.py --openclaw-root ~/.openclaw --format html --output /tmp/report.html
**Targeted hooks-only scan (fastest):**
python3 scripts/scan.py --modules hooks --scan-dir . --no-llm --format markdown
Modules
| Module | Scans | API Required |
|---|---|---|
posture |
openclaw.json or .env config files | No |
skill |
Skills, MCP servers — 15+ static analyzers | No (LLM analysis optional) |
memory |
Session data, credentials — 27+ secret patterns, 9 PII patterns | No |
hooks |
AI agent config files — 12 injection patterns | No |
model |
Behavioral safety probes (persuasion, sandbagging, deception, hallucination) | Yes |
Interpreting results
**Scores:** Each module scores 1-100 (100 = clean). Total score is the average across active modules.
| Score | Risk |
|---|---|
| 85–100 | LOW |
| 65–84 | MEDIUM |
| 40–64 | HIGH |
| 1–39 | CRITICAL |
**After scanning:** Present CRITICAL and HIGH findings first. Explain the risk and remediation for each. Offer to fix issues.
LLM auto-detection
The scanner auto-detects API credentials in this order:
--api-base/--api-keyflags- OpenClaw Gateway (
~/.openclaw/openclaw.json) ANTHROPIC_API_KEYenvironment variableOPENAI_API_KEYenvironment variable- No API → static analysis only (all modules except model probes still work)
Related Skills
Fastapi Review
Review a FastAPI application for architecture, async correctness, dependency injection, Pydantic schemas, secu
Security Defense in Depth
Implement multi-layered testing and security best practices.
Security SecLists Official Repository
[OWASP Testing Guide](https://owasp.org/www-project-web-security-testing-guide/)
Security Threat Hunting with Sigma Rules
Use Sigma detection rules to hunt for threats and analyze security events
Security Maintenance Walkthrough - 2026-03-29
- Re-triaged the full 2026-03-15 security finding set against current `main` and wrote a fresh current-head re
Security Google Workspace Model Armor
Filter user-generated content for safety
Security Related Agents
Django Reviewer
Expert Django code reviewer specializing in ORM correctness, DRF patterns, migration safety, security misconfi
Token Auditor
Scans ui/src/ for hardcoded visual values, duplicate components, and shadcn replacement candidates; produces d
Gitnexus Security Boundary Reviewer
GitNexus security and trust-boundary reviewer. Use for auth, permissions, secrets, injection, unsafe parsing,