security-scanner
Skill0 starsChanged 13 months agoMITView on GitHub
Automated security scanning for hardcoded secrets, insecure file permissions, vulnerable dependencies, and unsafe code patterns
- Pipes a download into a shell
- Reads credentials
- Deletes or force-pushes
- Installs packages
14 other projects use a version of this.
Adopted by
Most recently taken up by
- rmichak/claude-skillstheir own version, first seen Nov 8, 2026
- zedarvates/frugal-skillstheir own version, first seen Nov 8, 2026
- kcayme/k-agentstheir own version, first seen Nov 1, 2026
- jazzpujols34/claude-skillstheir own version, first seen Oct 13, 2026
- leonvanzyl/agentic-coding-starter-kittheir own version, first seen Oct 8, 2026
- alexblag023/claude-skillstheir own version, first seen Oct 1, 2026
Other versions14 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 14
- leonvanzyl/agentic-coding-starter-kit★ 447same name
- glincker/claude-code-marketplace★ 37same name
- dkpapadopoulos/auto-claude-skills★ 6same name
- casedone/claude-code-security-plugins★ 4same name
- ianalloway/openclaw-skills★ 4same name
- leonvanzyl/claude-code-pro-workflow-demo★ 4same name
- mehdiozdemir/awesome-agent-skills★ 2same name
- alexblag023/claude-skills★ 1same name
- cicoccc/openclaw-security-scanner★ 1same name
- rmichak/claude-skills★ 1same name
4 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository16 other files it gives its agents.
- aws-cost-analyzerSkill
- code-reviewerSkill
- dast-scannerSkill
- database-optimizerSkill
- dependency-checkerSkill
- git-workflowSkill
- java-profilerSkill
- jira-integrationSkill
- memory-analyzerSkill
- penetration-testerSkill
- performance-monitorSkill
- python-profilerSkill
- refactoring-assistantSkill
- sast-analyzerSkill
- skill-validatorSkill
- tdd-workflowSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. 0 are common, 13 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 11 edited versions we read keep these.
13
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
- could be automatic: a setting could enforce it
- Distinctive: line 13
Before committing code to version control
- Distinctive: line 17
After adding new dependencies
- Distinctive: line 18
When onboarding new projects
- Distinctive: line 238
Document accepted risks in security-exceptions.txt:
- Distinctive: line 247
Never commit secrets: - Use environment variables
- Distinctive: line 255
Input validation: - Never trust user input
- Distinctive: line 277
Pre-commit: Every commit (via git hooks)
- Distinctive: line 278
CI/CD: Every push to repository
- Distinctive: line 289
If you encounter false positives:
- Distinctive: line 291
Verify it's actually safe
- Distinctive: line 292
Document why in comments
- Distinctive: line 293
Consider refactoring for clarity
- Distinctive: line 294
Add to exceptions list if necessary
“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.
Files
Security Scanner
Overview
Comprehensive security scanning tool that checks for hardcoded secrets, insecure file permissions, vulnerable Python dependencies, unsafe bash script patterns, and insecure Python code patterns in repositories.
When to Use
- Before committing code to version control
- During pull request reviews
- As part of CI/CD pipeline security gates
- Regular security audits (weekly/monthly)
- After adding new dependencies
- When onboarding new projects
Security Checks
1. Secrets & Credentials Detection
Patterns Checked:
- Hardcoded passwords
- API keys (10+ characters)
- Secret tokens
- AWS access keys
- Private keys (PEM format)
Example Detections:
# ❌ Will be flagged
password = "MySecretPass123"
api_key = "sk_live_abc123def456"
AWS_SECRET_ACCESS_KEY = "wJalrXUtnFEMI/K7MDENG/bPxRfiCY"2. File Permissions Check
- World-writable files (permissions 002)
- Executable files that shouldn't be
- Configuration files with overly permissive access
3. Python Dependency Vulnerabilities
Tools Used:
- pip-audit: Scan requirements.txt for known CVEs
- safety: Additional vulnerability database
Detects:
- Packages with known security issues
- Outdated versions with patches available
- Severity levels (Critical, High, Medium, Low)
4. Unsafe Bash Script Patterns
Dangerous Patterns:
eval $variable- Code injection riskcurl | bash- Remote code executionrm -rf /- Destructive commands- Unquoted variables in dangerous contexts
5. Insecure Python Code Patterns
Patterns Checked:
import pickle- Unsafe deserializationeval()/exec()- Code injectionshell=Truein subprocess - Command injection- Bare
assertstatements - Can be disabled input()withexec- Direct code execution
Usage
Basic Scan
./claude/skills/security-scanner/security-scanner.sh .Scan Specific Directory
./claude/skills/security-scanner/security-scanner.sh /path/to/projectReview Generated Report
cat security-reports/security_report_YYYYMMDD_HHMMSS.txtSample Output
╔════════════════════════════════════════════════════════════════╗
║ SECURITY SCANNER - Skills & Tools Repository ║
╚════════════════════════════════════════════════════════════════╝
Target: /Users/user/project
Timestamp: 2025-01-15 14:30:00
[1/6] Checking for secrets and credentials...
⚠️ Found potential API key at config.py:15
⚠️ Found hardcoded password at setup.py:42
✗ Found 2 potential secrets!
Review the above matches and remove any hardcoded credentials
[2/6] Checking file permissions...
✓ File permissions look good
[3/6] Checking Python dependencies...
Running pip-audit...
⚠️ requests==2.25.1 has known vulnerability (CVE-2023-32681)
Upgrade to: 2.31.0
[4/6] Checking bash scripts for security issues...
✗ deploy.sh: Uses 'eval' with variables (dangerous)
✗ install.sh: Pipes curl to bash (dangerous)
[5/6] Checking Python files for insecure patterns...
⚠️ Found potentially unsafe pattern: shell=True
utils/backup.py:34: subprocess.call(..., shell=True)
[6/6] Generating security report...
✓ Report saved to: security-reports/security_report_20250115_143000.txt
╔════════════════════════════════════════════════════════════════╗
║ SCAN COMPLETE ║
╚════════════════════════════════════════════════════════════════╝Security Report Contents
The generated report includes:
- Executive summary
- Detailed findings by category
- Recommendations for each issue
- Next steps and remediation guidance
- Links to security best practices
Common Issues & Fixes
Hardcoded Secrets
# ❌ BAD
API_KEY = "sk_live_abc123"
# ✅ GOOD
import os
API_KEY = os.environ.get('API_KEY')Subprocess with shell=True
# ❌ BAD
subprocess.run(f"ls {user_input}", shell=True)
# ✅ GOOD
subprocess.run(["ls", user_input], shell=False)Dangerous Bash Commands
# ❌ BAD
eval "$user_command"
curl https://example.com/script.sh | bash
# ✅ GOOD
# Validate input first
if [[ "$user_command" =~ ^[a-zA-Z0-9_-]+$ ]]; then
"$user_command"
fiInsecure File Permissions
# ❌ BAD: World-writable
chmod 666 config.json
# ✅ GOOD: Owner read/write only
chmod 600 config.jsonCI/CD Integration
GitHub Actions
name: Security Scan
on: [push, pull_request]
jobs:
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
pip install pip-audit safety
- name: Run Security Scanner
run: |
chmod +x .claude/skills/security-scanner/security-scanner.sh
./.claude/skills/security-scanner/security-scanner.sh .
- name: Upload Security Report
if: always()
uses: actions/upload-artifact@v3
with:
name: security-report
path: security-reports/GitLab CI
security_scan:
stage: test
script:
- pip install pip-audit safety
- chmod +x .claude/skills/security-scanner/security-scanner.sh
- ./.claude/skills/security-scanner/security-scanner.sh .
artifacts:
paths:
- security-reports/
when: alwaysExclusions & False Positives
Exclude Directories
Edit the script to add exclusions:
# Add to grep commands:
--exclude-dir=venv \
--exclude-dir=node_modules \
--exclude-dir=.git \
--exclude-dir=distSuppress Specific Warnings
Document accepted risks in security-exceptions.txt:
# Accepted security exceptions
config.py:15 - API key in test configuration (not production)
utils/backup.py:34 - shell=True needed for wildcard expansion (input sanitized)Security Best Practices
- Never commit secrets - Use environment variables
- Scan before commit - Pre-commit hooks
- Regular dependency updates - Weekly checks
- Review all HIGH/CRITICAL - Within 24 hours
- Document exceptions - Why risks are accepted
- Automated scanning - CI/CD integration
- Security training - Educate developers
- Principle of least privilege - Minimal file permissions
- Input validation - Never trust user input
- Defense in depth - Multiple security layers
Additional Security Tools
For comprehensive security:
- SAST Analyzer skill: Deep static analysis with Semgrep
- DAST Scanner skill: Runtime testing
- Dependency Checker skill: Advanced SCA
- Penetration Tester skill: Authorized security testing
Requirements
# Python tools
pip install pip-audit safety
# Bash (built-in on Unix/macOS/Linux)Scan Frequency Recommendations
- Pre-commit: Every commit (via git hooks)
- CI/CD: Every push to repository
- Scheduled: Weekly full scans
- After changes: Dependency updates, major features
- Quarterly: Comprehensive security audit
Exit Codes
The scanner always returns 0 (success) but reports issues in the output and report file. Review the report to determine if action is needed.
False Positive Handling
If you encounter false positives:
- Review the flagged code
- Verify it's actually safe
- Document why in comments
- Consider refactoring for clarity
- Add to exceptions list if necessary
Support
For security issues or questions:
- Review generated reports carefully
- Check OWASP guidelines
- Consult security team for critical findings
- Update dependencies promptly
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
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.

