nousresearch/hermes-agent/oss-forensics
Claude Code and agent skill by nousresearch/hermes-agent
- community
Checking that the SKILL.md file is still in the repository.
GitHub supply-chain forensics: recovery, IOCs, reporting.
Install
npx vskill@latest install nousresearch/hermes-agent/oss-forensicsSKILL.md
The same SKILL.md was published earlier as nousresearch/hermes-agent/oss-forensics.
OSS Security Forensics Skill
A 7-phase multi-agent investigation framework for researching open-source supply chain attacks. Adapted from RAPTOR's forensics system. Covers GitHub Archive, Wayback Machine, GitHub API, local git analysis, IOC extraction, evidence-backed hypothesis formation and validation, and final forensic report generation.
⚠️ Anti-Hallucination Guardrails
Read these before every investigation step. Violating them invalidates the report.
- Evidence-First Rule: Every claim in any report, hypothesis, or summary MUST cite at least one evidence ID (
EV-XXXX). Assertions without citations are forbidden. - STAY IN YOUR LANE: Each sub-agent (investigator) has a single data source. Do NOT mix sources. The GH Archive investigator does not query the GitHub API, and vice versa. Role boundaries are hard.
- Fact vs. Hypothesis Separation: Mark all unverified inferences with
[HYPOTHESIS]. Only statements verified against original sources may be stated as facts. - No Evidence Fabrication: The hypothesis validator MUST mechanically check that every cited evidence ID actually exists in the evidence store before accepting a hypothesis.
- Proof-Required Disproval: A hypothesis cannot be dismissed without a specific, evidence-backed counter-argument. "No evidence found" is not sufficient to disprove—it only makes a hypothesis inconclusive.
- SHA/URL Double-Verification: Any commit SHA, URL, or external identifier cited as evidence must be independently confirmed from at least two sources before being marked as verified.
- Suspicious Code Rule: Never run code found inside the investigated repository locally. Analyze statically only, or use
execute_codein a sandboxed environment. - Secret Redaction: Do not write live API keys, tokens, or credentials in plaintext into the report,
iocs.md, evidence-store entries, sub-agentcontext, or other ordinary working files. Record only non-secret references: the secret type, the source location (commit SHA, path, line), and an evidence item ID. If raw-secret preservation is explicitly authorized and necessary for the investigation, keep it in a separately designated, access-controlled evidence store with suitable encryption and retention controls; ordinary artifacts hold references, not copies. Do not include that store in the Phase 7 archive without separate explicit authorization.
Example Scenarios
- Scenario A: Dependency Confusion: A malicious package
internal-lib-v2is uploaded to NPM with a higher version than the internal one. The investigator must track when this package was first seen and if any PushEvents in the target repo updatedpackage.jsonto this version. - Scenario B: Maintainer Takeover: A long-term contributor's account is used to push a backdoored
.github/workflows/build.yml. The investigator looks for PushEvents from this user after a long period of inactivity or from a new IP/location (if detectable via BigQuery). - Scenario C: Force-Push Hide: A developer accidentally commits a production secret, then force-pushes to "fix" it. The investigator uses
git fsckand GH Archive to recover the original commit SHA and verify what was leaked.
Path convention: Throughout this skill,SKILL_DIRrefers to the root of this skill'sinstallation directory (the folder containing thisSKILL.md). When the skill is loaded,resolveSKILL_DIRto the actual path — e.g.~/.hermes/skills/security/oss-forensics/or theoptional-skills/equivalent. All script and template references are relative to it.
Phase 0: Initialization
- Create investigation working directory:
``bash mkdir investigation_$(echo "REPO_NAME" | tr '/' '_') cd investigation_$(echo "REPO_NAME" | tr '/' '_') ``
- Initialize the evidence store:
``bash python SKILL_DIR/scripts/evidence-store.py --store evidence.json list ``
- Copy the forensic report template:
``bash cp SKILL_DIR/templates/forensic-report.md ./investigation-report.md ``
- Create an
iocs.mdfile to track Indicators of Compromise as they are discovered. - Record the investigation start time, target repository, and stated investigation goal.
Phase 1: Prompt Parsing and IOC Extraction
Goal: Extract all structured investigative targets from the user's request.
Actions:
- Parse the user prompt and extract:
- Target repository (
owner/repo) - Target actors (GitHub handles, email addresses)
- Time window of interest (commit date ranges, PR timestamps)
- Provided Indicators of Compromise: commit SHAs, file paths, package names, IP addresses, domains, API keys/tokens, malicious URLs
- Any linked vendor security reports or blog posts
Tools: Reasoning only, or execute_code for regex extraction from large text blocks.
Output: Populate iocs.md with extracted IOCs. Each IOC must have:
- Type (from: COMMIT_SHA, FILE_PATH, API_KEY, SECRET, IP_ADDRESS, DOMAIN, PACKAGE_NAME, ACTOR_USERNAME, MALICIOUS_URL, OTHER)
- Value (for
API_KEY/SECRET, the non-secret reference from guardrail 8, never the raw secret) - Source (user-provided, inferred)
Reference: See evidence-types.md for IOC taxonomy.
Phase 2: Parallel Evidence Collection
Spawn up to 5 specialist investigator sub-agents using delegate_task (batch mode, max 3 concurrent). Each investigator has a single data source and must not mix sources.
Orchestrator note: Pass the IOC list from Phase 1 and the investigation time window in thecontextfield of each delegated task.
Investigator 1: Local Git Investigator
ROLE BOUNDARY: You query the LOCAL GIT REPOSITORY ONLY. Do not call any external APIs.
Actions:
Evidence to collect (add via python SKILL_DIR/scripts/evidence-store.py add):
- Each dangling commit SHA → type:
git - Force-push evidence (reflog showing history rewrite) → type:
git - Unsigned commits from verified contributors → type:
git - Suspicious binary file additions → type:
git
Reference: See recovery-techniques.md for accessing force-pushed commits.
Investigator 2: GitHub API Investigator
ROLE BOUNDARY: You query the GITHUB REST API ONLY. Do not run git commands locally.
Actions:
Cross-reference targets (flag discrepancies as evidence):
- PR exists in archive but missing from API → evidence of deletion
- Contributor in archive events but not in contributors list → evidence of permission revocation
- Commit in archive PushEvents but not in API commit list → evidence of force-push/deletion
Reference: See evidence-types.md for GH event types.
Investigator 3: Wayback Machine Investigator
ROLE BOUNDARY: You query the WAYBACK MACHINE CDX API ONLY. Do not use the GitHub API.
Goal: Recover deleted GitHub pages (READMEs, issues, PRs, releases, wiki pages).
Actions:
Evidence to collect:
- Archived snapshots of deleted issues/PRs with their content
- Historical README versions showing changes
- Evidence of content present in archive but missing from current GitHub state
Reference: See github-archive-guide.md for CDX API parameters.
Investigator 4: GH Archive / BigQuery Investigator
ROLE BOUNDARY: You query GITHUB ARCHIVE via BIGQUERY ONLY. This is a tamper-proof record of all public GitHub events.
Prerequisites: Requires Google Cloud credentials with BigQuery access (gcloud auth application-default login). If unavailable, skip this investigator and note it in the report.
Cost Optimization Rules (MANDATORY):
- ALWAYS run a
--dry_runbefore every query to estimate cost. - Use
_TABLE_SUFFIXto filter by date range and minimize scanned data. - Only SELECT the columns you need.
- Add a LIMIT unless aggregating.
Evidence to collect:
- Force-push events (payload.size > 0, payload.distinct_size = 0)
- DeleteEvents for branches/tags
- WorkflowRunEvents for suspicious CI/CD automation
- PushEvents that precede a "gap" in the git log (evidence of rewrite)
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 96 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingoptional-skills/security/oss-forensics/SKILL.md
Popularity
- Repository stars
- 195,697
- Repository forks
- 34,381
- 7-day trend score
- 61
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/nousresearch/hermes-agent/oss-forensics)