$npx -y skills add berabuddies/Semia --skill security-check-skillSecurity audit and inspection skill for Clawdbot skills. Use this when you need to check skills for security vulnerabilities before installation, perform regular security audits on installed skills, verify skill description matches actual behavior, scan for prompt injection attem
| 1 | # Security Check Skill |
| 2 | |
| 3 | Comprehensive security auditing for Clawdbot skills to detect malicious intent, prompt injection, secrets exposure, and misaligned behavior. |
| 4 | |
| 5 | ## Quick Start |
| 6 | |
| 7 | ### Pre-Installation Security Check |
| 8 | |
| 9 | Before installing a new skill from ClawdHub or any source: |
| 10 | |
| 11 | 1. **Download and inspect the skill files** |
| 12 | 2. **Run the automated security scanner**: |
| 13 | ```bash |
| 14 | python3 scripts/scan_skill.py /path/to/skill |
| 15 | ``` |
| 16 | 3. **Review the scanner output** - Block any skill with HIGH severity issues |
| 17 | 4. **Manual review** for MEDIUM severity issues |
| 18 | 5. **Verify behavior matches description** before installation |
| 19 | |
| 20 | ### Daily Security Audit |
| 21 | |
| 22 | Run daily to ensure installed skills remain secure: |
| 23 | |
| 24 | ```bash |
| 25 | # Scan all skills in the skills directory |
| 26 | python3 scripts/scan_skill.py /path/to/skills/skill-1 |
| 27 | python3 scripts/scan_skill.py /path/to/skills/skill-2 |
| 28 | # ... repeat for each installed skill |
| 29 | ``` |
| 30 | |
| 31 | ## Security Scanner |
| 32 | |
| 33 | ### Running the Scanner |
| 34 | |
| 35 | The `scripts/scan_skill.py` tool provides automated security analysis: |
| 36 | |
| 37 | ```bash |
| 38 | python3 scripts/scan_skill.py <skill-path> |
| 39 | ``` |
| 40 | |
| 41 | **Output includes:** |
| 42 | - HIGH severity issues (immediate action required) |
| 43 | - MEDIUM severity warnings (review recommended) |
| 44 | - LOW severity notes (informational) |
| 45 | - Summary of checks performed |
| 46 | |
| 47 | **Example output:** |
| 48 | ```json |
| 49 | { |
| 50 | "skill_name": "example-skill", |
| 51 | "issues": [ |
| 52 | { |
| 53 | "severity": "HIGH", |
| 54 | "file": "SKILL.md", |
| 55 | "issue": "Potential prompt injection pattern", |
| 56 | "recommendation": "Review and remove suspicious patterns" |
| 57 | } |
| 58 | ], |
| 59 | "warnings": [ |
| 60 | { |
| 61 | "severity": "MEDIUM", |
| 62 | "file": "scripts/helper.py", |
| 63 | "issue": "os.system() usage detected", |
| 64 | "recommendation": "Review and ensure this is safe" |
| 65 | } |
| 66 | ], |
| 67 | "passed": [ |
| 68 | {"file": "SKILL.md", "check": "Prompt injection scan", "status": "Completed"} |
| 69 | ], |
| 70 | "summary": "SECURITY ISSUES FOUND: 1 issue(s), 1 warning(s)" |
| 71 | } |
| 72 | ``` |
| 73 | |
| 74 | ### What the Scanner Checks |
| 75 | |
| 76 | 1. **SKILL.md Analysis** |
| 77 | - Prompt injection patterns |
| 78 | - External network calls |
| 79 | - Suspicious instructions |
| 80 | |
| 81 | 2. **Scripts Directory Scan** |
| 82 | - Dangerous command patterns (rm -rf, eval, exec) |
| 83 | - Hardcoded secrets and credentials |
| 84 | - Unsafe subprocess usage |
| 85 | - File system operations outside skill directory |
| 86 | |
| 87 | 3. **References Directory Scan** |
| 88 | - Hardcoded secrets (passwords, API keys, tokens) |
| 89 | - Suspicious URLs (pastebin, raw GitHub links) |
| 90 | - Sensitive information exposure |
| 91 | |
| 92 | ## Manual Security Checklist |
| 93 | |
| 94 | Use the comprehensive checklist in `references/security-checklist.md` for manual reviews. |
| 95 | |
| 96 | ### Critical Checks (Before Installation) |
| 97 | |
| 98 | #### 1. Documentation Integrity (SKILL.md) |
| 99 | - ✅ Description accurately reflects skill functionality |
| 100 | - ❌ No prompt injection patterns (see `references/prompt-injection-patterns.md`) |
| 101 | - ❌ No instructions to ignore/discard context |
| 102 | - ❌ No system override commands |
| 103 | - ✅ No hidden capabilities beyond description |
| 104 | |
| 105 | #### 2. Code Review (scripts/) |
| 106 | - ❌ No hardcoded credentials or secrets |
| 107 | - ❌ No dangerous file operations (rm -rf outside skill dir) |
| 108 | - ❌ No eval() or exec() with user input |
| 109 | - ❌ No unauthorized network requests |
| 110 | - ✅ All operations within skill directory |
| 111 | - ✅ Proper input validation |
| 112 | |
| 113 | #### 3. Reference Materials (references/) |
| 114 | - ❌ No hardcoded passwords, API keys, or tokens |
| 115 | - ❌ No production credentials in documentation |
| 116 | - ✅ Links only to legitimate, trusted sources |
| 117 | - ✅ No documentation of security bypasses |
| 118 | |
| 119 | #### 4. Behavior Alignment |
| 120 | - ✅ Every command matches stated purpose |
| 121 | - ✅ No hidden capabilities |
| 122 | - ✅ No unnecessary file system access |
| 123 | - ✅ Network access only when explicitly required |
| 124 | |
| 125 | ### Daily Audit Checks |
| 126 | |
| 127 | 1. **Scan all installed skills** with the automated scanner |
| 128 | 2. **Review any new HIGH severity issues** |
| 129 | 3. **Check for modified files** in skill directories |
| 130 | 4. **Verify skill descriptions still match behavior** |
| 131 | 5. **Audit new dependencies** if added |
| 132 | |
| 133 | ## Specific Security Concerns |
| 134 | |
| 135 | ### Prompt Injection Detection |
| 136 | |
| 137 | Read `references/prompt-injection-patterns.md` for comprehensive patterns. |
| 138 | |
| 139 | **Key indicators:** |
| 140 | - Instructions to ignore/discard context |
| 141 | - System override or bypass commands |
| 142 | - Authority impersonation (act as administrator, etc.) |
| 143 | - Jailbreak attempts (unrestricted mode, etc.) |
| 144 | - Instruction replacement patterns |
| 145 | |
| 146 | **Detection:** |
| 147 | ```python |
| 148 | # Automated pattern matching |
| 149 | import r |