agentleFS
ianallowayianalloway/openclaw-skills/security-scanner/SKILL.md

security-scanner

Skill4 starsChanged 5 months agoMITView on GitHub

Scan code and dependencies for security vulnerabilities. Check npm audit, pip safety, and common security issues.

  • Reads credentials
  • Installs packages

14 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

10 rules. 0 are common, 9 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 11 edited versions we read keep these.

  • 9

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Check for known vulnerabilities in npm packages:

    line 40
  2. Distinctive:

    Check Python dependencies with pip-audit:

    line 60
  3. Distinctive:

    Search for potential API keys and secrets:

    line 82
  4. Distinctive:

    Check for potentially dangerous code patterns:

    line 90
  5. Distinctive:

    Ensure sensitive files are ignored:

    line 121
  6. Distinctive:

    Run a quick audit on a project:

    line 149
  7. Very specific:

    Create SECURITY.md in your repo to establish responsible disclosure guidelines.

    line 183
  8. Distinctive:

    Run security scans in CI/CD pipelines

    line 195
  9. Distinctive:

    Use pre-commit hooks to catch secrets before commit

    line 197
  10. Distinctive:

    Keep dependencies updated regularly

    line 199

“Common” is measured: kept by at least 6 in 10 of the 11 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

Scan your projects for security vulnerabilities in dependencies and common code issues.

Dependency Scanning

NPM Projects

Check for known vulnerabilities in npm packages:

npm audit

Get JSON output for parsing:

npm audit --json | jq '{vulnerabilities: .metadata.vulnerabilities, total: .metadata.vulnerabilities.total}'

Fix automatically where possible:

npm audit fix

Python Projects

Check Python dependencies with pip-audit:

pip install pip-audit && pip-audit

Or use safety (requires free API key from https://safetycli.com/):

pip install safety && safety check

Check requirements.txt directly:

pip-audit -r requirements.txt

Code Security Checks

Find Hardcoded Secrets

Search for potential API keys and secrets:

grep -rn "api_key\|apikey\|secret\|password\|token" --include="*.js" --include="*.ts" --include="*.py" --include="*.env" .

Find Dangerous Functions

Check for potentially dangerous code patterns:

# JavaScript/TypeScript - eval usage
grep -rn "eval(" --include="*.js" --include="*.ts" .

# Python - exec/eval usage
grep -rn "exec(\|eval(" --include="*.py" .

# SQL injection risks
grep -rn "execute.*%s\|execute.*f\"" --include="*.py" .

Check for Debug Code

Find debug statements that shouldn't be in production:

grep -rn "console.log\|debugger\|print(" --include="*.js" --include="*.ts" --include="*.py" .

Environment Security

Check for Exposed .env Files

find . -name ".env*" -not -path "*/node_modules/*" -not -path "*/.git/*"

Verify .gitignore

Ensure sensitive files are ignored:

cat .gitignore | grep -E "\.env|secret|credential|\.pem|\.key"

Docker Security

Scan Docker Images

Using Trivy (install: https://trivy.dev/):

trivy image your-image:tag

Check Dockerfile Best Practices

# Check for root user
grep -n "USER root" Dockerfile

# Check for latest tag
grep -n "FROM.*:latest" Dockerfile

Quick Security Audit

Run a quick audit on a project:

# For npm projects
echo "=== NPM Audit ===" && npm audit 2>/dev/null || echo "Not an npm project"

# Check for secrets
echo "=== Potential Secrets ===" && grep -rn "password\|secret\|api_key" --include="*.js" --include="*.py" --include="*.ts" . 2>/dev/null | head -20

# Check for .env files
echo "=== Environment Files ===" && find . -name ".env*" -not -path "*/node_modules/*" 2>/dev/null

GitHub Security Features

Enable Dependabot

Create .github/dependabot.yml:

version: 2
updates:
  - package-ecosystem: "npm"
    directory: "/"
    schedule:
      interval: "weekly"
  - package-ecosystem: "pip"
    directory: "/"
    schedule:
      interval: "weekly"

Security Policy Template

Create SECURITY.md in your repo to establish responsible disclosure guidelines.

Resources

Tips

  • Run security scans in CI/CD pipelines
  • Set up Dependabot for automatic dependency updates
  • Use pre-commit hooks to catch secrets before commit
  • Review third-party dependencies before adding them
  • Keep dependencies updated regularly

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.