ワンクリックで
security-audit
Security checklist specific to claude-code-discord-bridge — subprocess injection, env leaks, input validation
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Security checklist specific to claude-code-discord-bridge — subprocess injection, env leaks, input validation
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
ccdb のマイナー/メジャーリリース手順。「v1.4.0としてリリースして」等と言われたときに使う。
Python coding patterns, idioms, and quality standards for claude-code-discord-bridge development
Enforce test-driven development — write tests FIRST, then implement. Mandatory for new features and bug fixes.
Testing patterns for claude-code-discord-bridge — pytest, async testing, mocking Discord objects, TDD workflow
Step-by-step guide to add a new discord.py Cog to the framework
Run full verification pipeline (lint, format, test, security) before committing
| name | security-audit |
| description | Security checklist specific to claude-code-discord-bridge — subprocess injection, env leaks, input validation |
This project runs arbitrary Claude Code sessions triggered by Discord messages. Security is the #1 priority.
runner.py, _run_helper.py, or any Cog| 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 |
asyncio.create_subprocess_exec (NEVER shell=True)-- separator is always placed before user-provided prompt textre.match(r"^[a-f0-9\-]+$", session_id)re.match(r"^[\w-]+$", name)_STRIPPED_ENV_KEYS includes all secret environment variablesDISCORD_BOT_TOKEN is stripped from subprocess envCLAUDECODE is stripped (prevents nesting detection bypass)logger.info/debug/warning/error calls).env file is in .gitignoreuv.lock# Search for dangerous patterns
grep -rn "shell=True" claude_discord/
grep -rn "subprocess\.call" claude_discord/
grep -rn "subprocess\.run" claude_discord/
# Check that secrets are stripped
grep -n "_STRIPPED_ENV_KEYS" claude_discord/claude/runner.py
# Verify .env is gitignored
grep "\.env" .gitignore