cyber-audit
Hard rules
- Read-only. No installs, removes, upgrades, restarts, network calls, or file modifications outside
~/Documents/security-audits/.
- No
sudo. Never.
- One report per invocation. Always end by writing the
.md file (even if the verdict is "Not affected" — the audit trail matters).
- If a check requires a state-changing command, skip it and note "not checked (would require state change)" in the table. Do not run it.
Workflow
- Identify scope. Extract from the advisory: package/binary name, affected versions, platform (macOS / Linux / Windows), attack vector (supply chain / RCE / local / network).
- Run checks in parallel (Bash tool, multiple calls in one message). Pick relevant checks for the advisory type — don't run all of them.
- Build the table as you go. Each row = one check + concrete result (version number, path, "None", "N/A").
- Write the report to
~/Documents/security-audits/YYYY-MM-DD-<short-kebab-slug>.md. Use today's date from the environment header.
- Tell the user the verdict in one line + path to the report.
Check menu (pick what's relevant)
# --- Node / npm ecosystem (supply-chain advisories) ---
which npm pnpm yarn; npm root -g; pnpm root -g 2>/dev/null
ls /opt/homebrew/lib/node_modules # global npm
find ~ -maxdepth 8 -type d -name "<pkg>" 2>/dev/null \
| grep -v -E "(Library/Caches|\.Trash)" # installed copies
find ~/Documents ~/Desktop ~/Downloads -maxdepth 8 -type f \
\( -name "package.json" -o -name "package-lock.json" \
-o -name "pnpm-lock.yaml" -o -name "yarn.lock" \) 2>/dev/null \
| xargs grep -l "<pkg>" 2>/dev/null # direct + transitive
# --- Python ecosystem ---
which python3 pip pipx uv
pip list 2>/dev/null | grep -i "<pkg>"
find ~/Documents -maxdepth 6 -name "requirements*.txt" -o -name "pyproject.toml" \
-o -name "poetry.lock" -o -name "uv.lock" 2>/dev/null | xargs grep -l "<pkg>" 2>/dev/null
# --- Homebrew / system binaries ---
brew list --versions <formula> 2>/dev/null
which <binary>; <binary> --version 2>/dev/null
# --- Running processes / listeners (for RCE / network CVEs) ---
pgrep -lf "<binary>"
lsof -iTCP -sTCP:LISTEN -P -n 2>/dev/null | grep "<port>"
# --- LaunchAgents / LaunchDaemons (persistence / autostart) ---
ls ~/Library/LaunchAgents /Library/LaunchAgents /Library/LaunchDaemons 2>/dev/null \
| grep -i "<vendor>"
# --- Env vars that change exposure (e.g. OLLAMA_HOST, listening addr) ---
launchctl getenv <VAR>; grep -r "<VAR>" ~/.zshrc ~/.zprofile ~/.config 2>/dev/null
# --- VS Code / browser extensions (for IDE-targeted advisories) ---
ls ~/.vscode/extensions 2>/dev/null | grep -i "<ext>"
If the advisory mentions an ecosystem not above (Rust cargo, Go modules, Ruby gems, Docker images, etc.), apply the same pattern: global install path + manifest grep + running processes.
Report template
File: ~/Documents/security-audits/YYYY-MM-DD-<short-kebab-slug>.md
# <Subject> — Audit
**Date:** YYYY-MM-DD
**Host:** the user's Mac
## <CVEs | Advisory> in scope
- **<ID or source> "<Name>"** — <one-line description>. <Affected versions or scope>.
## Audit results
| Check | Result |
|---|---|
| <Check 1> | <Result> |
| <Check 2> | <Result> |
## Verdict
**<Not affected. | Affected. | Partially affected.>**
- <Rationale bullet 1>
- <Rationale bullet 2>
## Action taken
None — diagnostic only, no files modified, no <packages installed/removed | services started/stopped | firewall rules changed>.
## Follow-ups
- <Actionable item, or "None" if truly nothing>
Match the tone of the two existing reports in ~/Documents/security-audits/ — terse, factual, bulleted, no hedging.
Verdict wording
- Not affected. — package/binary absent, or installed but patched, or not running and not exposed.
- Affected. — vulnerable version present and reachable by the attack vector.
- Partially affected. — present but mitigated (e.g. binary installed but service not running, or listener bound to loopback only). Spell out the mitigation in the bullets.
When to break the read-only rule
Never on your own. If the verdict is "Affected", list the remediation command in Follow-ups and stop. The user runs it.
Reference
Two existing reports in ~/Documents/security-audits/ show the expected style:
baseline-audit.md (long-form baseline audit — different format, do not mimic)
YYYY-MM-DD-example-advisory.md and any newer YYYY-MM-DD-*.md files (this is the format to match)
1---
2name: cyber-audit
3description: Read-only exposure audit of the user's Mac (and ~/Documents/code projects) for a CVE, breach, malicious package, or other security advisory, then write a structured report to ~/Documents/security-audits/. Use when the user shares a breach/CVE/malware/supply-chain advisory and asks if they're affected, says "scan my system for X", "are we affected by Y", "check if I'm vulnerable to Z", or requests any hack/breach/cyber/vulnerability audit on this Mac. Output matches the existing audit format in ~/Documents/security-audits/.
4disable-model-invocation: true
5metadata:
6 source: https://skillmd.com/skills/solizardking/cyber-audit
7---
8
9# cyber-audit
10
11## Hard rules
12
13- **Read-only.** No installs, removes, upgrades, restarts, network calls, or file modifications outside `~/Documents/security-audits/`.
14- **No `sudo`.** Never.
15- **One report per invocation.** Always end by writing the `.md` file (even if the verdict is "Not affected" — the audit trail matters).
16- If a check requires a state-changing command, **skip it and note "not checked (would require state change)"** in the table. Do not run it.
17
18## Workflow
19
201. **Identify scope.** Extract from the advisory: package/binary name, affected versions, platform (macOS / Linux / Windows), attack vector (supply chain / RCE / local / network).
212. **Run checks in parallel** (Bash tool, multiple calls in one message). Pick relevant checks for the advisory type — don't run all of them.
223. **Build the table** as you go. Each row = one check + concrete result (version number, path, "None", "N/A").
234. **Write the report** to `~/Documents/security-audits/YYYY-MM-DD-<short-kebab-slug>.md`. Use today's date from the environment header.
245. **Tell the user** the verdict in one line + path to the report.
25
26## Check menu (pick what's relevant)
27
28```bash
29# --- Node / npm ecosystem (supply-chain advisories) ---
30which npm pnpm yarn; npm root -g; pnpm root -g 2>/dev/null
31ls /opt/homebrew/lib/node_modules # global npm
32find ~ -maxdepth 8 -type d -name "<pkg>" 2>/dev/null \
33 | grep -v -E "(Library/Caches|\.Trash)" # installed copies
34find ~/Documents ~/Desktop ~/Downloads -maxdepth 8 -type f \
35 \( -name "package.json" -o -name "package-lock.json" \
36 -o -name "pnpm-lock.yaml" -o -name "yarn.lock" \) 2>/dev/null \
37 | xargs grep -l "<pkg>" 2>/dev/null # direct + transitive
38
39# --- Python ecosystem ---
40which python3 pip pipx uv
41pip list 2>/dev/null | grep -i "<pkg>"
42find ~/Documents -maxdepth 6 -name "requirements*.txt" -o -name "pyproject.toml" \
43 -o -name "poetry.lock" -o -name "uv.lock" 2>/dev/null | xargs grep -l "<pkg>" 2>/dev/null
44
45# --- Homebrew / system binaries ---
46brew list --versions <formula> 2>/dev/null
47which <binary>; <binary> --version 2>/dev/null
48
49# --- Running processes / listeners (for RCE / network CVEs) ---
50pgrep -lf "<binary>"
51lsof -iTCP -sTCP:LISTEN -P -n 2>/dev/null | grep "<port>"
52
53# --- LaunchAgents / LaunchDaemons (persistence / autostart) ---
54ls ~/Library/LaunchAgents /Library/LaunchAgents /Library/LaunchDaemons 2>/dev/null \
55 | grep -i "<vendor>"
56
57# --- Env vars that change exposure (e.g. OLLAMA_HOST, listening addr) ---
58launchctl getenv <VAR>; grep -r "<VAR>" ~/.zshrc ~/.zprofile ~/.config 2>/dev/null
59
60# --- VS Code / browser extensions (for IDE-targeted advisories) ---
61ls ~/.vscode/extensions 2>/dev/null | grep -i "<ext>"
62```
63
64If the advisory mentions an ecosystem not above (Rust cargo, Go modules, Ruby gems, Docker images, etc.), apply the same pattern: global install path + manifest grep + running processes.
65
66## Report template
67
68File: `~/Documents/security-audits/YYYY-MM-DD-<short-kebab-slug>.md`
69
70```markdown
71# <Subject> — Audit
72
73**Date:** YYYY-MM-DD
74**Host:** the user's Mac
75
76## <CVEs | Advisory> in scope
77
78- **<ID or source> "<Name>"** — <one-line description>. <Affected versions or scope>.
79
80## Audit results
81
82| Check | Result |
83|---|---|
84| <Check 1> | <Result> |
85| <Check 2> | <Result> |
86
87## Verdict
88
89**<Not affected. | Affected. | Partially affected.>**
90
91- <Rationale bullet 1>
92- <Rationale bullet 2>
93
94## Action taken
95
96None — diagnostic only, no files modified, no <packages installed/removed | services started/stopped | firewall rules changed>.
97
98## Follow-ups
99
100- <Actionable item, or "None" if truly nothing>
101```
102
103Match the tone of the two existing reports in `~/Documents/security-audits/` — terse, factual, bulleted, no hedging.
104
105## Verdict wording
106
107- **Not affected.** — package/binary absent, or installed but patched, or not running and not exposed.
108- **Affected.** — vulnerable version present *and* reachable by the attack vector.
109- **Partially affected.** — present but mitigated (e.g. binary installed but service not running, or listener bound to loopback only). Spell out the mitigation in the bullets.
110
111## When to break the read-only rule
112
113Never on your own. If the verdict is "Affected", list the remediation command in **Follow-ups** and stop. The user runs it.
114
115## Reference
116
117Two existing reports in `~/Documents/security-audits/` show the expected style:
118- `baseline-audit.md` (long-form baseline audit — different format, do not mimic)
119- `YYYY-MM-DD-example-advisory.md` and any newer `YYYY-MM-DD-*.md` files (this is the format to match)