@crewpilot/agent 2.0.0 → 3.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 +131 -131
- package/dist-npm/cli.js +5 -5
- package/dist-npm/index.js +100 -100
- package/package.json +69 -69
- package/prompts/agent.md +282 -282
- package/prompts/copilot-instructions.md +36 -36
- package/prompts/{catalyst.config.json → crewpilot.config.json} +72 -72
- package/prompts/skills/assure-code-quality/SKILL.md +112 -112
- package/prompts/skills/assure-pr-intelligence/SKILL.md +148 -148
- package/prompts/skills/assure-review-functional/SKILL.md +114 -114
- package/prompts/skills/assure-review-standards/SKILL.md +106 -106
- package/prompts/skills/assure-threat-model/SKILL.md +182 -182
- package/prompts/skills/assure-vulnerability-scan/SKILL.md +146 -146
- package/prompts/skills/autopilot-meeting/SKILL.md +434 -434
- package/prompts/skills/autopilot-worker/SKILL.md +737 -737
- package/prompts/skills/daily-digest/SKILL.md +188 -188
- package/prompts/skills/deliver-change-management/SKILL.md +132 -132
- package/prompts/skills/deliver-deploy-guard/SKILL.md +144 -144
- package/prompts/skills/deliver-doc-governance/SKILL.md +130 -130
- package/prompts/skills/engineer-feature-builder/SKILL.md +270 -270
- package/prompts/skills/engineer-root-cause-analysis/SKILL.md +150 -150
- package/prompts/skills/engineer-test-first/SKILL.md +148 -148
- package/prompts/skills/insights-knowledge-base/SKILL.md +202 -202
- package/prompts/skills/insights-pattern-detection/SKILL.md +142 -142
- package/prompts/skills/strategize-architecture-planner/SKILL.md +141 -141
- package/prompts/skills/strategize-solution-design/SKILL.md +118 -118
- package/scripts/postinstall.js +108 -108
|
@@ -1,146 +1,146 @@
|
|
|
1
|
-
# Vulnerability Scan
|
|
2
|
-
|
|
3
|
-
> **Pillar**: Assure | **ID**: `assure-vulnerability-scan`
|
|
4
|
-
|
|
5
|
-
## Purpose
|
|
6
|
-
|
|
7
|
-
Security-focused code analysis mapping findings to OWASP Top 10 and CWE Top 25. Provides actionable remediation with severity scoring, not just warnings.
|
|
8
|
-
|
|
9
|
-
## Activation Triggers
|
|
10
|
-
|
|
11
|
-
- "security review", "vulnerability scan", "is this secure", "owasp check"
|
|
12
|
-
- "audit for security", "cwe check", "pentest this code"
|
|
13
|
-
- Automatically chained when `code-quality` detects security-adjacent patterns
|
|
14
|
-
|
|
15
|
-
## Methodology
|
|
16
|
-
|
|
17
|
-
### Process Flow
|
|
18
|
-
|
|
19
|
-
```dot
|
|
20
|
-
digraph vulnerability_scan {
|
|
21
|
-
rankdir=TB;
|
|
22
|
-
node [shape=box];
|
|
23
|
-
|
|
24
|
-
surface [label="Phase 1\nAttack Surface Mapping"];
|
|
25
|
-
owasp [label="Phase 2\nOWASP Top 10 Scan"];
|
|
26
|
-
cwe [label="Phase 3\nCWE Pattern Matching"];
|
|
27
|
-
remediate [label="Phase 4\nRemediation"];
|
|
28
|
-
deps [label="Phase 5\nDependency Audit"];
|
|
29
|
-
report [label="Report", shape=doublecircle];
|
|
30
|
-
|
|
31
|
-
surface -> owasp;
|
|
32
|
-
owasp -> cwe;
|
|
33
|
-
cwe -> remediate;
|
|
34
|
-
remediate -> deps;
|
|
35
|
-
deps -> report;
|
|
36
|
-
}
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
### Phase 1 — Attack Surface Mapping
|
|
40
|
-
1. Identify all entry points: API endpoints, user inputs, file uploads, URL params
|
|
41
|
-
2. Map data flow from input → processing → storage → output
|
|
42
|
-
3. Identify trust boundaries (authenticated vs. unauthenticated, internal vs. external)
|
|
43
|
-
4. List dependencies and their known vulnerability status
|
|
44
|
-
|
|
45
|
-
### Phase 2 — OWASP Top 10 Scan
|
|
46
|
-
Check each applicable category:
|
|
47
|
-
|
|
48
|
-
| ID | Category | What to Look For |
|
|
49
|
-
|---|---|---|
|
|
50
|
-
| A01 | Broken Access Control | Missing auth checks, IDOR, privilege escalation |
|
|
51
|
-
| A02 | Cryptographic Failures | Weak hashing, plaintext secrets, poor TLS config |
|
|
52
|
-
| A03 | Injection | SQL/NoSQL/OS/LDAP injection, template injection |
|
|
53
|
-
| A04 | Insecure Design | Missing rate limits, business logic flaws |
|
|
54
|
-
| A05 | Security Misconfiguration | Default creds, verbose errors, unnecessary features |
|
|
55
|
-
| A06 | Vulnerable Components | Known CVEs in dependencies |
|
|
56
|
-
| A07 | Auth Failures | Weak passwords, missing MFA, session fixation |
|
|
57
|
-
| A08 | Data Integrity Failures | Insecure deserialization, unsigned updates |
|
|
58
|
-
| A09 | Logging Failures | Insufficient logging, log injection, PII in logs |
|
|
59
|
-
| A10 | SSRF | Unvalidated URLs, internal network access |
|
|
60
|
-
|
|
61
|
-
### Phase 3 — CWE Pattern Matching
|
|
62
|
-
Map findings to specific CWE entries (e.g., CWE-79 for XSS, CWE-89 for SQL injection). Include CWE ID in every finding.
|
|
63
|
-
|
|
64
|
-
### Phase 4 — Remediation
|
|
65
|
-
For each finding:
|
|
66
|
-
1. Explain the vulnerability in plain language
|
|
67
|
-
2. Show the vulnerable code
|
|
68
|
-
3. Provide the fixed code
|
|
69
|
-
4. Explain why the fix works
|
|
70
|
-
5. Rate exploitability: `trivial / moderate / complex`
|
|
71
|
-
|
|
72
|
-
### Phase 5 — Dependency Audit
|
|
73
|
-
1. Parse dependency manifests (package.json, requirements.txt, go.mod, etc.)
|
|
74
|
-
2. Flag dependencies with known CVEs
|
|
75
|
-
3. Suggest version upgrades with breaking change warnings
|
|
76
|
-
|
|
77
|
-
## Tools Required
|
|
78
|
-
|
|
79
|
-
- `codebase` — Read source code and dependency files
|
|
80
|
-
- `terminal` — Run `npm audit`, `pip audit`, or equivalent
|
|
81
|
-
- `fetch` — Check CVE databases for dependency vulnerabilities
|
|
82
|
-
|
|
83
|
-
## Severity Scoring
|
|
84
|
-
|
|
85
|
-
<HARD-GATE>
|
|
86
|
-
Do NOT mark a scan as "clean" or "no issues" if any Critical or High severity findings exist.
|
|
87
|
-
Do NOT downgrade severity to avoid blocking a deployment.
|
|
88
|
-
Critical findings MUST be remediated before code is shipped.
|
|
89
|
-
</HARD-GATE>
|
|
90
|
-
|
|
91
|
-
| Level | Criteria |
|
|
92
|
-
|---|---|
|
|
93
|
-
| **Critical** | Remote code execution, auth bypass, data exfiltration — exploit is trivial |
|
|
94
|
-
| **High** | Significant data exposure, privilege escalation — exploit is moderate |
|
|
95
|
-
| **Medium** | Information disclosure, denial of service — exploit requires chaining |
|
|
96
|
-
| **Low** | Best practice violation with no direct exploit path |
|
|
97
|
-
|
|
98
|
-
## Output Format
|
|
99
|
-
|
|
100
|
-
```
|
|
101
|
-
## [
|
|
102
|
-
|
|
103
|
-
### Attack Surface
|
|
104
|
-
- Entry points: {N}
|
|
105
|
-
- Trust boundaries: {list}
|
|
106
|
-
- Dependencies: {N} total, {N} flagged
|
|
107
|
-
|
|
108
|
-
### Findings
|
|
109
|
-
|
|
110
|
-
#### [{severity}] {OWASP-ID} — {title} (CWE-{NNN})
|
|
111
|
-
**File**: {path}:{line}
|
|
112
|
-
**Vulnerability**: {plain language explanation}
|
|
113
|
-
**Exploitability**: {trivial/moderate/complex}
|
|
114
|
-
**Vulnerable code**:
|
|
115
|
-
\`\`\`{lang}
|
|
116
|
-
{code}
|
|
117
|
-
\`\`\`
|
|
118
|
-
**Remediation**:
|
|
119
|
-
\`\`\`{lang}
|
|
120
|
-
{fixed code}
|
|
121
|
-
\`\`\`
|
|
122
|
-
**Why this fixes it**: {explanation}
|
|
123
|
-
|
|
124
|
-
---
|
|
125
|
-
(repeat per finding)
|
|
126
|
-
|
|
127
|
-
### Dependency Alerts
|
|
128
|
-
| Package | Current | Vulnerable | Fixed In | CVE |
|
|
129
|
-
|---|---|---|---|---|
|
|
130
|
-
| | | | | |
|
|
131
|
-
|
|
132
|
-
### Summary
|
|
133
|
-
{critical}/{high}/{medium}/{low} findings | Exploitability: {overall risk}
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
## Chains To
|
|
137
|
-
|
|
138
|
-
- `code-quality` — For non-security improvements found during scan
|
|
139
|
-
- `deploy-guard` — Security findings should block deployment
|
|
140
|
-
|
|
141
|
-
## Anti-Patterns
|
|
142
|
-
|
|
143
|
-
- Do NOT report theoretical vulnerabilities in unreachable code
|
|
144
|
-
- Do NOT flag every dependency without checking actual CVE relevance
|
|
145
|
-
- Do NOT provide fixes that break functionality to achieve security
|
|
146
|
-
- Do NOT skip the "why this fixes it" explanation — it's educational
|
|
1
|
+
# Vulnerability Scan
|
|
2
|
+
|
|
3
|
+
> **Pillar**: Assure | **ID**: `assure-vulnerability-scan`
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
Security-focused code analysis mapping findings to OWASP Top 10 and CWE Top 25. Provides actionable remediation with severity scoring, not just warnings.
|
|
8
|
+
|
|
9
|
+
## Activation Triggers
|
|
10
|
+
|
|
11
|
+
- "security review", "vulnerability scan", "is this secure", "owasp check"
|
|
12
|
+
- "audit for security", "cwe check", "pentest this code"
|
|
13
|
+
- Automatically chained when `code-quality` detects security-adjacent patterns
|
|
14
|
+
|
|
15
|
+
## Methodology
|
|
16
|
+
|
|
17
|
+
### Process Flow
|
|
18
|
+
|
|
19
|
+
```dot
|
|
20
|
+
digraph vulnerability_scan {
|
|
21
|
+
rankdir=TB;
|
|
22
|
+
node [shape=box];
|
|
23
|
+
|
|
24
|
+
surface [label="Phase 1\nAttack Surface Mapping"];
|
|
25
|
+
owasp [label="Phase 2\nOWASP Top 10 Scan"];
|
|
26
|
+
cwe [label="Phase 3\nCWE Pattern Matching"];
|
|
27
|
+
remediate [label="Phase 4\nRemediation"];
|
|
28
|
+
deps [label="Phase 5\nDependency Audit"];
|
|
29
|
+
report [label="Report", shape=doublecircle];
|
|
30
|
+
|
|
31
|
+
surface -> owasp;
|
|
32
|
+
owasp -> cwe;
|
|
33
|
+
cwe -> remediate;
|
|
34
|
+
remediate -> deps;
|
|
35
|
+
deps -> report;
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Phase 1 — Attack Surface Mapping
|
|
40
|
+
1. Identify all entry points: API endpoints, user inputs, file uploads, URL params
|
|
41
|
+
2. Map data flow from input → processing → storage → output
|
|
42
|
+
3. Identify trust boundaries (authenticated vs. unauthenticated, internal vs. external)
|
|
43
|
+
4. List dependencies and their known vulnerability status
|
|
44
|
+
|
|
45
|
+
### Phase 2 — OWASP Top 10 Scan
|
|
46
|
+
Check each applicable category:
|
|
47
|
+
|
|
48
|
+
| ID | Category | What to Look For |
|
|
49
|
+
|---|---|---|
|
|
50
|
+
| A01 | Broken Access Control | Missing auth checks, IDOR, privilege escalation |
|
|
51
|
+
| A02 | Cryptographic Failures | Weak hashing, plaintext secrets, poor TLS config |
|
|
52
|
+
| A03 | Injection | SQL/NoSQL/OS/LDAP injection, template injection |
|
|
53
|
+
| A04 | Insecure Design | Missing rate limits, business logic flaws |
|
|
54
|
+
| A05 | Security Misconfiguration | Default creds, verbose errors, unnecessary features |
|
|
55
|
+
| A06 | Vulnerable Components | Known CVEs in dependencies |
|
|
56
|
+
| A07 | Auth Failures | Weak passwords, missing MFA, session fixation |
|
|
57
|
+
| A08 | Data Integrity Failures | Insecure deserialization, unsigned updates |
|
|
58
|
+
| A09 | Logging Failures | Insufficient logging, log injection, PII in logs |
|
|
59
|
+
| A10 | SSRF | Unvalidated URLs, internal network access |
|
|
60
|
+
|
|
61
|
+
### Phase 3 — CWE Pattern Matching
|
|
62
|
+
Map findings to specific CWE entries (e.g., CWE-79 for XSS, CWE-89 for SQL injection). Include CWE ID in every finding.
|
|
63
|
+
|
|
64
|
+
### Phase 4 — Remediation
|
|
65
|
+
For each finding:
|
|
66
|
+
1. Explain the vulnerability in plain language
|
|
67
|
+
2. Show the vulnerable code
|
|
68
|
+
3. Provide the fixed code
|
|
69
|
+
4. Explain why the fix works
|
|
70
|
+
5. Rate exploitability: `trivial / moderate / complex`
|
|
71
|
+
|
|
72
|
+
### Phase 5 — Dependency Audit
|
|
73
|
+
1. Parse dependency manifests (package.json, requirements.txt, go.mod, etc.)
|
|
74
|
+
2. Flag dependencies with known CVEs
|
|
75
|
+
3. Suggest version upgrades with breaking change warnings
|
|
76
|
+
|
|
77
|
+
## Tools Required
|
|
78
|
+
|
|
79
|
+
- `codebase` — Read source code and dependency files
|
|
80
|
+
- `terminal` — Run `npm audit`, `pip audit`, or equivalent
|
|
81
|
+
- `fetch` — Check CVE databases for dependency vulnerabilities
|
|
82
|
+
|
|
83
|
+
## Severity Scoring
|
|
84
|
+
|
|
85
|
+
<HARD-GATE>
|
|
86
|
+
Do NOT mark a scan as "clean" or "no issues" if any Critical or High severity findings exist.
|
|
87
|
+
Do NOT downgrade severity to avoid blocking a deployment.
|
|
88
|
+
Critical findings MUST be remediated before code is shipped.
|
|
89
|
+
</HARD-GATE>
|
|
90
|
+
|
|
91
|
+
| Level | Criteria |
|
|
92
|
+
|---|---|
|
|
93
|
+
| **Critical** | Remote code execution, auth bypass, data exfiltration — exploit is trivial |
|
|
94
|
+
| **High** | Significant data exposure, privilege escalation — exploit is moderate |
|
|
95
|
+
| **Medium** | Information disclosure, denial of service — exploit requires chaining |
|
|
96
|
+
| **Low** | Best practice violation with no direct exploit path |
|
|
97
|
+
|
|
98
|
+
## Output Format
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
## [CrewPilot → Vulnerability Scan]
|
|
102
|
+
|
|
103
|
+
### Attack Surface
|
|
104
|
+
- Entry points: {N}
|
|
105
|
+
- Trust boundaries: {list}
|
|
106
|
+
- Dependencies: {N} total, {N} flagged
|
|
107
|
+
|
|
108
|
+
### Findings
|
|
109
|
+
|
|
110
|
+
#### [{severity}] {OWASP-ID} — {title} (CWE-{NNN})
|
|
111
|
+
**File**: {path}:{line}
|
|
112
|
+
**Vulnerability**: {plain language explanation}
|
|
113
|
+
**Exploitability**: {trivial/moderate/complex}
|
|
114
|
+
**Vulnerable code**:
|
|
115
|
+
\`\`\`{lang}
|
|
116
|
+
{code}
|
|
117
|
+
\`\`\`
|
|
118
|
+
**Remediation**:
|
|
119
|
+
\`\`\`{lang}
|
|
120
|
+
{fixed code}
|
|
121
|
+
\`\`\`
|
|
122
|
+
**Why this fixes it**: {explanation}
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
(repeat per finding)
|
|
126
|
+
|
|
127
|
+
### Dependency Alerts
|
|
128
|
+
| Package | Current | Vulnerable | Fixed In | CVE |
|
|
129
|
+
|---|---|---|---|---|
|
|
130
|
+
| | | | | |
|
|
131
|
+
|
|
132
|
+
### Summary
|
|
133
|
+
{critical}/{high}/{medium}/{low} findings | Exploitability: {overall risk}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## Chains To
|
|
137
|
+
|
|
138
|
+
- `code-quality` — For non-security improvements found during scan
|
|
139
|
+
- `deploy-guard` — Security findings should block deployment
|
|
140
|
+
|
|
141
|
+
## Anti-Patterns
|
|
142
|
+
|
|
143
|
+
- Do NOT report theoretical vulnerabilities in unreachable code
|
|
144
|
+
- Do NOT flag every dependency without checking actual CVE relevance
|
|
145
|
+
- Do NOT provide fixes that break functionality to achieve security
|
|
146
|
+
- Do NOT skip the "why this fixes it" explanation — it's educational
|