arsenals 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/arsenals.js +53 -0
- package/cybersecurity-agent/SKILL.md +165 -0
- package/cybersecurity-agent/references/dependency-cve.md +130 -0
- package/cybersecurity-agent/references/email-leaks.md +75 -0
- package/cybersecurity-agent/references/pr-review.md +136 -0
- package/cybersecurity-agent/references/repo-misconfig.md +170 -0
- package/cybersecurity-agent/references/sast.md +173 -0
- package/cybersecurity-agent/references/secret-scan.md +147 -0
- package/cybersecurity-agent/references/vector-ai-security.md +201 -0
- package/jira-to-code/SKILL.md +446 -0
- package/package.json +21 -0
- package/skill-seekers/SKILL.md +312 -0
- package/ticket-writer/SKILL.md +144 -0
package/bin/arsenals.js
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const fs = require('fs');
|
|
3
|
+
const path = require('path');
|
|
4
|
+
|
|
5
|
+
const args = process.argv.slice(2);
|
|
6
|
+
const command = args[0];
|
|
7
|
+
const skillName = args[1];
|
|
8
|
+
|
|
9
|
+
const skillsRoot = path.join(__dirname, '..');
|
|
10
|
+
const available = fs.readdirSync(skillsRoot, { withFileTypes: true })
|
|
11
|
+
.filter(e => e.isDirectory() && e.name !== 'bin' && !e.name.startsWith('.'))
|
|
12
|
+
.map(e => e.name);
|
|
13
|
+
|
|
14
|
+
if (command === 'list') {
|
|
15
|
+
console.log('Available skills:');
|
|
16
|
+
available.forEach(s => console.log(` - ${s}`));
|
|
17
|
+
process.exit(0);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
if (command !== 'install') {
|
|
21
|
+
console.error('Usage:\n arsenals install <skill-name>\n arsenals list');
|
|
22
|
+
process.exit(1);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if (!skillName) {
|
|
26
|
+
console.error('Skill name required.\nAvailable:\n' + available.map(s => ` - ${s}`).join('\n'));
|
|
27
|
+
process.exit(1);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const sourceDir = path.join(skillsRoot, skillName);
|
|
31
|
+
if (!fs.existsSync(sourceDir)) {
|
|
32
|
+
console.error(`Skill "${skillName}" not found.\nAvailable:\n` + available.map(s => ` - ${s}`).join('\n'));
|
|
33
|
+
process.exit(1);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const destDir = path.join(process.env.HOME, '.claude', 'skills', skillName);
|
|
37
|
+
fs.mkdirSync(destDir, { recursive: true });
|
|
38
|
+
|
|
39
|
+
function copyDir(src, dest) {
|
|
40
|
+
for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
|
|
41
|
+
const srcPath = path.join(src, entry.name);
|
|
42
|
+
const destPath = path.join(dest, entry.name);
|
|
43
|
+
if (entry.isDirectory()) {
|
|
44
|
+
fs.mkdirSync(destPath, { recursive: true });
|
|
45
|
+
copyDir(srcPath, destPath);
|
|
46
|
+
} else {
|
|
47
|
+
fs.copyFileSync(srcPath, destPath);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
copyDir(sourceDir, destDir);
|
|
53
|
+
console.log(`Installed "${skillName}" → ${destDir}`);
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cybersecurity-agent
|
|
3
|
+
description: >
|
|
4
|
+
Use for ANY cybersecurity task involving repositories, codebases, or online accounts: scan for email
|
|
5
|
+
leaks/credential exposures (HaveIBeenPwned), find repo vulnerabilities (CVEs, OWASP Top 10, dependency
|
|
6
|
+
audits), SAST/DAST analysis, exposed secrets/API keys, dependency CVE audits, vector/AI/LLM security
|
|
7
|
+
issues, GitHub/GitLab misconfigurations, or a security report. Triggers on "check if my email was leaked",
|
|
8
|
+
"scan my repo", "find vulnerabilities", "security audit", "CVE check", "exposed secrets", "security review",
|
|
9
|
+
"pentest prep", or security + repo/email/codebase mentions. Also triggers on explicit "/devsecops" for a
|
|
10
|
+
PR/diff reviewer mode (Module G): a lighter, preventive checklist (authz, data exposure, injection, secrets,
|
|
11
|
+
deps, least privilege), never posted to GitHub/GitLab.
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Cybersecurity Agent Skill
|
|
15
|
+
|
|
16
|
+
A comprehensive security analysis skill covering email leak detection, repository vulnerability scanning,
|
|
17
|
+
dependency CVE auditing, secret/credential exposure, and AI/vector-specific attack surfaces.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Workflow Overview
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
1. Identify Scope → What are we scanning? (email, repo URL, codebase, dependency file)
|
|
25
|
+
2. Select Checks → Which modules apply? (see Module Index below)
|
|
26
|
+
3. Gather Intelligence → Run web searches, fetch advisories, query public databases
|
|
27
|
+
4. Analyze & Report → Structure findings by severity (Critical / High / Medium / Low / Info)
|
|
28
|
+
5. Recommend Remediation → Actionable fix for each finding
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Always start by asking (or inferring from context):
|
|
32
|
+
- **Target**: email address, repo URL, package name, uploaded file, or codebase path
|
|
33
|
+
- **Scope**: full audit vs. specific concern (leaks only? deps only? secrets only?)
|
|
34
|
+
- **Urgency**: is this incident response or proactive hardening?
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Module Index
|
|
39
|
+
|
|
40
|
+
| Module | When to use | Reference file |
|
|
41
|
+
|--------|-------------|----------------|
|
|
42
|
+
| A – Email Leak Detection | User provides email(s) to check | `references/email-leaks.md` |
|
|
43
|
+
| B – Dependency CVE Audit | package.json / requirements.txt / pom.xml / Cargo.toml present | `references/dependency-cve.md` |
|
|
44
|
+
| C – Secret & Credential Scan | Source code or repo to check for hardcoded secrets | `references/secret-scan.md` |
|
|
45
|
+
| D – SAST / Code Vulnerability | Source code review for logic/security flaws | `references/sast.md` |
|
|
46
|
+
| E – Repository Misconfiguration | GitHub/GitLab repo settings, CI/CD, branch protection | `references/repo-misconfig.md` |
|
|
47
|
+
| F – Vector / AI Attack Surface | ML models, embeddings, vector DBs, LLM integrations | `references/vector-ai-security.md` |
|
|
48
|
+
| G – DevSecOps PR Review | Explicit `/devsecops` invocation on a PR/diff | `references/pr-review.md` |
|
|
49
|
+
|
|
50
|
+
Read the relevant reference file(s) before proceeding with that module.
|
|
51
|
+
|
|
52
|
+
**Module G is different from A–F**: it only runs on explicit invocation (`/devsecops`,
|
|
53
|
+
"devsecops review this PR/diff"), produces a shorter reviewer-style note instead of the
|
|
54
|
+
full Security Report, and never posts anywhere — see `references/pr-review.md` for its
|
|
55
|
+
own output format.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Output Format
|
|
60
|
+
|
|
61
|
+
Always produce a structured **Security Report** using this template:
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
## 🔐 Security Report — [Target]
|
|
65
|
+
**Date**: [today] **Scope**: [modules run] **Risk Level**: [CRITICAL | HIGH | MEDIUM | LOW | CLEAN]
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
### Executive Summary
|
|
70
|
+
[2-3 sentences: what was scanned, headline findings, immediate action needed]
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
### Findings
|
|
75
|
+
|
|
76
|
+
#### [SEVERITY] — [Finding Title]
|
|
77
|
+
- **Category**: [Email Leak | CVE | Hardcoded Secret | Code Flaw | Misconfiguration | AI/Vector]
|
|
78
|
+
- **Location**: [file:line | endpoint | dependency name@version | breach source]
|
|
79
|
+
- **Description**: [what the issue is and why it matters]
|
|
80
|
+
- **Evidence**: [snippet, CVE ID, breach name, or search result citation]
|
|
81
|
+
- **Remediation**: [exact steps to fix]
|
|
82
|
+
- **References**: [CVE link, advisory, OWASP link, etc.]
|
|
83
|
+
|
|
84
|
+
[repeat for each finding]
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
### Remediation Priority Queue
|
|
89
|
+
1. [Critical items first]
|
|
90
|
+
2. …
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
### Clean Checks
|
|
95
|
+
[List checks that passed with no issues]
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Severity scale:
|
|
99
|
+
- 🔴 **CRITICAL** — Immediate exploitation risk, active breach, or leaked credentials in use
|
|
100
|
+
- 🟠 **HIGH** — Serious vulnerability, easily exploitable
|
|
101
|
+
- 🟡 **MEDIUM** — Requires specific conditions to exploit
|
|
102
|
+
- 🔵 **LOW** — Defense-in-depth, best practice violation
|
|
103
|
+
- ℹ️ **INFO** — Informational, no direct risk
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## General Investigation Steps
|
|
108
|
+
|
|
109
|
+
### For any target, always:
|
|
110
|
+
|
|
111
|
+
1. **Web search** for recent CVEs, breach announcements, or security advisories related to the target
|
|
112
|
+
2. **Cross-reference** findings with public databases (NVD, OSV, Snyk Advisor, HaveIBeenPwned)
|
|
113
|
+
3. **Check GitHub** for known exploits or proof-of-concept code if a CVE is found
|
|
114
|
+
4. **Fetch official advisories** when CVE IDs are identified
|
|
115
|
+
5. **Cite every finding** with a source URL or database reference
|
|
116
|
+
|
|
117
|
+
### Search query patterns:
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
Email leaks: site:haveibeenpwned.com "[email]"
|
|
121
|
+
"[email]" leaked OR breached OR exposed
|
|
122
|
+
|
|
123
|
+
Dependency CVEs: "[package]@[version]" CVE OR vulnerability OR exploit
|
|
124
|
+
site:nvd.nist.gov "[package name]"
|
|
125
|
+
site:osv.dev "[package ecosystem] [package name]"
|
|
126
|
+
"[package]" security advisory [year]
|
|
127
|
+
|
|
128
|
+
Repo issues: "[repo name]" exposed secret OR API key OR credentials
|
|
129
|
+
"[repo name]" CVE OR vulnerability [current year]
|
|
130
|
+
|
|
131
|
+
Vector/AI: "[framework]" prompt injection OR embedding attack OR model poisoning
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Quick-Start Decision Tree
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
User says "check email X" → Run Module A
|
|
140
|
+
User pastes package.json / lockfile → Run Module B
|
|
141
|
+
User pastes source code → Run Modules C + D
|
|
142
|
+
User gives GitHub URL → Run Modules B + C + E (+ F if AI project)
|
|
143
|
+
User mentions AI/LLM/vector DB → Run Module F + relevant others
|
|
144
|
+
User says "full audit" → Run all applicable modules
|
|
145
|
+
User says "/devsecops" or pastes
|
|
146
|
+
a PR/diff for security review → Run Module G ONLY (not the full report format)
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## Ethics & Legal Reminder
|
|
152
|
+
|
|
153
|
+
- Only scan targets the user owns or has explicit authorization to test
|
|
154
|
+
- Do not attempt active exploitation — this skill is for **passive reconnaissance and advisory**
|
|
155
|
+
- Do not share or store leaked credentials found in breach databases
|
|
156
|
+
- For active penetration testing, recommend the user engage a licensed professional
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## After the Report
|
|
161
|
+
|
|
162
|
+
Always close with:
|
|
163
|
+
1. **Top 3 immediate actions** (numbered, specific)
|
|
164
|
+
2. **Offer to go deeper** on any specific finding
|
|
165
|
+
3. **Suggest ongoing hygiene**: dependency update schedule, secret rotation policy, breach monitoring setup
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# Module B — Dependency CVE Audit
|
|
2
|
+
|
|
3
|
+
## Goal
|
|
4
|
+
Identify known CVEs and security advisories in a project's dependencies across any ecosystem.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Supported Ecosystems
|
|
9
|
+
|
|
10
|
+
| File | Ecosystem | Audit Tool |
|
|
11
|
+
|------|-----------|------------|
|
|
12
|
+
| package.json / package-lock.json / yarn.lock | npm (Node.js) | `npm audit` |
|
|
13
|
+
| requirements.txt / Pipfile / pyproject.toml | PyPI (Python) | `pip-audit` / `safety` |
|
|
14
|
+
| pom.xml / build.gradle | Maven / Gradle (Java) | OWASP Dependency-Check |
|
|
15
|
+
| Cargo.toml / Cargo.lock | crates.io (Rust) | `cargo audit` |
|
|
16
|
+
| go.mod / go.sum | Go modules | `govulncheck` |
|
|
17
|
+
| Gemfile / Gemfile.lock | RubyGems | `bundler-audit` |
|
|
18
|
+
| composer.json | Packagist (PHP) | `local-php-security-checker` |
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Step-by-Step Process
|
|
23
|
+
|
|
24
|
+
### 1. Parse the Dependency File
|
|
25
|
+
Extract all direct and (if lockfile present) transitive dependencies with their pinned versions.
|
|
26
|
+
|
|
27
|
+
### 2. Query Vulnerability Databases
|
|
28
|
+
|
|
29
|
+
For each dependency, search:
|
|
30
|
+
|
|
31
|
+
**OSV (Open Source Vulnerabilities — Google):**
|
|
32
|
+
```
|
|
33
|
+
web_fetch: https://api.osv.dev/v1/query (POST with package name + ecosystem)
|
|
34
|
+
web_search: site:osv.dev "[package name]" "[ecosystem]"
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**NVD (National Vulnerability Database — NIST):**
|
|
38
|
+
```
|
|
39
|
+
web_search: site:nvd.nist.gov/vuln/search "[package name]"
|
|
40
|
+
web_fetch: https://nvd.nist.gov/vuln/search/results?query=[package]
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**Snyk Vulnerability Database:**
|
|
44
|
+
```
|
|
45
|
+
web_search: site:security.snyk.io "[package name]" "[version range]"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**GitHub Advisory Database:**
|
|
49
|
+
```
|
|
50
|
+
web_search: site:github.com/advisories "[package name]"
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
**PyPI / npm advisories (ecosystem-specific):**
|
|
54
|
+
```
|
|
55
|
+
web_search: "[package]@[version]" CVE security advisory
|
|
56
|
+
web_search: "[package name]" npm audit vulnerability [year]
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### 3. For Each CVE Found, Fetch Details
|
|
60
|
+
```
|
|
61
|
+
web_fetch: https://nvd.nist.gov/vuln/detail/[CVE-ID]
|
|
62
|
+
web_search: [CVE-ID] exploit OR PoC OR patch
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### 4. Check for Unpinned / Outdated Packages
|
|
66
|
+
Flag packages using:
|
|
67
|
+
- Wildcard versions (`^`, `~`, `*`, `>=`)
|
|
68
|
+
- Versions more than 2 major releases behind latest
|
|
69
|
+
- Deprecated packages (check npm/PyPI deprecation notices)
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## CVE Severity Mapping (CVSS v3)
|
|
74
|
+
|
|
75
|
+
| CVSS Score | Severity | Priority |
|
|
76
|
+
|------------|----------|----------|
|
|
77
|
+
| 9.0 – 10.0 | 🔴 CRITICAL | Fix immediately |
|
|
78
|
+
| 7.0 – 8.9 | 🟠 HIGH | Fix within 7 days |
|
|
79
|
+
| 4.0 – 6.9 | 🟡 MEDIUM | Fix within 30 days |
|
|
80
|
+
| 0.1 – 3.9 | 🔵 LOW | Fix at next release cycle |
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Reporting Format for Each Vulnerable Dependency
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
**[package-name]@[current-version]**
|
|
88
|
+
- CVE: [CVE-ID] (CVSS: [score] / [severity])
|
|
89
|
+
- Affected versions: [range]
|
|
90
|
+
- Fixed in: [version]
|
|
91
|
+
- Attack vector: [Network | Local | Physical] — [description of exploit]
|
|
92
|
+
- Remediation: `npm install [package]@[fixed-version]` (or equivalent)
|
|
93
|
+
- Advisory: [URL]
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## Remediation Commands by Ecosystem
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
# Node.js
|
|
102
|
+
npm audit fix # auto-fix where possible
|
|
103
|
+
npm audit fix --force # force major upgrades (review breaking changes!)
|
|
104
|
+
|
|
105
|
+
# Python
|
|
106
|
+
pip install --upgrade [package]
|
|
107
|
+
pip-audit --fix
|
|
108
|
+
|
|
109
|
+
# Rust
|
|
110
|
+
cargo update [crate]
|
|
111
|
+
|
|
112
|
+
# Go
|
|
113
|
+
go get [module]@[version]
|
|
114
|
+
|
|
115
|
+
# Ruby
|
|
116
|
+
bundle update [gem]
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Supply Chain Attack Indicators
|
|
122
|
+
|
|
123
|
+
Also flag these red flags (search for them):
|
|
124
|
+
- Package name is very similar to a popular package (typosquatting)
|
|
125
|
+
```
|
|
126
|
+
web_search: "[package-name]" typosquatting OR malicious OR removed
|
|
127
|
+
```
|
|
128
|
+
- Package was recently transferred to a new maintainer
|
|
129
|
+
- Package has very few downloads but is pinned by a popular dependency
|
|
130
|
+
- Install scripts (`preinstall`, `postinstall`) in package.json that execute code
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Module A — Email Leak Detection
|
|
2
|
+
|
|
3
|
+
## Goal
|
|
4
|
+
Determine if one or more email addresses appear in known data breaches, paste sites, or credential dumps.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Step-by-Step Process
|
|
9
|
+
|
|
10
|
+
### 1. Primary Search — HaveIBeenPwned (HIBP)
|
|
11
|
+
```
|
|
12
|
+
web_search: site:haveibeenpwned.com "[email address]"
|
|
13
|
+
web_fetch: https://haveibeenpwned.com/account/[email] (public lookup page)
|
|
14
|
+
```
|
|
15
|
+
Note: HIBP API requires a key; use web search to surface the public breach count and breach names.
|
|
16
|
+
|
|
17
|
+
### 2. Breach Database Cross-Check
|
|
18
|
+
Search these sources for the email or its domain:
|
|
19
|
+
```
|
|
20
|
+
"[email]" leaked OR breached OR "data breach" OR "credential dump"
|
|
21
|
+
"[email domain]" breach 2023 OR 2024 OR 2025
|
|
22
|
+
"[email]" pastebin OR ghostbin OR rentry
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### 3. Domain-Level Breach Check
|
|
26
|
+
If checking a corporate email, also check the domain:
|
|
27
|
+
```
|
|
28
|
+
"@[domain.com]" breach OR leak OR "database dump"
|
|
29
|
+
site:haveibeenpwned.com "[domain.com]"
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### 4. Dark Web Mention Check (OSINT)
|
|
33
|
+
```
|
|
34
|
+
"[email]" site:dehashed.com (search results page, no login needed for metadata)
|
|
35
|
+
"[email]" intext:password site:pastebin.com
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### 5. Recent Breach News
|
|
39
|
+
```
|
|
40
|
+
web_search: "[email domain]" data breach [current year]
|
|
41
|
+
web_search: major data breaches [current year] email leak
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Interpreting Results
|
|
47
|
+
|
|
48
|
+
| Signal | Severity | Action |
|
|
49
|
+
|--------|----------|--------|
|
|
50
|
+
| Email in active breach with password hash | 🔴 CRITICAL | Rotate password immediately, enable MFA |
|
|
51
|
+
| Email in breach (no password) | 🟠 HIGH | Monitor, enable breach alerts |
|
|
52
|
+
| Email in old breach (2+ years, password changed) | 🟡 MEDIUM | Confirm password was rotated |
|
|
53
|
+
| Email domain in corporate breach | 🟡 MEDIUM | Check all employees, notify IT |
|
|
54
|
+
| No breach found | ℹ️ INFO | Set up ongoing monitoring |
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Reporting Breach Details
|
|
59
|
+
|
|
60
|
+
For each breach found, document:
|
|
61
|
+
- **Breach name** (e.g., "LinkedIn 2021", "RockYou2024")
|
|
62
|
+
- **Date of breach**
|
|
63
|
+
- **Data exposed** (email, password hash, plaintext password, phone, SSN, etc.)
|
|
64
|
+
- **Source** (HIBP, news article, security researcher report)
|
|
65
|
+
- **Remediation**: which service to update, whether MFA is available
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Recommended Monitoring Tools to Mention
|
|
70
|
+
|
|
71
|
+
- **HaveIBeenPwned.com** — free breach alerts by email
|
|
72
|
+
- **Google One Dark Web Report** — monitors personal info on dark web
|
|
73
|
+
- **Firefox Monitor** — HIBP-powered free alerts
|
|
74
|
+
- **1Password Watchtower** — monitors saved credentials against breaches
|
|
75
|
+
- **Dehashed.com** — deeper search (paid) for credential dumps
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# Module G — DevSecOps PR Review
|
|
2
|
+
|
|
3
|
+
## Goal
|
|
4
|
+
Act as a DevSecOps reviewer on a pull request / diff. This is a **preventive, shift-left**
|
|
5
|
+
mode — the point is to catch what a purely functional reviewer would miss, before merge,
|
|
6
|
+
not to produce an incident-style audit. Runs only when explicitly invoked (`/devsecops`,
|
|
7
|
+
"devsecops review this PR", "security review this diff").
|
|
8
|
+
|
|
9
|
+
**Hard rule, no exceptions**: this module NEVER posts comments to GitHub/GitLab, opens
|
|
10
|
+
review threads, or submits an approval/rejection on the platform. Output goes to the user
|
|
11
|
+
in chat only. This mirrors the standing rule that no agent (including Veronica) auto-posts
|
|
12
|
+
to PR conversations.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Input
|
|
17
|
+
|
|
18
|
+
Accepts, in order of preference:
|
|
19
|
+
1. A diff / patch pasted or fetched (`git diff`, PR diff URL content, changed files)
|
|
20
|
+
2. A PR URL — fetch the diff, don't infer from title/description alone
|
|
21
|
+
3. Specific changed files if no diff is available
|
|
22
|
+
|
|
23
|
+
If given a PR URL to a repo tool you have access to (GitHub connector, etc.), fetch the
|
|
24
|
+
actual diff content — don't review based on the PR description alone.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Review Checklist
|
|
29
|
+
|
|
30
|
+
Work through changed files against this list. Only report what's actually present in the
|
|
31
|
+
diff — don't flag hypothetical issues in unchanged code unless directly relevant to the change.
|
|
32
|
+
|
|
33
|
+
### 1. Authorization on every new/changed endpoint or action
|
|
34
|
+
- New route/controller/Action — is there a policy check, gate, middleware, or Filament
|
|
35
|
+
resource authorization guarding it?
|
|
36
|
+
- Changed authorization logic — does the diff *narrow* or *widen* access? Widening access
|
|
37
|
+
is always worth flagging even if intentional.
|
|
38
|
+
- IDOR: does a new endpoint accept an ID without checking the authenticated user owns/can
|
|
39
|
+
access that record?
|
|
40
|
+
- New Filament resource/page — confirm `canViewAny`, `canView`, `canCreate`, `canEdit`,
|
|
41
|
+
`canDelete` are defined and not left at framework defaults if the resource is sensitive.
|
|
42
|
+
|
|
43
|
+
### 2. Data exposure
|
|
44
|
+
- New API resource / DTO / Filament table column — does it expose fields that shouldn't
|
|
45
|
+
leave the boundary (password hashes, tokens, internal IDs used for enumeration, other
|
|
46
|
+
users' PII)?
|
|
47
|
+
- Logging — does the diff log request payloads, user objects, or exception context that
|
|
48
|
+
could contain PII, tokens, or secrets? (This is the exact failure mode behind the QA
|
|
49
|
+
email exposure incident — treat any new `Log::` / `logger()` call touching user data as
|
|
50
|
+
worth a close look.)
|
|
51
|
+
- Error messages returned to the client — do they leak stack traces, internal paths, or
|
|
52
|
+
query details?
|
|
53
|
+
|
|
54
|
+
### 3. Injection vectors
|
|
55
|
+
- Raw DB queries (`DB::raw`, `whereRaw`, string-built SQL) with unescaped input
|
|
56
|
+
- Unsafe `unserialize()` / dynamic class instantiation from user input
|
|
57
|
+
- Shell exec (`exec`, `shell_exec`, `Process::run`) with unsanitized input
|
|
58
|
+
- Blade `{!! !!}` unescaped output on user-controllable data
|
|
59
|
+
- Mass assignment: new model fields — check `$fillable`/`$guarded` cover the new fields
|
|
60
|
+
correctly rather than defaulting to fully open
|
|
61
|
+
|
|
62
|
+
### 4. Secrets in the diff
|
|
63
|
+
- Hardcoded API keys, tokens, credentials, webhook URLs in code or config
|
|
64
|
+
- New `.env.example` entries — confirm no real value was accidentally left in
|
|
65
|
+
- New third-party integration — is the key going through config/env, not inline?
|
|
66
|
+
|
|
67
|
+
### 5. Dependency changes
|
|
68
|
+
- New `composer.json` / `package.json` entries — flag anything unfamiliar or with a
|
|
69
|
+
low download count / recent first-release for a quick CVE check (defer to Module B for
|
|
70
|
+
the actual audit if the user wants depth)
|
|
71
|
+
- Version *downgrades* on existing dependencies — worth asking why
|
|
72
|
+
|
|
73
|
+
### 6. Least privilege
|
|
74
|
+
- New queue job, scheduled command, or service — does it request broader DB/API
|
|
75
|
+
permissions than it needs?
|
|
76
|
+
- New Filament panel/resource — scoped to the right guard/tenant if this is a
|
|
77
|
+
multi-site admin panel context (relevant given the site-manager architecture)
|
|
78
|
+
|
|
79
|
+
### 7. DDD/Actions-pattern specific (project convention checks)
|
|
80
|
+
- Validation living in the Action/DTO boundary, not skipped because "the controller
|
|
81
|
+
already checked" — check the input is actually validated where it enters, not assumed safe
|
|
82
|
+
- Domain logic not accidentally bypassing invariants via direct Eloquent calls where an
|
|
83
|
+
Action should be used instead
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Output Format
|
|
88
|
+
|
|
89
|
+
This is a **reviewer's note**, not a full Security Report — shorter, PR-shaped, meant to be
|
|
90
|
+
read once before deciding whether to comment/request changes yourself.
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
## 🔎 DevSecOps Review — [PR title / diff description]
|
|
94
|
+
|
|
95
|
+
**Files reviewed**: [list or count]
|
|
96
|
+
**Overall read**: [Looks safe to merge / Needs changes before merge / Needs a second look on X]
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
### Flagged
|
|
101
|
+
|
|
102
|
+
#### [SEVERITY] — [short title]
|
|
103
|
+
- **File**: [path:line]
|
|
104
|
+
- **Issue**: [what's wrong, in reviewer language — the way you'd phrase it as a PR comment]
|
|
105
|
+
- **Suggested fix**: [concrete, ideally a code-level suggestion]
|
|
106
|
+
|
|
107
|
+
[repeat per finding, ordered by severity]
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
### Looked fine
|
|
112
|
+
[Brief list — auth checks present, no secrets, deps clean, etc. Keeps the note honest
|
|
113
|
+
about what was actually checked vs skipped.]
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
### Not posted anywhere
|
|
118
|
+
These are for you to review and post yourself if you agree — nothing has been sent to
|
|
119
|
+
GitHub/GitLab.
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Severity scale matches the main skill: 🔴 CRITICAL / 🟠 HIGH / 🟡 MEDIUM / 🔵 LOW / ℹ️ INFO.
|
|
123
|
+
For PR review, CRITICAL/HIGH should almost always mean "request changes"; MEDIUM/LOW can be
|
|
124
|
+
framed as suggestions rather than blockers.
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## What NOT to do in this mode
|
|
129
|
+
|
|
130
|
+
- Don't run a full dependency CVE sweep or SAST pass unless asked — this is a targeted
|
|
131
|
+
diff review, not Module B/D's full audit. Offer to run those separately if the diff
|
|
132
|
+
touches a lot of dependencies or looks like it needs deeper analysis.
|
|
133
|
+
- Don't comment on style, formatting, PHPStan/Pint issues, or non-security code quality —
|
|
134
|
+
that's not this module's job and dilutes the security signal.
|
|
135
|
+
- Don't invent findings to seem thorough. An empty "Flagged" section is a valid, useful
|
|
136
|
+
result.
|