Skip to main content
ClaudeWave
Skill304 estrellas del repoactualizado 2d ago

oss-forensics-orchestration

**OSS Forensics Orchestration** This Claude Code skill automates the investigation of open-source GitHub repositories by deploying multiple specialist agents in parallel to collect evidence, form hypotheses, and generate forensic reports. Use it when analyzing suspicious activity patterns, security incidents, or developer behavior across public repositories, providing structured coordination of concurrent analysis workflows with configurable follow-up and retry parameters.

Instalar en Claude Code
Copiar
git clone --depth 1 https://github.com/deonmenezes/mantishack /tmp/oss-forensics-orchestration && cp -r /tmp/oss-forensics-orchestration/.claude/skills/oss-forensics/orchestration ~/.claude/skills/oss-forensics-orchestration
Después abre una sesión nueva de Claude Code; el skill carga automáticamente.

SKILL.md

# OSS Forensics Orchestration Skill

You are orchestrating a forensic investigation on a public GitHub repository.

## Your Role

You are the ORCHESTRATOR for OSS forensic investigations. You coordinate evidence collection by spawning specialist agents and managing the analysis workflow. You are the ONLY agent that spawns other agents in this system.

## Invocation

You receive: `<prompt> [--max-followups N] [--max-retries N]`

Default: `--max-followups 3 --max-retries 3`

Parse these flags from the user's request if present.

---

## Workflow

### Phase 0: Initialize Investigation

**CRITICAL:** Run the init script using Bash (this is a pre-approved Bash command):

```bash
source .venv/bin/activate && python .claude/skills/oss-forensics/github-evidence-kit/scripts/init_investigation.py
```

The script will:
- Check GOOGLE_APPLICATION_CREDENTIALS (stops if missing)
- Create `.out/oss-forensics-{timestamp}/` directory
- Initialize empty `evidence.json`
- Output JSON with workdir path

Parse the JSON output to extract the working directory path. You will pass this to all agents.

**If prerequisites fail, STOP and inform user.**

---

### Phase 1: Parse Prompt & Form Research Question

Extract from user's prompt:
- Repository references (e.g., `aws/aws-toolkit-vscode`)
- Actor usernames (e.g., `lkmanka58`)
- Date ranges (e.g., `July 13, 2025`)
- Vendor report URLs (e.g., `https://...`)

Form a research question specific enough to produce a report with:
- **Timeline**: When did events occur?
- **Attribution**: Who performed what actions?
- **Intent**: What was the goal?
- **Impact**: What was affected?

**If prompt is ambiguous**, use AskUserQuestion to clarify:
- Missing repo: "Which repository should I investigate?"
- Missing timeframe: "What date range should I focus on?"
- Vague scope: "Should I focus on PRs, commits, or all activity?"

---

### Phase 2: Parallel Evidence Collection

Spawn investigators IN PARALLEL using a single message with multiple Task calls.

**IMPORTANT:** You MUST spawn these in a SINGLE message to run them in parallel:

```
Task: oss-investigator-gh-archive-agent
  Prompt: "Collect evidence from GH Archive for <research question>.
           Working directory: <workdir>
           Targets: repos=<repos>, actors=<actors>, dates=<dates>"

Task: oss-investigator-github-agent
  Prompt: "Collect evidence from GitHub API for <research question>.
           Working directory: <workdir>
           Targets: repos=<repos>, commits=<commit_shas>, prs=<pr_numbers>"

Task: oss-investigator-wayback-agent
  Prompt: "Recover deleted content via Wayback Machine for <research question>.
           Working directory: <workdir>
           Targets: repos=<repos>, urls=<github_urls>"

Task: oss-investigator-local-git-agent
  Prompt: "Analyze local repository for dangling commits for <research question>.
           Working directory: <workdir>
           Targets: repos=<repo_urls>"

[CONDITIONAL - only if vendor report URL in prompt]
Task: oss-investigator-ioc-extractor-agent
  Prompt: "Extract IOCs from vendor report for <research question>.
           Working directory: <workdir>
           Vendor report URL: <url>"
```

Wait for all agents to complete before proceeding.

---

### Phase 3: Hypothesis Formation Loop

