Skip to content

ajtazer/heckit / skills/cve-hunting/advisory-mining

advisory-mining

Verified

Mine GitHub Security Advisories and CVE databases for incomplete fixes, finding variant vulnerabilities in patched code or similar patterns in related packages.

FileKindSize
SKILL.mdskill md3.3 KB
references/diff-analysis.mdmarkdown1.8 KB
references/ghsa-api.mdmarkdown2.0 KB

references/ghsa-api.md

View on GitHub
# GitHub Advisory API Usage

## Authentication

Use GitHub CLI (gh) which handles authentication:
```bash
gh auth status  # Verify authentication
```

## Search Advisories

### By Ecosystem
```bash
# npm advisories
gh api "/advisories?ecosystem=npm&per_page=50"

# PyPI advisories
gh api "/advisories?ecosystem=pip&per_page=50"

# Go advisories
gh api "/advisories?ecosystem=go&per_page=50"

# RubyGems advisories
gh api "/advisories?ecosystem=rubygems&per_page=50"
```

### By Severity
```bash
gh api "/advisories?ecosystem=npm&severity=critical&per_page=50"
gh api "/advisories?ecosystem=npm&severity=high&per_page=50"
```

### By Keyword
```bash
gh api "/advisories?ecosystem=npm&keyword=injection&per_page=20"
gh api "/advisories?ecosystem=npm&keyword=traversal&per_page=20"
gh api "/advisories?ecosystem=npm&keyword=prototype&per_page=20"
```

### By Date Range
```bash
# Advisories published after a specific date
gh api "/advisories?ecosystem=npm&published=2025-01-01..2025-12-31&per_page=50"
```

## GraphQL API (More Powerful)

```bash
gh api graphql -f query='
{
  securityAdvisories(
    first: 10,
    orderBy: {field: PUBLISHED_AT, direction: DESC},
    ecosystem: NPM,
    severity: CRITICAL
  ) {
    nodes {
      ghsaId
      summary
      severity
      publishedAt
      references { url }
      vulnerabilities(first: 5) {
        nodes {
          package { name ecosystem }
          vulnerableVersionRange
          firstPatchedVersion { identifier }
        }
      }
    }
  }
}'
```

## Get Advisory Details

```bash
# By GHSA ID
gh api "/advisories/GHSA-xxxx-xxxx-xxxx"

# Get the fix commit
# Usually linked in the advisory references
```

## Rate Limiting

- Authenticated: 5000 requests/hour
- GraphQL: 5000 points/hour
- Use `gh api --cache 1h` for repeated queries

## Workflow

1. Search for recent advisories in target ecosystem
2. Filter by severity and vulnerability type
3. Read advisory details and find fix commit
4. Analyze the fix diff for completeness
5. Check for variant vulnerabilities
6. Cross-reference with similar packages
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall