security-audit

Solid

Security checklist specific to claude-code-discord-bridge — subprocess injection, env leaks, input validation

AI & Automation 55 stars 28 forks Updated today MIT

Install

View on GitHub

Quality Score: 85/100

Stars 20%
58
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Security Audit — claude-code-discord-bridge Specific This project runs **arbitrary Claude Code sessions** triggered by Discord messages. Security is the #1 priority. ## When to Activate - Before any commit that changes `runner.py`, `_run_helper.py`, or any Cog - When adding new user-facing commands - When modifying subprocess execution or argument passing - When adding new environment variables or configuration - Periodically as a full audit ## Threat Model | Threat | Vector | Mitigation | |--------|--------|------------| | Command injection | User message passed to CLI args | `create_subprocess_exec` (no shell), `--` separator | | Flag injection | Prompt starting with `-` | `--` separator before prompt | | Session hijack | Fake session ID | Strict regex validation `^[a-f0-9\-]+$` | | Skill injection | Malicious skill name | Strict regex validation `^[\w-]+$` | | Secret exfiltration | Claude Bash tool reads env | Strip secrets from subprocess env | | Nesting attack | Claude spawns another claude-code-discord-bridge | Strip `CLAUDECODE` from env | | Token theft | Bot token in logs/errors | Never log tokens, strip from env | ## Checklist ### Subprocess Safety - [ ] All subprocess calls use `asyncio.create_subprocess_exec` (NEVER `shell=True`) - [ ] `--` separator is always placed before user-provided prompt text - [ ] No string formatting/interpolation of user input into command strings - [ ] Session IDs validated with `re.match(r"^[a-f0-9\-]+$", session_id)` - [ ] Sk...

Details

Author
ebibibi
Repository
ebibibi/ebi-agent-chat-relay
Created
6 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category