GitHub Security Audit — Risk Evaluation for Repositories
Systematic audit of GitHub repositories before integrating them into a production stack
or recommending them to clients. Inspired by Trail of Bits' frameworks
(supply-chain-risk-auditor, insecure-defaults, sharp-edges) but adapted for an
MCP-first agentic workflow.
Philosophy
Don't evaluate repos with intuition. Evaluate with data.
Don't look for reasons to adopt it. Look for reasons NOT to adopt it.
If you can't find reasons to reject it, then it can come in.
Golden rule: A repo that solves a problem your stack already covers
adds NO value, regardless of its quality. Evaluate first whether there is
a real need before spending time on the full analysis.
Two execution modes
| Mode |
Command |
Phases |
Tool calls |
Use case |
| Full |
audit repo <url> |
7 phases |
10-20 |
Comprehensive pre-integration review |
| Quick |
audit repo quick <url> |
Phases 0+1+2 |
5-8 |
Fast triage or first impression |
STEP 0 — Need Gate (MANDATORY, before ANY analysis)
Before analyzing security, answer:
- What problem does this repo solve? (define in one sentence)
- Is that problem already covered by your current stack? (MCPs, skills, tools)
- Does it bring genuinely new capability?
If the answer to (2) is YES and to (3) is NO → VERDICT: SKIP — do not continue.
Inform the user with the justification and suggest the existing tool.
If there's reasonable doubt or the user insists → continue with Phase 1.
PHASE 1 — Project Health
Sources: web_fetch of the GitHub repo page, GitHub API via web_fetch.
Collect:
| Metric |
How to obtain |
GREEN threshold |
RED threshold |
| Stars |
Repo page |
>500 |
<50 |
| Forks |
Repo page |
>50 |
<5 |
| Open vs closed issues |
Repo tabs |
Close ratio >60% |
<30% |
| Last commit |
Commits page |
<30 days |
>180 days |
| Contributors |
Contributors tab |
>5 |
1 (bus factor) |
| Releases |
Releases tab |
Semantic versioning |
No releases |
| README quality |
Content |
Complete docs, examples |
No README or stub |
| CI/CD |
GitHub Actions / badges |
Automated tests |
No CI |
Scoring: Each metric 0-10, total weight = 20% of final score.
See references/health-scoring.md for the detailed scoring table.
PHASE 2 — Code Security
Sources: web_fetch of key repo files.
2.1 Static analysis (without executing code)
Review via web_fetch:
- Hardcoded secrets: search source code for API key patterns, tokens, passwords
(
password =, api_key =, secret, token, committed .env files)
- Known vulnerable dependencies: review
package.json, requirements.txt,
Cargo.toml, go.mod — cross-reference versions with known CVEs via web_search
- Excessive permissions: in GitHub Actions workflows (
.github/workflows/*.yml),
look for permissions: write-all, pull_request_target, secrets in fork PRs
- Dangerous dynamic execution:
eval(), exec(), subprocess.call(shell=True),
dangerouslySetInnerHTML, innerHTML, unsafe deserialization
- Insecure default configuration: following Trail of Bits' insecure-defaults
pattern — does the repo work insecurely if you don't configure anything?
2.2 Transitive dependencies
- How many direct dependencies does it have?
- Are there dependencies with a single maintainer?
- Are there dependencies that have been compromised previously?
Scoring: 0-10, weight = 25% of final score.
See references/security-patterns.md for the complete checklist.
PHASE 3 — Supply Chain
Sources: web_search of maintainer profile, repo history.
| Signal |
GREEN |
RED |
| Identifiable maintainer(s) |
Real person/org, public history |
New account, no history |
| Backed organization |
Known company, funding |
Anonymous, no context |
| Security history |
Vulnerabilities patched quickly |
Open CVEs, no response |
| Publication on official registries |
npm/PyPI with 2FA, verified publisher |
No official publication |
| Code review on PRs |
PRs reviewed before merge |
Direct push to main |
| SECURITY.md |
Exists with disclosure policy |
Doesn't exist |
| Signed commits/releases |
GPG signatures |
Unsigned |
Scoring: 0-10, weight = 20% of final score.
See references/supply-chain-signals.md for detailed analysis.
PHASE 4 — Code Quality
Sources: web_fetch of representative files.
- Test coverage: Mentioned in README/CI? What percentage?
- Type hints / static types: Does it use typing?
- API documentation: Docstrings/JSDoc/rustdoc?
- Architecture: Modular or monolithic? Separation of concerns?
- Error handling: Generic try/catch or specific handling?
- Logging: Structured logging?
Scoring: 0-10, weight = 10% of final score.
PHASE 5 — License and Legal Compatibility
Sources: web_fetch of LICENSE file.
| License |
General compatibility |
Notes |
| MIT, BSD-2, BSD-3 |
✅ Full |
No restrictions |
| Apache-2.0 |
✅ Full |
Favorable patent clause |
| CC-BY-4.0, CC-BY-SA-4.0 |
⚠️ Partial |
OK for skills/docs, not for code |
| GPL-2.0, GPL-3.0 |
⚠️ Conditional |
Copyleft — evaluate if dependency or integration |
| AGPL-3.0 |
❌ High risk |
Network copyleft — affects SaaS |
| SSPL, BSL, proprietary |
❌ Don't use |
Commercial restrictions |
| No license |
❌ Don't use |
Default copyright, no permissions |
Scoring: 0-10, weight = 10% of final score.
PHASE 6 — MCP/Plugin/Skill Attack Surface
Applies when: the repo is an MCP server, Claude Code plugin, skill, integration tool,
or any software that runs with access to client data.
Inspired by Trail of Bits' agentic-actions-auditor and sharp-edges.
MCP/Plugin Checklist
Rationalizations to Reject
(Inspired by Trail of Bits' "Rationalizations to Reject")
- "It's open source, so it's secure" → NO. Open source ≠ audited.
- "It has many stars" → NO. Stars measure popularity, not security.
- "Company X uses it" → NO. Unless company X has done a public audit.
- "It's read-only" → VERIFY. Really? Doesn't it write logs, cache, temp files?
- "I'll only use it internally" → Doesn't reduce risk if it touches client data.
- "The maintainer seems trustworthy" → VERIFY with data, not gut feeling.
Scoring: 0-10, weight = 15% of final score (0% if not applicable, redistributed).
PHASE 7 — External Trust Signals
Sources: web_search.
- Has it been mentioned in security publications? (positive or negative)
- Does it have third-party audits?
- Does it appear on curated quality lists? (awesome-X, Trail of Bits skills-curated)
- Has it been reported as malicious at any point?
- Does it have a bug bounty program or SECURITY.md?
Scoring: 0-10, weight = bonus (doesn't subtract, only adds up to +5 points to total).
Final Score Calculation
SCORE = (P1 × 0.20) + (P2 × 0.25) + (P3 × 0.20) + (P4 × 0.10) + (P5 × 0.10) + (P6 × 0.15) + bonus_P7
If P6 doesn't apply:
SCORE = (P1 × 0.24) + (P2 × 0.29) + (P3 × 0.23) + (P4 × 0.12) + (P5 × 0.12) + bonus_P7
Verdict
| Score |
Verdict |
Action |
| ≥7.5 |
ADOPT 🟢 |
Integrate with confidence. Monitor updates. |
| 5.0–7.4 |
EVALUATE 🟡 |
Integrate with precautions. Document accepted risks. Review in 90 days. |
| 3.0–4.9 |
CAUTION 🟠 |
Only if no alternative. Isolate. Deep audit before production. |
| <3.0 |
AVOID 🔴 |
Do not integrate. Find alternative. |
Override rules (override numeric scoring)
- No license → automatic AVOID
- AGPL/SSPL → automatic AVOID (except internal use without SaaS)
- Hardcoded secrets in repo → automatic AVOID
- Single maintainer + last commit >1 year → maximum CAUTION
- Unsanitized dynamic execution in MCP → automatic AVOID
Deliverable
Generate an interactive HTML report with:
- Header: Repo name, URL, date, verdict with color badge
- Executive summary: 3-5 sentences with key findings
- Radar chart: The 7 dimensions in a radial chart (or 6 if P6 doesn't apply)
- Detail per phase: Table with metrics, values found, scoring
- Critical findings: List of issues requiring attention (if any)
- Rejected rationalizations: If detected during analysis
- Final verdict: Score + verdict + recommended action
- Stack comparison: What current tool covers similar functionality?
Save in the working/output directory.
Limitations
State these limitations when delivering the report:
- Does not execute code or discover unknown vulnerabilities. Not static analysis,
not a pentest. Analyses what is published: source, manifests, workflows, license,
history. A backdoor written to look like ordinary code will not be caught this way.
- Does not replace human review when the repo will touch sensitive data. The score
prioritises where to look; it does not authorise not looking.
- The score reflects the repo on the day it was measured. Recommend re-running
before important decisions.
When to Use
- Before integrating any repo/library/MCP/plugin/skill into your stack
- When a client asks about a tool's security
- When evaluating a new dependency for a project
- When the user shares a GitHub link asking whether to use it
- To audit third-party MCPs or skills before installing them
When NOT to Use
- For SEO audits of websites
- For analyzing your own code (use your dev/test workflow)
- For creating new skills
- To evaluate tools that are not open source / have no public repo
References
Load on demand:
references/health-scoring.md — Detailed scoring table per health metric
references/security-patterns.md — Complete security pattern checklist
references/supply-chain-signals.md — Supply chain evaluation framework
1---2name: github-security-audit3description: Security audit for GitHub repositories before integrating them into your stack. Seven dimensions: project health, code security, supply chain, code quality, license, MCP/plugin attack surface and external trust signals. Weighted scoring with ADOPT/EVALUATE/CAUTION/AVOID verdict and an HTML report. Inspired by Trail of Bits' supply-chain auditor and insecure-defaults frameworks. Activate with: audit repo, repo security, evaluate repo, evaluate library, evaluate dependency, review repo, supply chain, is this repo safe, security audit github, repo risk, evaluate MCP server, evaluate plugin, evaluate skill, evaluate integration. Also when the user shares a GitHub link and asks whether to integrate or trust it. Do NOT activate for own-codebase reviews or SEO audits.4---56# GitHub Security Audit — Risk Evaluation for Repositories78Systematic audit of GitHub repositories before integrating them into a production stack9or recommending them to clients. Inspired by Trail of Bits' frameworks10(supply-chain-risk-auditor, insecure-defaults, sharp-edges) but adapted for an11MCP-first agentic workflow.1213## Philosophy1415```16Don't evaluate repos with intuition. Evaluate with data.17Don't look for reasons to adopt it. Look for reasons NOT to adopt it.18If you can't find reasons to reject it, then it can come in.19```2021**Golden rule**: A repo that solves a problem your stack already covers22adds NO value, regardless of its quality. Evaluate first whether there is23a real need before spending time on the full analysis.2425---2627## Two execution modes2829| Mode | Command | Phases | Tool calls | Use case |30|------|---------|---------|------------|-----|31| **Full** | `audit repo <url>` | 7 phases | 10-20 | Comprehensive pre-integration review |32| **Quick** | `audit repo quick <url>` | Phases 0+1+2 | 5-8 | Fast triage or first impression |3334---3536## STEP 0 — Need Gate (MANDATORY, before ANY analysis)3738Before analyzing security, answer:39401. **What problem does this repo solve?** (define in one sentence)412. **Is that problem already covered by your current stack?** (MCPs, skills, tools)423. **Does it bring genuinely new capability?**4344If the answer to (2) is YES and to (3) is NO → **VERDICT: SKIP** — do not continue.45Inform the user with the justification and suggest the existing tool.4647If there's reasonable doubt or the user insists → continue with Phase 1.4849---5051## PHASE 1 — Project Health5253**Sources**: web_fetch of the GitHub repo page, GitHub API via web_fetch.5455Collect:5657| Metric | How to obtain | GREEN threshold | RED threshold |58|---------|---------------|--------------|-------------|59| Stars | Repo page | >500 | <50 |60| Forks | Repo page | >50 | <5 |61| Open vs closed issues | Repo tabs | Close ratio >60% | <30% |62| Last commit | Commits page | <30 days | >180 days |63| Contributors | Contributors tab | >5 | 1 (bus factor) |64| Releases | Releases tab | Semantic versioning | No releases |65| README quality | Content | Complete docs, examples | No README or stub |66| CI/CD | GitHub Actions / badges | Automated tests | No CI |6768**Scoring**: Each metric 0-10, total weight = 20% of final score.6970See `references/health-scoring.md` for the detailed scoring table.7172---7374## PHASE 2 — Code Security7576**Sources**: web_fetch of key repo files.7778### 2.1 Static analysis (without executing code)7980Review via web_fetch:8182- **Hardcoded secrets**: search source code for API key patterns, tokens, passwords83 (`password =`, `api_key =`, `secret`, `token`, committed `.env` files)84- **Known vulnerable dependencies**: review `package.json`, `requirements.txt`,85 `Cargo.toml`, `go.mod` — cross-reference versions with known CVEs via web_search86- **Excessive permissions**: in GitHub Actions workflows (`.github/workflows/*.yml`),87 look for `permissions: write-all`, `pull_request_target`, secrets in fork PRs88- **Dangerous dynamic execution**: `eval()`, `exec()`, `subprocess.call(shell=True)`,89 `dangerouslySetInnerHTML`, `innerHTML`, unsafe deserialization90- **Insecure default configuration**: following Trail of Bits' insecure-defaults91 pattern — does the repo work insecurely if you don't configure anything?9293### 2.2 Transitive dependencies9495- How many direct dependencies does it have?96- Are there dependencies with a single maintainer?97- Are there dependencies that have been compromised previously?9899**Scoring**: 0-10, weight = 25% of final score.100101See `references/security-patterns.md` for the complete checklist.102103---104105## PHASE 3 — Supply Chain106107**Sources**: web_search of maintainer profile, repo history.108109| Signal | GREEN | RED |110|-------|-------|------|111| Identifiable maintainer(s) | Real person/org, public history | New account, no history |112| Backed organization | Known company, funding | Anonymous, no context |113| Security history | Vulnerabilities patched quickly | Open CVEs, no response |114| Publication on official registries | npm/PyPI with 2FA, verified publisher | No official publication |115| Code review on PRs | PRs reviewed before merge | Direct push to main |116| SECURITY.md | Exists with disclosure policy | Doesn't exist |117| Signed commits/releases | GPG signatures | Unsigned |118119**Scoring**: 0-10, weight = 20% of final score.120121See `references/supply-chain-signals.md` for detailed analysis.122123---124125## PHASE 4 — Code Quality126127**Sources**: web_fetch of representative files.128129- **Test coverage**: Mentioned in README/CI? What percentage?130- **Type hints / static types**: Does it use typing?131- **API documentation**: Docstrings/JSDoc/rustdoc?132- **Architecture**: Modular or monolithic? Separation of concerns?133- **Error handling**: Generic try/catch or specific handling?134- **Logging**: Structured logging?135136**Scoring**: 0-10, weight = 10% of final score.137138---139140## PHASE 5 — License and Legal Compatibility141142**Sources**: web_fetch of LICENSE file.143144| License | General compatibility | Notes |145|----------|---------------------|-------|146| MIT, BSD-2, BSD-3 | ✅ Full | No restrictions |147| Apache-2.0 | ✅ Full | Favorable patent clause |148| CC-BY-4.0, CC-BY-SA-4.0 | ⚠️ Partial | OK for skills/docs, not for code |149| GPL-2.0, GPL-3.0 | ⚠️ Conditional | Copyleft — evaluate if dependency or integration |150| AGPL-3.0 | ❌ High risk | Network copyleft — affects SaaS |151| SSPL, BSL, proprietary | ❌ Don't use | Commercial restrictions |152| No license | ❌ Don't use | Default copyright, no permissions |153154**Scoring**: 0-10, weight = 10% of final score.155156---157158## PHASE 6 — MCP/Plugin/Skill Attack Surface159160**Applies when**: the repo is an MCP server, Claude Code plugin, skill, integration tool,161or any software that runs with access to client data.162163Inspired by Trail of Bits' agentic-actions-auditor and sharp-edges.164165### MCP/Plugin Checklist166167- [ ] What permissions does it request? (filesystem, network, env vars, secrets)168- [ ] Does it send data to third parties? (telemetry, analytics, external APIs)169- [ ] Does it store data locally? Where? Encrypted?170- [ ] Does it have hooks that run automatically? (pre/post tool use)171- [ ] Is the MCP server's code auditable? Or is it a binary/remote service?172- [ ] Does it use `eval()`, `exec()`, or dynamic execution of user-provided code?173- [ ] Does it validate LLM inputs before executing? (prompt injection surface)174- [ ] Does it have rate limiting?175- [ ] What happens if it fails? (fail-open vs fail-secure)176177### Rationalizations to Reject178179(Inspired by Trail of Bits' "Rationalizations to Reject")180181- "It's open source, so it's secure" → NO. Open source ≠ audited.182- "It has many stars" → NO. Stars measure popularity, not security.183- "Company X uses it" → NO. Unless company X has done a public audit.184- "It's read-only" → VERIFY. Really? Doesn't it write logs, cache, temp files?185- "I'll only use it internally" → Doesn't reduce risk if it touches client data.186- "The maintainer seems trustworthy" → VERIFY with data, not gut feeling.187188**Scoring**: 0-10, weight = 15% of final score (0% if not applicable, redistributed).189190---191192## PHASE 7 — External Trust Signals193194**Sources**: web_search.195196- Has it been mentioned in security publications? (positive or negative)197- Does it have third-party audits?198- Does it appear on curated quality lists? (awesome-X, Trail of Bits skills-curated)199- Has it been reported as malicious at any point?200- Does it have a bug bounty program or SECURITY.md?201202**Scoring**: 0-10, weight = bonus (doesn't subtract, only adds up to +5 points to total).203204---205206## Final Score Calculation207208```209SCORE = (P1 × 0.20) + (P2 × 0.25) + (P3 × 0.20) + (P4 × 0.10) + (P5 × 0.10) + (P6 × 0.15) + bonus_P7210211If P6 doesn't apply:212SCORE = (P1 × 0.24) + (P2 × 0.29) + (P3 × 0.23) + (P4 × 0.12) + (P5 × 0.12) + bonus_P7213```214215### Verdict216217| Score | Verdict | Action |218|-------|-----------|--------|219| ≥7.5 | **ADOPT** 🟢 | Integrate with confidence. Monitor updates. |220| 5.0–7.4 | **EVALUATE** 🟡 | Integrate with precautions. Document accepted risks. Review in 90 days. |221| 3.0–4.9 | **CAUTION** 🟠 | Only if no alternative. Isolate. Deep audit before production. |222| <3.0 | **AVOID** 🔴 | Do not integrate. Find alternative. |223224### Override rules (override numeric scoring)225226- No license → automatic **AVOID**227- AGPL/SSPL → automatic **AVOID** (except internal use without SaaS)228- Hardcoded secrets in repo → automatic **AVOID**229- Single maintainer + last commit >1 year → maximum **CAUTION**230- Unsanitized dynamic execution in MCP → automatic **AVOID**231232---233234## Deliverable235236Generate an interactive HTML report with:2372381. **Header**: Repo name, URL, date, verdict with color badge2392. **Executive summary**: 3-5 sentences with key findings2403. **Radar chart**: The 7 dimensions in a radial chart (or 6 if P6 doesn't apply)2414. **Detail per phase**: Table with metrics, values found, scoring2425. **Critical findings**: List of issues requiring attention (if any)2436. **Rejected rationalizations**: If detected during analysis2447. **Final verdict**: Score + verdict + recommended action2458. **Stack comparison**: What current tool covers similar functionality?246247Save in the working/output directory.248249---250251## Limitations252253State these limitations when delivering the report:254255- **Does not execute code or discover unknown vulnerabilities.** Not static analysis,256 not a pentest. Analyses what is published: source, manifests, workflows, license,257 history. A backdoor written to look like ordinary code will not be caught this way.258- **Does not replace human review** when the repo will touch sensitive data. The score259 prioritises where to look; it does not authorise not looking.260- **The score reflects the repo on the day it was measured.** Recommend re-running261 before important decisions.262263---264265## When to Use266267- Before integrating any repo/library/MCP/plugin/skill into your stack268- When a client asks about a tool's security269- When evaluating a new dependency for a project270- When the user shares a GitHub link asking whether to use it271- To audit third-party MCPs or skills before installing them272273## When NOT to Use274275- For SEO audits of websites276- For analyzing your own code (use your dev/test workflow)277- For creating new skills278- To evaluate tools that are not open source / have no public repo279280---281282## References283284Load on demand:285286- `references/health-scoring.md` — Detailed scoring table per health metric287- `references/security-patterns.md` — Complete security pattern checklist288- `references/supply-chain-signals.md` — Supply chain evaluation framework