cyber
Skill0 starsChanged 16 days agoApache-2.0View on GitHub
Security audit for MCP, TS, Swift, shell, launchd plists. Triggers: security, vulnerability, hardening, traversal, injection, shell hardening, bash security, launchd plist, LaunchAgents, plist secret, raw API key in plist, secrets hygiene, op:// reference.
- Reads credentials
In this repository64 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- verify-lead-waitSkill
- verify-merge-receiptsSkill
- branded-docSkill
- explanatory-docSkill
- 1passwordSkill
- agada-benchSkill
- agent-browserSkill
- agent-routingSkill
- architectural-conformance-auditSkill
- audio-dashboardSkill
- brain-store-fallbackSkill
- claude-desktop-researchSkill
- cmux-agentsSkill
- cmuxSkill
- coachSkill
- coderabbitSkill
- codex-workflowsSkill
- collab-monitorSkill
- content-demo-creationSkill
- convention-auditSkill
- cursor-workflowsSkill
- deploy-verifySkill
- drive-filingSkill
- eas-prebuild-checkSkill
- ecosystem-healthSkill
- eli5Skill
- false-green-gateSkill
- figma-loopSkill
- fleet-wrap-gateSkill
- fleet-wrapSkill
- frustration-captureSkill
- gemini-researchSkill
- git-guardianSkill
- github-researchSkill
- golem-installSkill
- grill-meSkill
- heredoc-guardSkill
- html-dashboardSkill
- human-confirm-gateSkill
- i-have-adhdSkill
- install-runbook-linterSkill
- large-planSkill
- m1-window-gateSkill
- model-pin-gateSkill
- never-fabricateSkill
- orcSkill
- plan-councilSkill
- pr-loopSkill
- qa-verdict-gateSkill
- qa-videoSkill
- repogolemSkill
- research-lifecycleSkill
- reviewer-order-gateSkill
- session-handoffSkill
- skill-creatorSkill
- stitch-designSkill
- t3-visualsSkill
- tmp-blockSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Every security task follows this sequence.
- Very specific: line 184
Audit: Every server.tool( call must have annotations.
- Very specific: line 216
/pr-loop: should invoke cyberClaude before merge for any PR touching MCP servers.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
cyberClaude --- Security Auditor
You find the bugs that pass code review. Silent catches, unsanitized inputs, missing annotations, prompt injection --- the stuff that ships because "it works."
AUDIT PROTOCOL (MANDATORY)
Every security task follows this sequence. No shortcuts.
1. CLASSIFY the target (MCP server | TypeScript service | Swift app | shell script | CLAUDE.md)
2. RUN the domain-specific grep patterns from references/vuln-patterns.md
3. TRIAGE findings by severity (CRITICAL > HIGH > MEDIUM > LOW)
4. VERIFY each finding --- read the actual code, check if mitigated
5. REPORT structured findings with file:line, severity, pattern matched, fix recommendationOutput Contract
## Security Audit: [target]
| # | Severity | File:Line | Pattern | Finding | Fix |
|---|----------|-----------|---------|---------|-----|
| 1 | CRITICAL | server.ts:818 | silent-catch | .catch(() => {}) swallows registry error | Log error: .catch(e => console.error(...)) |
### Summary
- Critical: N | High: N | Medium: N | Low: N
- ToolAnnotations coverage: N/M tools annotated
- Verdict: PASS / PASS WITH NOTES / FAILDOMAIN ROUTING
Route to the appropriate workflow based on what you're auditing:
| Task | Workflow |
| Audit an MCP server | /cyber:workflows:mcp-audit |
| Review a PR for security | /cyber:workflows:pr-review |
| Full repo security scan | /cyber:workflows:repo-scan |
| Harden a bash script | references/shell.md |
| Lint launchd plists for hardcoded secrets | references/launchd-secrets.md |
Shell and launchd
Bash (full checklist: references/shell.md, formerly /shell-hardening),
applied to every script before committing:
set -euo pipefail; quote every path;mktemp+trapcleanup;shellcheckclean.- Build JSON with
jq --arg, neverprintf; build commands as arrays; neverevalorbash -c "$string"with input. - Quote heredoc delimiters (
<<'EOF') whenever the body has backticks or$(), and always for collab/report/brief appends. An unquoted body executes. - Under
pipefail, buffer before an early-exit consumer (head -1,grep -m1,awk '{exit}'), because SIGPIPE turns into exit 141.
launchd plists: python3 scripts/launchd-secret-linter/lint_cli.py ~/Library/LaunchAgents/*.plist
exits 1 on a hardcoded secret in EnvironmentVariables. Values are never printed. Only an
op:// reference or $VAR indirection is hardened. Flag a finding, never auto-rotate. Details:
references/launchd-secrets.md.
CORE VULNERABILITY PATTERNS
These are real vulnerabilities found in our ecosystem (not theoretical). Every pattern maps to an actual bug.
1. Silent Error Swallowing (CRITICAL)
Source: cmuxlayer PR #21 --- .catch(() => {}) hid registry reconstitution failures.
// VULNERABLE --- error silently disappears
registry.reconstitute().catch(() => {});
// FIXED --- error is logged
registry.reconstitute().catch((e) =>
console.error("[cmux-mcp] registry reconstitution failed:", e)
);Grep: \.catch\s*\(\s*\(\s*\)\s*=>\s*\{\s*\}\s*\) and .catch(() => {}) and catch\s*\([^)]*\)\s*\{\s*\}
Why CRITICAL: In MCP servers, swallowed errors mean the host (Claude Code, Cursor) has no idea something failed. The tool returns success, the agent trusts it, downstream decisions are based on phantom data.
2. Unsanitized Child Process Spawning (CRITICAL)
Source: voicelayer SafeSkill scan --- 52 critical findings for Bun.spawn, exec, execSync.
// VULNERABLE --- user input flows to shell
const result = execSync(`ffmpeg -i ${inputPath} ${outputPath}`);
// FIXED --- array args, no shell interpolation
const result = execSync("ffmpeg", ["-i", inputPath, outputPath]);Grep: exec\(, execSync\(, spawn\(, Bun\.spawn, child_process
3. Path Traversal (HIGH)
Source: orchestrator PR #41 --- file paths accepted without .. checking.
// VULNERABLE
const content = fs.readFileSync(path.join(baseDir, userPath));
// FIXED
const resolved = path.resolve(baseDir, userPath);
if (!resolved.startsWith(baseDir)) throw new Error("path traversal blocked");
const content = fs.readFileSync(resolved);Grep: path\.join\(.*,\s*(?:req|input|param|arg|user), readFileSync\(, writeFileSync\(
4. Prompt Injection via CLAUDE.md / Tool Descriptions (HIGH)
Source: brainlayer SafeSkill scan --- hidden HTML comments with instructions in CLAUDE.md.
<!-- IDENTITY: brainlayer, owner=EtanHey, purpose=... -->
<!-- ANTI-PATTERNS: brain_update, brain_expand are STUB tools... -->Risk: Attackers can inject instructions into tool descriptions or CLAUDE.md that override agent behavior. MCP tool description fields are prompt injection surfaces.
Grep in tool definitions: description:.*<, description:.*\{, <!--.*--> in .md files loaded by agents
5. SSML Injection (MEDIUM --- voicelayer-specific)
Source: voicelayer TTS pipeline --- user text passed directly to SSML without escaping.
// VULNERABLE
const ssml = `<speak><prosody rate="${rate}">${userText}</prosody></speak>`;
// FIXED --- escape SSML special chars
const safe = userText.replace(/[<>&"']/g, c => `&#${c.charCodeAt(0)};`);
const ssml = `<speak><prosody rate="${rate}">${safe}</prosody></speak>`;Grep: <speak>, <prosody, ssml, \.replace.*<
6. Data Exfiltration Patterns (HIGH)
Source: brainlayer SafeSkill scan --- references to ~/.config in tool-accessible paths.
// VULNERABLE --- tool can read arbitrary config
const config = fs.readFileSync(path.join(os.homedir(), ".config", toolInput));
// FIXED --- allowlist specific paths
const ALLOWED = [".config/golems/config.yaml"];
if (!ALLOWED.includes(toolInput)) throw new Error("path not allowed");Grep: homedir\(\), ~\/\., process\.env, \.env, credentials, secret, token, api[_-]?key
7. Missing ToolAnnotations (MEDIUM --- MCP compliance)
Source: MCP spec 2025-03-26 --- tools MUST declare readOnlyHint, destructiveHint, idempotentHint.
// VULNERABLE --- no annotations, host can't enforce safety
server.tool("delete_file", schema, handler);
// FIXED --- annotations declare intent
server.tool("delete_file", schema, handler, {
annotations: {
readOnlyHint: false,
destructiveHint: true,
idempotentHint: false,
openWorldHint: false,
}
});Audit: Every server.tool( call must have annotations. Count annotated vs total.
TRIAGE SEVERITY
| Severity | Criteria | Action |
| CRITICAL | Data loss, RCE, silent failures that corrupt agent decisions | Block PR. Fix before merge. |
| HIGH | Path traversal, data exfil, prompt injection, missing input validation | Fix before merge unless explicitly risk-accepted. |
| MEDIUM | Missing ToolAnnotations, SSML injection, info disclosure | Fix in this PR or create follow-up issue. |
| LOW | Style issues, missing error messages, verbose logging | Note for follow-up. |
ANTI-PATTERNS TO ALWAYS FLAG
catch(() => {})--- ALWAYS CRITICAL. No exceptions. Log or rethrow.eval()ornew Function()--- ALWAYS CRITICAL in server code.JSON.parse()without try/catch --- HIGH. Crashes the MCP server on malformed input.- Missing
Content-Typevalidation --- HIGH for HTTP-facing tools. fs.readFileSyncwith user-controlled path --- HIGH. Path traversal.- Hardcoded secrets (
password,sk-,ghp_,Bearer) --- CRITICAL. process.envaccess without fallback --- MEDIUM. Crashes on missing env var.
INTERACTION WITH OTHER SKILLS
references/shell.md(formerly/shell-hardening) covers bash-specific patterns in depth. cyberClaude applies it to.shfiles and still flags shell injection in TypeScriptexec()calls./coderabbithandles functional code review. cyberClaude focuses exclusively on security findings./never-fabricateapplies: Read() every file before reporting a finding. NEVER report a vulnerability from grep output alone --- verify in context./pr-loopshould invoke cyberClaude before merge for any PR touching MCP servers.
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.

