[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M758Z10XSK1653HD3PDSC53G":3,"skill-same:01M758Z10XSK1653HD3PDSC53G":53},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":33,"repositoryHtmlUrl":34,"repositoryHomepageUrl":35,"ownerHtmlUrl":36,"ownerBlogUrl":6,"ownerDescription":37,"updatedAt":38,"install":39,"resources":52},"01M758Z10XSK1653HD3PDSC53G","threat-defense-pipeline",null,"Layered defense system: fail2ban jails + nginx IP blocking + daily auto-deploy pipeline. How to add blocked IPs, check jails, and deploy.","lukemcqueen\u002Fsteadfaste-fleet","lukemcqueen","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F405240?v=4","01M757MHPAGRXTJAT46SKZP98R","Luke McQueen","01M757MHPZ573KP8DT9GB8SBQ7",4,"MIT","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fsecurity\u002Fthreat-defense-pipeline\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: threat-defense-pipeline\ndescription: \"Layered defense system: fail2ban jails + nginx IP blocking + daily auto-deploy pipeline. How to add blocked IPs, check jails, and deploy.\"\nversion: 1.0.0\nauthor: Steadfaste Fleet (steadfaste-fleet)\nplatforms: [linux, macos]\ntrigger: when adding blocked IPs, checking threat activity, or troubleshooting blocked connections\n---\n\n# Threat Defense Pipeline\n\n## Overview\n\nSteadfaste Fleet runs a **three-layer defense** against port scanning and brute force:\n\n```\nLayer 1: fail2ban (sshd + nginx-badbots jails)  → auto-bans at OS\u002Fnginx level\nLayer 2: nginx-security-scanner (fail2ban ban collector) → adds CONFIRMED abusers only\nLayer 3: threat-pipeline cron (daily 5AM)        → deploys + commits blocked IPs\n```\n\n## How to Add a Blocked IP\n\nThe single source of truth is **`ops\u002Finstall\u002Fdeploy\u002Fnginx\u002Fblocked_ips.add`** in the steadfaste-fleet repo. One IP per line.\n\n### Quick add (for agents with repo access):\n\n```bash\ncd ~\u002Fsteadfaste-fleet\necho \"1.2.3.4\" >> ops\u002Finstall\u002Fdeploy\u002Fnginx\u002Fblocked_ips.add\n```\n\n### Commit and deploy immediately:\n\n```bash\ncd ~\u002Fsteadfaste-fleet\ngit add ops\u002Finstall\u002Fdeploy\u002Fnginx\u002Fblocked_ips.add\n# SKIP_SCORE=1 has been REMOVED. Use _create_gov_lock instead\n# (see nginx-threat-pipeline.sh for the temp lock pattern)\ngit commit -m \"auto: block \u003Creason> [pipeline]\"\n# No SKIP_PRE_PUSH needed — the pipeline scripts create a temp\n# governance lock before pushing (see nginx-threat-pipeline.sh)\ngit push origin main\n```\n\nThen deploy live:\n\n```bash\n# Deploy blocked IPs (minimal-root)\nbash ~\u002F.hermes\u002Fscripts\u002Fdeploy-blocked-ips.sh\n```\n\n### OR let the daily pipeline handle it:\n\nThe pipeline runs at **05:00 KST daily**. It automatically:\n1. Collects fail2ban-confirmed bans (sole source since 2026-08-08 — the old\n   ≥10 req\u002F60min volume threshold was removed because legit dashboard users\n   trip it: one SPA refresh = 15-30 parallel requests)\n2. Adds new IPs to `blocked_ips.add` (skipping allow-listed IPs)\n3. Commits and pushes to GitHub\n4. Deploys to nginx (reloads config)\n5. Reloads fail2ban nginx-badbots jail\n\nIf the pipeline finds no new IPs, it stays silent (watchdog pattern).\n\n## ⚠ Private IP Filtering (RFC 1918)\n\nAll three IP collection paths in the pipeline **reject private\u002Freserved IPs**:\n\n| Path | File | Filter |\n|------|------|--------|\n| nginx log scanner | `ops\u002Fscripts\u002Fmanage\u002Fnginx-security-scanner.sh` | `^127.\\|10.\\|172.(16-31).\\|192.168.\\|0.\\|169.254.\\|224.\\|240.` |\n| fail2ban extraction (scanner) | `ops\u002Fscripts\u002Fmanage\u002Fnginx-security-scanner.sh` | Same regex — added 2026-07-07 |\n| fail2ban extraction (pipeline) | `ops\u002Fscripts\u002Fmanage\u002Fnginx-threat-pipeline.sh` | `grep -vE` on private ranges — added 2026-07-07 |\n| agent-submitted IPs | `ops\u002Fscripts\u002Fmanage\u002Fnginx-threat-pipeline.sh` step 0 | Same `grep -vE` — added 2026-07-07 |\n| Config generator | `ops\u002Finstall\u002Fdeploy\u002Fnginx\u002Ffix-blocked-ips.py` | `PRIVATE_RANGES` regex in `is_valid_public_ip()` |\n\n**Why this matters:** fail2ban can ban a LAN IP (your gateway\u002Frouter) when attackers hit your server through its NAT. Without filtering, the pipeline blindly adds gateway IPs to the blocklist. These filters prevent that.\n\n**If you ever need to add a private IP to the blocklist** (unusual — only if nginx is behind an internal reverse proxy), add it to `\u002Fetc\u002Fnginx\u002Fallow-ips-manual.conf` instead to ensure it's never blocked.\n\n## fail2ban Jails\n\n| Jail | Target | Ban Action |\n|------|--------|------------|\n| `sshd` | SSH brute force | iptables ban |\n| `nginx-badbots` | Bad bot HTTP traffic | iptables ban |\n\n### Check jail status:\n\n```bash\nsudo fail2ban-client status                  # list all jails\nsudo fail2ban-client status sshd             # sshd ban list\n```\n\n## Pipeline Self-Healing\n\nThe threat-pipeline script (`ops\u002Fscripts\u002Fmanage\u002Fnginx-threat-pipeline.sh`) uses `deploy-blocked-ips.sh` for minimal-root deploy:\n- Generates `blocked_ips.conf` from `blocked_ips.add` using `fix-blocked-ips.py` (no root)\n- Deploys with a single tight `sudo cp` rule (one specific path only)\n- Validates with `sudo nginx -t`, reloads with `sudo nginx -s reload`\n- Git commits use a temp governance lock (see nginx-threat-pipeline.sh `_create_gov_lock` pattern) — no bypass flags needed\n- Git pushes (SKIP_PRE_PUSH=1 has been removed — pre-push hook is mandatory)\n\n## Blocklist Classification & Cleanup (2026-08-08)\n\n**Only true abusers belong in `blocked_ips.add`** (Luke directive). The list\nwas polluted with legit users by the old volume threshold — see runbook\n`docs\u002Frunbooks\u002Fblocklist-cleanup-ddos-relax.md` for the full story.\n\n**Allow-list (manual, agent-tamper-proof):** `\u002Fetc\u002Fnginx\u002Fallow-ips-manual.conf`\nis the ONLY surface that protects a legit IP from the blocklist. Agents may\nREAD it (the scanner skips allow-listed IPs) but never EDIT it — that's a\nhuman action. Templates are manually installed for the same reason.\n\n**Classifier tool:** `classify-blocked-ips.sh` (deployed by fleet-update)\nsplits the list into STRONG (fail2ban-banned, keep) vs WEAK (volume-only,\nreview) vs stale vs allow-listed. Run it on the host with the ban evidence\n(Joseph is primary discovery host):\n\n```bash\nbash ~\u002F.steadfaste-fleet\u002Fscripts\u002Fclassify-blocked-ips.sh\n```\n\nReview-only — never edits or deploys. The safety net: fail2ban stays armed,\nso any IP removed that is genuinely attacking gets re-banned automatically.\n\n## Manual Deploy (for agents with sudo access)\n\n```bash\n# Deploy blocked IPs (minimal-root — only needs sudo cp)\nbash ~\u002F.hermes\u002Fscripts\u002Fdeploy-blocked-ips.sh\n\n# Or from the repo directly:\nbash ~\u002Fsteadfaste-fleet\u002Fops\u002Fscripts\u002Fmanage\u002Fdeploy-blocked-ips.sh\n```\n\nGenerates `blocked_ips.conf` from `blocked_ips.add`, deploys with `sudo cp`,\nvalidates with `nginx -t`, and reloads nginx. No broad sudo script needed.\n\n## Architecture\n\n```\n     fail2ban ──> iptables ban (immediate)\n         │\n    nginx scanner ──> blocked_ips.add ──> pipeline ──> git commit\u002Fpush\n                                                    │\n                                             install-nginx-full.sh\n                                                    │\n                                              nginx reload\n                                              fail2ban reload\n```\n","# Threat Defense Pipeline\n\n## Overview\n\nSteadfaste Fleet runs a **three-layer defense** against port scanning and brute force:\n\n```\nLayer 1: fail2ban (sshd + nginx-badbots jails)  → auto-bans at OS\u002Fnginx level\nLayer 2: nginx-security-scanner (fail2ban ban collector) → adds CONFIRMED abusers only\nLayer 3: threat-pipeline cron (daily 5AM)        → deploys + commits blocked IPs\n```\n\n## How to Add a Blocked IP\n\nThe single source of truth is **`ops\u002Finstall\u002Fdeploy\u002Fnginx\u002Fblocked_ips.add`** in the steadfaste-fleet repo. One IP per line.\n\n### Quick add (for agents with repo access):\n\n```bash\ncd ~\u002Fsteadfaste-fleet\necho \"1.2.3.4\" >> ops\u002Finstall\u002Fdeploy\u002Fnginx\u002Fblocked_ips.add\n```\n\n### Commit and deploy immediately:\n\n```bash\ncd ~\u002Fsteadfaste-fleet\ngit add ops\u002Finstall\u002Fdeploy\u002Fnginx\u002Fblocked_ips.add\n# SKIP_SCORE=1 has been REMOVED. Use _create_gov_lock instead\n# (see nginx-threat-pipeline.sh for the temp lock pattern)\ngit commit -m \"auto: block \u003Creason> [pipeline]\"\n# No SKIP_PRE_PUSH needed — the pipeline scripts create a temp\n# governance lock before pushing (see nginx-threat-pipeline.sh)\ngit push origin main\n```\n\nThen deploy live:\n\n```bash\n# Deploy blocked IPs (minimal-root)\nbash ~\u002F.hermes\u002Fscripts\u002Fdeploy-blocked-ips.sh\n```\n\n### OR let the daily pipeline handle it:\n\nThe pipeline runs at **05:00 KST daily**. It automatically:\n1. Collects fail2ban-confirmed bans (sole source since 2026-08-08 — the old\n   ≥10 req\u002F60min volume threshold was removed because legit dashboard users\n   trip it: one SPA refresh = 15-30 parallel requests)\n2. Adds new IPs to `blocked_ips.add` (skipping allow-listed IPs)\n3. Commits and pushes to GitHub\n4. Deploys to nginx (reloads config)\n5. Reloads fail2ban nginx-badbots jail\n\nIf the pipeline finds no new IPs, it stays silent (watchdog pattern).\n\n## ⚠ Private IP Filtering (RFC 1918)\n\nAll three IP collection paths in the pipeline **reject private\u002Freserved IPs**:\n\n| Path | File | Filter |\n|------|------|--------|\n| nginx log scanner | `ops\u002Fscripts\u002Fmanage\u002Fnginx-security-scanner.sh` | `^127.\\|10.\\|172.(16-31).\\|192.168.\\|0.\\|169.254.\\|224.\\|240.` |\n| fail2ban extraction (scanner) | `ops\u002Fscripts\u002Fmanage\u002Fnginx-security-scanner.sh` | Same regex — added 2026-07-07 |\n| fail2ban extraction (pipeline) | `ops\u002Fscripts\u002Fmanage\u002Fnginx-threat-pipeline.sh` | `grep -vE` on private ranges — added 2026-07-07 |\n| agent-submitted IPs | `ops\u002Fscripts\u002Fmanage\u002Fnginx-threat-pipeline.sh` step 0 | Same `grep -vE` — added 2026-07-07 |\n| Config generator | `ops\u002Finstall\u002Fdeploy\u002Fnginx\u002Ffix-blocked-ips.py` | `PRIVATE_RANGES` regex in `is_valid_public_ip()` |\n\n**Why this matters:** fail2ban can ban a LAN IP (your gateway\u002Frouter) when attackers hit your server through its NAT. Without filtering, the pipeline blindly adds gateway IPs to the blocklist. These filters prevent that.\n\n**If you ever need to add a private IP to the blocklist** (unusual — only if nginx is behind an internal reverse proxy), add it to `\u002Fetc\u002Fnginx\u002Fallow-ips-manual.conf` instead to ensure it's never blocked.\n\n## fail2ban Jails\n\n| Jail | Target | Ban Action |\n|------|--------|------------|\n| `sshd` | SSH brute force | iptables ban |\n| `nginx-badbots` | Bad bot HTTP traffic | iptables ban |\n\n### Check jail status:\n\n```bash\nsudo fail2ban-client status                  # list all jails\nsudo fail2ban-client status sshd             # sshd ban list\n```\n\n## Pipeline Self-Healing\n\nThe threat-pipeline script (`ops\u002Fscripts\u002Fmanage\u002Fnginx-threat-pipeline.sh`) uses `deploy-blocked-ips.sh` for minimal-root deploy:\n- Generates `blocked_ips.conf` from `blocked_ips.add` using `fix-blocked-ips.py` (no root)\n- Deploys with a single tight `sudo cp` rule (one specific path only)\n- Validates with `sudo nginx -t`, reloads with `sudo nginx -s reload`\n- Git commits use a temp governance lock (see nginx-threat-pipeline.sh `_create_gov_lock` pattern) — no bypass flags needed\n- Git pushes (SKIP_PRE_PUSH=1 has been removed — pre-push hook is mandatory)\n\n## Blocklist Classification & Cleanup (2026-08-08)\n\n**Only true abusers belong in `blocked_ips.add`** (Luke directive). The list\nwas polluted with legit users by the old volume threshold — see runbook\n`docs\u002Frunbooks\u002Fblocklist-cleanup-ddos-relax.md` for the full story.\n\n**Allow-list (manual, agent-tamper-proof):** `\u002Fetc\u002Fnginx\u002Fallow-ips-manual.conf`\nis the ONLY surface that protects a legit IP from the blocklist. Agents may\nREAD it (the scanner skips allow-listed IPs) but never EDIT it — that's a\nhuman action. Templates are manually installed for the same reason.\n\n**Classifier tool:** `classify-blocked-ips.sh` (deployed by fleet-update)\nsplits the list into STRONG (fail2ban-banned, keep) vs WEAK (volume-only,\nreview) vs stale vs allow-listed. Run it on the host with the ban evidence\n(Joseph is primary discovery host):\n\n```bash\nbash ~\u002F.steadfaste-fleet\u002Fscripts\u002Fclassify-blocked-ips.sh\n```\n\nReview-only — never edits or deploys. The safety net: fail2ban stays armed,\nso any IP removed that is genuinely attacking gets re-banned automatically.\n\n## Manual Deploy (for agents with sudo access)\n\n```bash\n# Deploy blocked IPs (minimal-root — only needs sudo cp)\nbash ~\u002F.hermes\u002Fscripts\u002Fdeploy-blocked-ips.sh\n\n# Or from the repo directly:\nbash ~\u002Fsteadfaste-fleet\u002Fops\u002Fscripts\u002Fmanage\u002Fdeploy-blocked-ips.sh\n```\n\nGenerates `blocked_ips.conf` from `blocked_ips.add`, deploys with `sudo cp`,\nvalidates with `nginx -t`, and reloads nginx. No broad sudo script needed.\n\n## Architecture\n\n```\n     fail2ban ──> iptables ban (immediate)\n         │\n    nginx scanner ──> blocked_ips.add ──> pipeline ──> git commit\u002Fpush\n                                                    │\n                                             install-nginx-full.sh\n                                                    │\n                                              nginx reload\n                                              fail2ban reload\n```\n",{"name":5,"author":24,"trigger":25,"version":26,"platforms":27,"description":7},"Steadfaste Fleet (steadfaste-fleet)","when adding blocked IPs, checking threat activity, or troubleshooting blocked connections","1.0.0",[28,29],"linux","macos","main","2e6aa8d15ab0a366c90be54f61bf9c6e97015e83","skills\u002Fsecurity\u002Fthreat-defense-pipeline",1,"https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet","steadfaste.com","https:\u002F\u002Fgithub.com\u002Flukemcqueen","AI Architect | Building Hermes Cortex: governed multi-agent AI for autonomous software engineering | Enterprise Tech Consultant","2026-11-14 22:33:34",{"source":8,"skillName":5,"commands":40,"prompt":50,"zipAvailable":51},[41,44,47],{"tool":42,"command":43},"npx","npx skills add lukemcqueen\u002Fsteadfaste-fleet --skill threat-defense-pipeline",{"tool":45,"command":46},"bunx","bunx skills add lukemcqueen\u002Fsteadfaste-fleet --skill threat-defense-pipeline",{"tool":48,"command":49},"pnpm","pnpm dlx skills add lukemcqueen\u002Fsteadfaste-fleet --skill threat-defense-pipeline","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fsecurity\u002Fthreat-defense-pipeline\u002FSKILL.md",true,[],[54,62,69,76,83,90],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":61},"01M7DXY4G8NSVB59K8B6S2AQNP","macbook-linux-maintenance","Legacy MacBook Linux fixes: GPU wedge, reboot hang, thermal.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fmacbook-linux-maintenance\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":61},"01M7DXXYJCXFJ3TGB84ZQ8KFE6","governance-regression-triage","Triage a host's governance issues: what changed.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fgovernance-regression-triage\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":61},"01M7DXXSAP1G8FDRJAMXQGBBMK","enforcement-immutability","Use when enforcement files lose their immutable flag.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fenforcement-immutability\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":61},"01M78SSDQVRYX64Y16X32TC0NS","steadfaste-fleet-repo-deploy","Use when committing to the steadfaste-fleet repo.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fsteadfaste-fleet-repo-deploy\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":61},"01M78SS928F3R2RJAYVW4E30CE","steadfaste-fleet-maintenance","Maintain an installed Steadfaste Fleet instance — update both the upstream Hermes Agent and the fleet repo layer, merge diverged histories, sync skills safely, and troubleshoot common issues. Covers the dual-update workflow (hermes update + fleet-update.sh), encrypted brain data backup, mycortex import, and recovery techniques.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fsteadfaste-fleet-maintenance\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":61},"01M78SP1CHW0T0BWE5ZT6JBPX8","fleet-preflight","DEPRECATED alias — merged into survey-before-action (2026-08-20). Load survey-before-action instead; its \"Repo-Specific Pre-Flight\" section covers git search, Hermes boundary, and deployment verification.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Ffleet-preflight\u002FSKILL.md",[],[]]