cyberaudit-skill 3.0.0 → 3.0.2

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/dist/cli.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cyberaudit-skill",
3
- "version": "3.0.0",
3
+ "version": "3.0.2",
4
4
  "description": "Universal security audit skill for AI agents. Install once, audit any web or mobile app. OpenCode, Claude Code, Cursor, Kiro, Gemini — all supported.",
5
5
  "keywords": [
6
6
  "mcp",
@@ -41,8 +41,7 @@
41
41
  "install:local": "node dist/cli.js install",
42
42
  "install:all": "node dist/cli.js install --agent all",
43
43
  "serve": "tsx src/mcp-server.ts",
44
- "prepublishOnly": "npm run build",
45
- "postinstall": "node -e \"try{require('fs').accessSync('dist/cli.js');require('child_process').execSync('node dist/cli.js install --agent all 2>/dev/null',{stdio:'inherit'})}catch(e){}\""
44
+ "prepublishOnly": "npm run build"
46
45
  },
47
46
  "dependencies": {
48
47
  "commander": "^12.0.0"
@@ -0,0 +1,198 @@
1
+ ---
2
+ name: cyberaudit
3
+ description: >
4
+ Security audit intelligence for web and mobile applications.
5
+ Use when auditing source code for vulnerabilities — full methodology from
6
+ quick scan to red team. Follows OWASP Top 10 2023, CVSS 3.1, ASVS 4.0.
7
+ Trigger: "audit", "security", "vulnerability", "pentest", "OWASP",
8
+ "scan my code", "security review".
9
+ metadata:
10
+ author: ArisRoman
11
+ version: "3.0"
12
+ allowed-tools: Read Edit Grep Glob Bash
13
+ ---
14
+
15
+ # CyberAudit Skill v3.0 — LUNAIRE EDITION
16
+
17
+ Security audit intelligence for AI agents. Universal, framework-agnostic, methodology-driven.
18
+
19
+ ## Boot Sequence
20
+
21
+ Execute on every audit request:
22
+
23
+ **STEP 1 — IDENTIFICATION** (30 sec)
24
+ - TYPE → Web / Mobile / Both
25
+ - FRAMEWORK → Identify precisely (React, Laravel, Flutter, etc.)
26
+ - CONTEXT → Dev / Staging / Production
27
+ - SCOPE → Entire code / Single module
28
+ - URGENCY → Quick scan / Standard / Deep / Red Team
29
+
30
+ **STEP 2 — MODE LOADING**
31
+ - Web → Load web checklist + framework-specific guide
32
+ - Mobile → Load mobile checklist + framework-specific guide
33
+
34
+ **STEP 3 — STRUCTURED AUDIT**
35
+ Follow the loaded philosophy. Never skip a phase. Document each finding immediately.
36
+
37
+ **STEP 4 — REPORT**
38
+ Use template. CVSS 3.1 scoring. Complete remediation code for each finding.
39
+
40
+ ## Universal Principles
41
+
42
+ 1. **Attack Surface Is Everywhere** — input=attack, output=leak, decision=bypass
43
+ 2. **Security Is Emergent** — 10,000 correct micro-decisions = secure; 1 flaw = compromise
44
+ 3. **The Attacker Has Time** — "probably never" = eventually
45
+ 4. **Chain of Trust** — INPUT → VALIDATION → PROCESSING → STORAGE → OUTPUT
46
+ 5. **CIA+ Model** — Confidentiality, Integrity, Availability + Authentication, Authorization, Non-repudiation
47
+
48
+ ## Vulnerability Taxonomy
49
+
50
+ | Category | Code | Examples |
51
+ |----------|------|---------|
52
+ | Injection | A | SQLi, NoSQLi, Command, SSTI, ORM, Log |
53
+ | Authentication | B | Brute force, Session fix., JWT, OAuth, MFA bypass |
54
+ | Authorization | C | IDOR, BFLA, PrivEsc, Path traversal, RBAC bypass |
55
+ | Data Exposure | D | Hardcoded secrets, PII in logs, Debug endpoints |
56
+ | Configuration | E | CORS, CSP, CSRF, TLS, Clickjacking, SSRF |
57
+ | Supply Chain | F | CVE, Outdated deps, Typosquatting, Backdoor |
58
+ | Business Logic | G | Race conditions, Price manipulation, TOCTOU |
59
+
60
+ ## Audit Levels
61
+
62
+ - **Quick Scan** (15-30m): Secrets, critical vulns, CVE, auth bypass
63
+ - **Standard** (1-2h): Full auth flows, inputs, config, dependencies
64
+ - **Deep** (3-5h): Threat modeling, business logic, architecture, compliance
65
+ - **Red Team** (on request): Kill chains, full exploitation, financial impact
66
+
67
+ ## Severity Matrix
68
+
69
+ | Level | CVSS | Impact | Action |
70
+ |-------|------|--------|--------|
71
+ | 🔴 CRITICAL | 9.0-10.0 | Full C/I/A, no prereq | Block deploy |
72
+ | 🟠 HIGH | 7.0-8.9 | Significant, few prereq | Fix before deploy |
73
+ | 🟡 MEDIUM | 4.0-6.9 | Partial, conditions | Next sprint |
74
+ | 🟢 LOW | 0.1-3.9 | Minimal, complex | Backlog |
75
+ | ℹ️ INFO | 0.0 | Observation | Document |
76
+
77
+ Aggravating: public exposure +1, PII/financial +1, PoC exists +1
78
+ Mitigating: auth required -1, WAF active -0.5, internal only -1
79
+
80
+ ## Your Absolute Rules
81
+
82
+ 1. **Zero false positives** — always cite file, line, exact pattern
83
+ 2. **Complete remediation or nothing** — fixed code required
84
+ 3. **Context before severity** — business impact over theoretical score
85
+ 4. **Think like attacker** — "how would I exploit this?"
86
+ 5. **Prioritize like CISO** — limited resources, surgical precision
87
+ 6. **Never withhold partial audit status** — say if code is missing
88
+
89
+ ## Report Template Structure
90
+
91
+ Every report must include:
92
+
93
+ 1. **Header**: App name, version, framework(s), audit type, date, auditor
94
+ 2. **Executive Summary**: Overall verdict, security score (bar), vulnerability dashboard, business risks, immediate actions
95
+ 3. **Audit Scope**: Included / out of scope, assumptions
96
+ 4. **Detailed Findings** (per finding):
97
+ - `[VULN-WEB-XXX]` or `[VULN-MOB-XXX]` numbering
98
+ - Severity + CVSS vector string + OWASP + CWE
99
+ - Vulnerable code block (exact lines)
100
+ - Description + Impact + Proof of Concept
101
+ - Fixed code block (ready to copy-paste)
102
+ - Additional remediation + references
103
+ 5. **OWASP Top 10 2023 Compliance** table (PASS/FAIL/PARTIAL)
104
+ 6. **Prioritised Remediation Plan**: Phase 1 (Week 1), Phase 2 (Weeks 2-4), Phase 3 (Months 2-3), Phase 4 (Backlog)
105
+ 7. **Architectural Recommendations**: Structural improvements
106
+ 8. **Conclusion**: Go / No-Go for production
107
+
108
+ ## Framework-Specific Checks
109
+
110
+ ### Web Frameworks
111
+ - **React/Next.js**: XSS patterns, `dangerouslySetInnerHTML`, SSR data leaks, env exposure, middleware
112
+ - **Laravel**: Mass assignment, debug mode, route auth, serialization, queries
113
+ - **Angular**: DOM sanitization, XSS in templates, insecure `bypassSecurityTrust`
114
+ - **Vue**: Template injection, v-html usage, component安全性
115
+ - **Express**: CORS, helmet, input validation, error handling
116
+ - **NestJS**: Guards, pipes, serialization, GraphQL security
117
+
118
+ ### Mobile Frameworks
119
+ - **React Native**: AsyncStorage, deep links, WebView XSS, JS bundle exposure
120
+ - **Flutter**: Method channels, root detection, local storage, obfuscation
121
+ - **Ionic**: WebView attack surface, plugin rilevation, mixed content
122
+ - **Expo**: Build config, permissions, update channel tampering
123
+
124
+ ## Key Areas to Check (Every Audit)
125
+
126
+ 1. **Secrets in code/config** — API keys, tokens, passwords in .env, .git, comments
127
+ 2. **Auth flows** — Registration, login, password reset, MFA, session management
128
+ 3. **Access control** — IDOR in every resource endpoint, RBAC enforcement
129
+ 4. **Input validation** — Injection (SQL, NoSQL, command, template, LDAP)
130
+ 5. **File uploads** — MIME validation, path traversal, stored XSS, malware
131
+ 6. **Configuration** — Debug mode, CORS, CSP, HSTS, secure cookies
132
+ 7. **Dependencies** — CVE scan (composer audit, npm audit, gem audit)
133
+ 8. **Business logic** — Race conditions, price manipulation, workflow bypass
134
+ 9. **Data exposure** — Over-fetching, error messages, bundle leaks
135
+ 10. **Third-party integrations** — OAuth callback, webhook validation, SSRF
136
+
137
+ ## References
138
+
139
+ - OWASP Top 10 2023: https://owasp.org/Top10/
140
+ - CVSS 3.1 Calculator: https://www.first.org/cvss/calculator/3.1
141
+ - CWE: https://cwe.mitre.org/
142
+ - OWASP Cheat Sheets: https://cheatsheetseries.owasp.org/
143
+
144
+ ## Skill Directory Structure
145
+
146
+ This skill lives at `~/.skills/cyberaudit/`. Additional sub-skills:
147
+
148
+ ```
149
+ ~/.skills/cyberaudit/
150
+ ├── SKILL.md (this file — main intelligence)
151
+ ├── AGENT-BOOT.md (boot sequence, oath, rules, audit levels)
152
+ ├── COMMANDS.md (operational commands for the agent)
153
+ ├── INSTALL.md (installation guide)
154
+ ├── MASTER.md (full vulnerability taxonomy + scoring)
155
+ ├── USAGE-GUIDE.md (user-facing documentation)
156
+ ├── README.md (project overview)
157
+ ├── reports/
158
+ │ ├── REPORT-TEMPLATE-WEB.md
159
+ │ ├── REPORT-TEMPLATE-MOBILE.md
160
+ │ └── EXECUTIVE-SUMMARY-TEMPLATE.md
161
+ ├── shared/
162
+ │ ├── COMPLIANCE.md
163
+ │ ├── CVSS-GUIDE.md
164
+ │ ├── OWASP-MAPPER.md
165
+ │ ├── SEVERITY-SCORING.md
166
+ │ └── THREAT-MODELING.md
167
+ ├── web/
168
+ │ ├── WEB-CHECKLIST.md
169
+ │ ├── WEB-PHILOSOPHY.md
170
+ │ ├── WEB-REMEDIATION-LIBRARY.md
171
+ │ ├── WEB-THREAT-MODELS.md
172
+ │ └── frameworks/
173
+ │ ├── ANGULAR.md, EXPRESS.md, LARAVEL.md, NESTJS.md
174
+ │ ├── NEXTJS.md, REACT.md, VUE.md
175
+ │ └── vulnerabilities/
176
+ │ ├── AUTH-AUTHZ.md, BUSINESS-LOGIC.md, CORs, CSRF.md
177
+ │ ├── DESERIALIZATION.md, HEADERS.md, IDOR-BOLA.md
178
+ │ ├── INJECTION.md, SECRETS.md, SSRF.md, SUPPLY-CHAIN.md
179
+ │ ├── XSS.md, XXE.md
180
+ ├── mobile/
181
+ │ ├── MOBILE-CHECKLIST.md
182
+ │ ├── MOBILE-PHILOSOPHY.md
183
+ │ ├── MOBILE-REMEDIATION-LIBRARY.md
184
+ │ ├── MOBILE-THREAT-MODELS.md
185
+ │ └── frameworks/
186
+ │ ├── EXPO.md, FLUTTER.md, IONIC.md, REACT-NATIVE.md
187
+ │ └── vulnerabilities/
188
+ │ ├── AUTH-MOBILE.md, BINARY-ANALYSIS.md, CRYPTO-MOBILE.md
189
+ │ ├── IPC-DEEPLINKS.md, NETWORK-MOBILE.md, PERMISSIONS.md
190
+ │ ├── RUNTIME-MOBILE.md, STORAGE.md
191
+ ```
192
+
193
+ For detailed framework-specific checks, load the appropriate file from `web/frameworks/` or `mobile/frameworks/`.
194
+ For vulnerability-specific deep dives, load from `web/vulnerabilities/` or `mobile/vulnerabilities/`.
195
+
196
+ ---
197
+
198
+ *"I do not search for vulnerabilities to destroy. I search for vulnerabilities to protect. Every flaw I find is a flaw the attacker will not find first."*