跳到正文
Skillpedia
安全260k · #563

oss-forensics

它能做什么

这项技能为你的 AI 提供多步骤流程,用于调查开源软件项目中可疑的改动。适合希望进行审慎、基于证据审查的安全研究人员和维护者。

适用场景

  • ✓你怀疑 GitHub 上的某个软件包被篡改或遭到攻击的时候。
  • ✓你需要收集某个项目事件相关的 GitHub 记录、存档页面和 git 历史的时候。
  • ✓你需要一份书面取证报告,且每一项论断都链接到一条证据的时候。

技能链接

https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/security/oss-forensics/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/security/oss-forensics/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请调查这个开源软件包最近的改动是否有供应链攻击的迹象,并引用证据。”

每周 5 个新技能,1 分钟读完。

工作原理

这项技能把工作分成若干阶段。每一步从一个来源收集证据,然后 AI 提出假设,并用这些证据进行检验,最后撰写报告。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

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.

  1. 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.
  2. 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.
  3. Fact vs. Hypothesis Separation: Mark all unverified inferences with [HYPOTHESIS]. Only statements verified against original sources may be stated as facts.
  4. No Evidence Fabrication: The hypothesis validator MUST mechanically check that every cited evidence ID actually exists in the evidence store before accepting a hypothesis.
  5. 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.
  6. 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.
  7. Suspicious Code Rule: Never run code found inside the investigated repository locally. Analyze statically only, or use execute_code in a sandboxed environment.
  8. Secret Redaction: Any API keys, tokens, or credentials discovered during investigation must be redacted in the final report. Log them internally only.

Example Scenarios

  • Scenario A: Dependency Confusion: A malicious package internal-lib-v2 is 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 updated package.json to 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 fsck and GH Archive to recover the original commit SHA and verify what was leaked.

Path convention: Throughout this skill, SKILL_DIR refers to the root of this skill's installation directory (the folder containing this SKILL.md). When the skill is loaded, resolve SKILL_DIR to the actual path — e.g. ~/.hermes/skills/security/oss-forensics/ or the optional-skills/ equivalent. All script and template references are relative to it.

Phase 0: Initialization

  1. Create investigation working directory:
    mkdir investigation_$(echo "REPO_NAME" | tr '/' '_')
    cd investigation_$(echo "REPO_NAME" | tr '/' '_')
    
  2. Initialize the evidence store:
    python SKILL_DIR/scripts/evidence-store.py --store evidence.json list
    
  3. Copy the forensic report template:
    cp SKILL_DIR/templates/forensic-report.md ./investigation-report.md
    
  4. Create an iocs.md file to track Indicators of Compromise as they are discovered.
  5. 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, DOMAI
常见问题

每项论断都需要证据吗?

需要。技能规定每项论断都必须引用证据编号,不允许没有依据的陈述。

它使用哪些来源?

技能提到 GitHub Archive、Wayback Machine、GitHub API 以及本地 git 分析。

它能证明攻击确实发生了吗?

技能会区分事实与假设,并标注未经证实的推断,使报告能清楚显示哪些已被证实、哪些尚未证实。

详情

作者的原始描述

GitHub supply-chain forensics: recovery, IOCs, reporting.

repo: NousResearch/hermes-agent

热度

GitHub 星标
260k
排名
#563
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能