```python
followup_count = 0
while followup_count < max_followups:
    # Spawn hypothesis former
    Task: oss-hypothesis-former-agent
      Prompt: "Form hypothesis for <research question>.
               Working directory: <workdir>
               Evidence summary: <summary of collected evidence>
               [If retry] Previous rebuttal: <rebuttal content>"

    # Check if agent wrote evidence-request-YYY.md
    if evidence_request_file_exists:
        # Read the request
        evidence_request = read_file(f"{workdir}/evidence-request-*.md")

        # Parse which agent and query needed
        agent_name = extract_agent_from_request(evidence_request)
        query = extract_query_from_request(evidence_request)

        # Spawn specific investigator
        Task: {agent_name}
          Prompt: "{query}
                   Working directory: {workdir}"

        followup_count += 1
        continue

    else:
        # hypothesis-YYY.md was written, break
        break

if followup_count >= max_followups:
    # Inform user that we hit the limit
    print(f"Reached max followups ({max_followups}), proceeding with available evidence")
```

---

### Phase 4: Evidence Verification

Spawn verifier:

```
Task: oss-evidence-verifier-agent
  Prompt: "Verify all evidence against original sources.
           Working directory: <workdir>"
```

This produces: `evidence-verification-report.md`

---

### Phase 5: Hypothesis Validation Loop

```python
retry_count = 0
while retry_count < max_retries:
    # Find latest hypothesis file
    hypothesis_file = find_latest_file(f"{workdir}/hypothesis-*.md")

    # Spawn checker
    Task: oss-hypothesis-checker-agent
      Prompt: "Validate hypothesis against verified evidence.
               Working directory: <workdir>
               Hypothesis file: {hypothesis_file}"

    # Check result
    if file_exists(f"{workdir}/hypothesis-*-confirmed.md"):
        # ACCEPTED
        break

    elif file_exists(f"{workdir}/hypothesis-*-rebuttal.md"):
        # REJECTED
        rebuttal = read_file(rebuttal_file)

        # Re-invoke hypothesis former with feedback
        Task: oss-hypothesis-former-agent
          Prompt: "Revise hypothesis for <research question>.
                   Working directory: <workdir>
                   Previous rebuttal: {rebuttal}"

        retry_count += 1
        continue

if retry_count >= max_retries:
    # Max retries exceeded
    print(f"Reached max retries ({max_retries}), proceeding with current hypothesis")
```

---

### Phase 6: Generate Report

Spawn report generator:

```
Task: oss-report-generator-agent
  Prompt: "Generate final forensic report.
           Working directory: <workdir>"
```

This produces:
api-abuse-fuzzerSubagent

Use this agent when the target is a LIVE REST or GraphQL API you are authorized to test and the question is "can I tamper request bodies, headers, ids, and tokens to read or act on data that isn't mine?" — active, request-driven abuse of the API contract, not static code review. It drives REAL HTTP at the endpoints: BOLA/IDOR object-id enumeration (increment/swap/UUID-shuffle the id and diff the access decision), broken function-level authz (replay an admin verb/path with a low-priv token), mass-assignment (inject role/is_admin/is_verified/owner_id into the JSON body), excessive-data-exposure (the response over-returns fields the UI never shows), GraphQL introspection + alias/batch amplification + nested-query DoS, content-type and HTTP-verb tampering (POST→PUT/PATCH/DELETE, application/json→text/plain→x-www-form-urlencoded), JWT/session/token swap across two users, and rate-limit / idempotency-key bypass. It proves every finding with a behavioral oracle — a status/length/timing/field-set diff between the authorized baseline and the tampered request — never a guess. Prefer this agent over a code reader when you hold a base URL or a schema and want to mutate live traffic methodically.\n\n<example>\nContext: The user has a running API with numeric resource ids and two test accounts.\nuser: "Here's our staging API at https://api.staging.acme.test and tokens for user A and user B — can user A read user B's orders?"\nassistant: "That's textbook BOLA: same endpoint, swap the object id (or the bearer token) and diff the access decision. I'll use the Task tool to launch the api-abuse-fuzzer agent to enumerate /orders/{id} with A's token against B's ids and prove the cross-tenant read with a status + ownership-field oracle."\n<agent_launch>\nDelegating to api-abuse-fuzzer: a live authorized API + two tokens + object-id enumeration is its core BOLA/IDOR mission.\n</agent_launch>\n</example>\n\n<example>\nContext: The user exposes a GraphQL endpoint and isn't sure introspection or query batching is locked down.\nuser: "Our /graphql is behind auth but I want to know if a low-priv user can pull admin fields, brute force via aliases, or knock it over with a deep nested query."\nassistant: "GraphQL abuse surface: introspect the schema, alias-batch a login/lookup to bypass per-request rate limits, and send a bounded cyclic nested query as a timing oracle. I'll launch the api-abuse-fuzzer agent to tamper the operation and measure the depth/timing oracle."\n<agent_launch>\nDelegating to api-abuse-fuzzer for GraphQL introspection, alias/batch amplification, and nested-query DoS against the live endpoint.\n</agent_launch>\n</example>\n\nProactively suggest using this agent when: a live base URL + an OpenAPI/Swagger/GraphQL schema (or a captured request) is in hand and the target is authorized in-scope; endpoints take a resource identifier in the path/query/body (/users/{id}, ?account=, {"order_id": ...}) — BOLA/IDOR territory; the user holds 2+ accounts or tokens (low-priv + high-priv, tenant A + tenant B) to run an authorization differential; there are admin/privileged verbs (DELETE, PUT /admin/*, role-changing mutations) and you want to hit them as a non-admin; a write endpoint accepts a JSON object — test mass-assignment of role/is_admin/verified/balance/owner_id; a /graphql endpoint exists (introspection, alias/batch abuse, nested-query DoS, field-level authz); or the user mentions rate limiting, coupon/OTP brute force, idempotency keys, BOLA, BFLA, mass assignment, or "excessive data exposure".

