repo-ioc-sweep
Inventory what a codebase talks to - extract embedded URLs, IPs, domains, wallets, base64 blobs and shell scripts from a repo, then enrich each endpoint through mlab.sh. Use when the user asks what a repo connects to, wants an egress inventory, or vets a vendor/third-party codebase for suspicious embedded infrastructure.
- License 许可
- MIT
- 最近更新
- 2026-10-22
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- repo-ioc-sweep
- description
- Inventory what a codebase talks to - extract embedded URLs, IPs, domains, wallets, base64 blobs and shell scripts from a repo, then enrich each endpoint through mlab.sh. Use when the user asks what a repo connects to, wants an egress inventory, or vets a vendor/third-party codebase for suspicious embedded infrastructure.
03 SKILL.md 正文
Repo IOC Sweep
mlab output shapes:
${CLAUDE_PLUGIN_ROOT}/docs/tool-reference.md.
"This repo talks to whom?" Answer with an inventory, then a verdict per endpoint. Dependency CODE is supply-chain-audit's job; this skill sweeps the repo's own files.
Workflow
1. Extract
Sweep tracked text files (skip vendored deps, lockfiles, node_modules, minified bundles, test fixtures unless asked) with grep/ripgrep for:
- URLs and bare domains (config files, source, CI workflows, Dockerfiles, install docs)
- IP literals (both in code and in configs - an IP literal in source is a finding by itself)
- crypto wallet shapes (BTC/EVM/SOL patterns)
- long base64/hex blobs (decode ONE layer locally, never execute; re-sweep the decoded content)
- webhooks, telemetry endpoints, update URLs, package registries beyond the defaults
Shell scripts in the repo (install.sh, CI steps, hooks) → scan_bash each: it flags dangerous constructs and extracts IOCs for you.
2. Classify before enriching
Dedupe, then bucket: documentation-only (README badges, examples) / build-time (CI, registries) / runtime (code paths that will fire in production). Runtime endpoints matter most; say which bucket each finding sits in.
3. Enrich
detect_ioc on ambiguous strings; scan_url per URL; scan_ip on IP literals (quota - get_scan_limits first on large sets, budget like ioc-batch); scan_crypto on wallets (crypto quota, chain rules); domain scans only for the few domains central to the verdict.
4. Report
## Egress inventory: <repo>
**Verdict:** <expected profile | surprises found | suspicious>
| Endpoint | Where (file:line) | Bucket | Verdict | Evidence |
### Surprises
<anything a user of this software would not expect it to contact - with the code path>
### Wallets / blobs
<decoded layers, what they contained>
### Blocklist candidates
<defanged>
Rules
- Every finding carries file:line; an inventory without locations cannot be acted on.
- An endpoint being unknown to mlab is not a finding; an endpoint UNEXPECTED for this software is - argue from purpose.
- Decode blobs statically only; never run repo code to observe its traffic.
04 同仓库更多 Skills
threat-watch
Generate a threat landscape digest from mlab.sh - recent critical/KEV CVEs filtered to a declared technology stack, with actor attribution. Use when the user asks what is new in vulnerabilities, wants a daily/weekly threat brief, asks about recent CVEs for a product, or sets up a recurring watch on their stack.
supply-chain-audit
Full supply-chain audit of a project - postmortem detects malicious code, install hooks and risky dependencies locally, then mlab.sh enriches what it finds (hashes, endpoints, actors, CVEs). Use when the user asks to audit a project's dependencies or supply chain, check a repo for malicious packages, or vet a codebase before adoption or deployment.
smishing-campaign
Analyze a batch of reported SMS/text messages through mlab.sh - score each for smishing, cluster them into campaigns, and extract the shared infrastructure (URLs, callback numbers, sender patterns). Use when the user has multiple reported SMS from users/employees, or investigates an SMS phishing wave. For a single message, phishing-triage does the job.
script-triage
Statically analyze a suspicious shell script through mlab.sh - install.sh, cron payloads, CI steps, curl-pipe-sh one-liners. Flags dangerous constructs (download-piped-to-shell, base64 decoding, reverse shells, persistence, anti-forensics, destructive deletes), extracts every IOC and enriches them. Use when the user pastes shell code and asks if it is safe/malicious, or provides a .sh file to vet before running it.
sbom-export
Generate a CycloneDX SBOM locally with postmortem and push it through mlab.sh vulnerability scanning - for projects or container images where no single lockfile can be pasted. Use when the user asks for an SBOM, needs vuln scanning of a container image or a multi-ecosystem repo, or when sbom-audit lacks a usable lockfile.
sbom-audit
Audit a dependency lockfile or SBOM for known vulnerabilities via mlab.sh, prioritize findings by KEV status and EPSS, and attribute actively exploited CVEs to threat actors. Use when the user provides a lockfile (package-lock.json, yarn.lock, pnpm-lock.yaml, Cargo.lock, requirements.txt, poetry.lock, uv.lock, Pipfile.lock, go.sum, composer.lock, Gemfile.lock, pom.xml, gradle.lockfile, packages.lock.json, pubspec.lock, mix.lock) or a CycloneDX / SPDX SBOM, or asks to check dependencies for vulnerabilities.