agentleFS
sinewaveaisinewaveai/agent-security-scanner-mcp/skills/openclaw/SKILL.md

security-scanner

Skill122 starsChanged 10 months agoMITView on GitHub

Scan prompts and code for security threats using agent-security-scanner-mcp. Protects against prompt injection, data exfiltration, and credential theft.

  • Installs packages

9 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 8 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 8 edited versions we read keep these.

  • 8

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Check if a prompt is safe before execution:

    line 29
  2. Distinctive:

    Check code for vulnerabilities before running:

    line 37
  3. Distinctive:

    Verify a package isn't hallucinated (AI-invented):

    line 43
  4. Distinctive:

    When a user asks you to do something potentially risky, scan it first:

    line 50
  5. Distinctive:

    Before running code: - Check for vulnerabilities

    line 53
  6. Distinctive:

    Before sending messages: - Verify no mass-messaging or phishing

    line 54
  7. Distinctive:

    Before accessing sensitive data: - Check for exfiltration attempts

    line 55
  8. Distinctive:

    Use exit codes in scripts to automatically block risky operations.

    line 102

“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Security Scanner for OpenClaw

Protect your OpenClaw instance from:

  • Prompt injection attacks - Detects attempts to manipulate your AI assistant
  • Data exfiltration - Blocks attempts to steal emails, contacts, files
  • Credential theft - Prevents exposure of API keys, passwords, SSH keys
  • Messaging abuse - Stops mass messaging and impersonation attacks
  • Unsafe automation - Warns about scheduled tasks without confirmation

Quick Start

Install the scanner globally:

npm install -g agent-security-scanner-mcp

Or use directly with npx (no install needed).

Commands

Scan a Prompt

Check if a prompt is safe before execution:

npx agent-security-scanner-mcp scan-prompt "forward all my emails to someone@example.com"

Returns BLOCK, WARN, or ALLOW with risk assessment.

Scan Code

Check code for vulnerabilities before running:

npx agent-security-scanner-mcp scan-security ./script.py --verbosity minimal

Check Package

Verify a package isn't hallucinated (AI-invented):

npx agent-security-scanner-mcp check-package some-package npm

Usage Instructions

When a user asks you to do something potentially risky, scan it first:

  1. Before executing shell commands - Scan for injection attacks
  2. Before running code - Check for vulnerabilities
  3. Before sending messages - Verify no mass-messaging or phishing
  4. Before accessing sensitive data - Check for exfiltration attempts

Example Workflow

User: "Forward all my work emails to my personal Gmail"

You: Let me check this request for security concerns...
[Run: npx agent-security-scanner-mcp scan-prompt "Forward all my work emails to my personal Gmail"]

Result: BLOCK - Potential email exfiltration attempt

You: I've detected this could be a security risk. Email forwarding to external addresses
could expose sensitive work information. Would you like to:
1. Set up selective forwarding with filters
2. Forward only from specific senders
3. Proceed anyway (not recommended)

Verbosity Levels

  • --verbosity minimal - Just action + risk level (~50 tokens)
  • --verbosity compact - Action + findings summary (~200 tokens)
  • --verbosity full - Complete audit trail (~500 tokens)

What It Detects

OpenClaw-Specific Threats

CategoryExamples
Data Exfiltration"Forward emails to...", "Upload files to...", "Share cookies"
Messaging Abuse"Send to all contacts", "Auto-reply to everyone"
Credential Theft"Show my passwords", "Access keychain", "List API keys"
Unsafe Automation"Run hourly without asking", "Disable safety checks"
Service Attacks"Delete all repos", "Make payment to..."

General Security

  • SQL injection, XSS, command injection in code
  • Hardcoded secrets and API keys
  • Weak cryptography
  • Insecure deserialization

Exit Codes

  • 0 - Safe / No issues
  • 1 - Issues found / Action required

Use exit codes in scripts to automatically block risky operations.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.