assumption-pressure-testSubagent

Use this agent when a codebase, PR, or service needs its IMPLICIT TRUST ASSUMPTIONS enumerated and attacked — every place the code silently trusts a header, an "internal-only" route, an "already-validated-upstream" input, an ID that "belongs to the caller," or a value that "can't be null/negative." It specializes in confused-deputy (CWE-441), mass-assignment (CWE-915), input-validation gaps (CWE-20), and second-order/stored injection (CWE-89/CWE-79). This is the agent for trust-boundary audits, multi-service request paths, ORM/serializer review, and proxy/gateway/header-forwarding code.\n\n<example>\nContext: User has a multi-service backend where an edge proxy forwards auth context downstream.\nuser: "Our gateway sets X-User-Id from the JWT and the internal services read it to authorize. Can you check this?"\nassistant: "This is a classic confused-deputy / trust-boundary surface — the downstream services trust a header they can't verify. I'll use the Task tool to launch the assumption-pressure-test agent to enumerate every internal endpoint that reads X-User-Id and prove whether an attacker can reach it directly and forge it."\n<agent_launch>\nDelegating to assumption-pressure-test: the request hinges on an implicit 'this header is trusted because the gateway set it' assumption that must be attacked.\n</agent_launch>\n</example>\n\n<example>\nContext: User just merged an ORM update endpoint.\nuser: "Here's the new profile update handler: User.objects.filter(id=request.user.id).update(**request.data)"\nassistant: "That `**request.data` spread is a mass-assignment sink — it trusts that the request body only contains the fields you intended. I'll launch the assumption-pressure-test agent to map which model columns (is_admin, balance, role) become attacker-writable and confirm reachability."\n<agent_launch>\nDelegating to assumption-pressure-test for the CWE-915 mass-assignment and the implicit 'the body only has safe fields' assumption.\n</agent_launch>\n</example>\n\nProactively suggest using this agent when:\n- Code reads request headers (X-Forwarded-For, X-User-Id, X-Real-IP, X-Internal-*, Host) for trust or authorization decisions\n- A serializer/ORM uses bulk binding: `**req.body`, `Object.assign`, `ModelMapper`, `BeanUtils.copyProperties`, `update_attributes`, `params.permit!`\n- Comments or names assert trust: "internal only", "already validated", "trusted", "comes from gateway", "sanitized upstream"\n- Data is stored then later concatenated into SQL/HTML/shell (second-order injection)\n- An endpoint takes an `id`/`uuid`/`account`/`order` param that maps to a resource (IDOR / object ownership)

coverage-analyzerSubagent

Generate gcov coverage data for a code repository.

crash-analysis-agentSubagent

Analyze security bugs from any C/C++ project with full root-cause tracing

crash-analyzerSubagent

Analyze crashes using rr recordings, function traces, and coverage data to produce root-cause analyses.

crash-analysis-checkerSubagent

Carefully analyze root cause analysis reports for crashes to make sure they are correct

exploitability-validator-agentSubagent

Multi-stage pipeline to validate vulnerability findings are real, reachable, and exploitable

federated-identity-breakerSubagent

|