supasec 1.0.1 → 1.0.3

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.
Files changed (45) hide show
  1. package/COMPLETION_REPORT.md +324 -0
  2. package/FIXES_SUMMARY.md +224 -0
  3. package/IMPLEMENTATION_NOTES.md +305 -0
  4. package/QUICK_REFERENCE.md +185 -0
  5. package/README.md +1 -1
  6. package/REPORTING.md +217 -0
  7. package/STATUS.md +269 -0
  8. package/dist/commands/scan.d.ts +1 -0
  9. package/dist/commands/scan.d.ts.map +1 -1
  10. package/dist/commands/scan.js +186 -15
  11. package/dist/commands/scan.js.map +1 -1
  12. package/dist/models/scan-result.d.ts +8 -0
  13. package/dist/models/scan-result.d.ts.map +1 -1
  14. package/dist/models/scan-result.js.map +1 -1
  15. package/dist/reporters/html.d.ts +18 -0
  16. package/dist/reporters/html.d.ts.map +1 -0
  17. package/dist/reporters/html.js +946 -0
  18. package/dist/reporters/html.js.map +1 -0
  19. package/dist/reporters/index.d.ts +2 -0
  20. package/dist/reporters/index.d.ts.map +1 -1
  21. package/dist/reporters/index.js +2 -0
  22. package/dist/reporters/index.js.map +1 -1
  23. package/dist/reporters/terminal.d.ts.map +1 -1
  24. package/dist/reporters/terminal.js +9 -0
  25. package/dist/reporters/terminal.js.map +1 -1
  26. package/dist/scanners/secrets/detector.d.ts.map +1 -1
  27. package/dist/scanners/secrets/detector.js +6 -2
  28. package/dist/scanners/secrets/detector.js.map +1 -1
  29. package/package.json +1 -1
  30. package/reports/supasec---------app-2026-01-28-16-58-47.html +804 -0
  31. package/reports/supasec---------app-2026-01-28-17-06-43.html +722 -0
  32. package/reports/supasec---------app-2026-01-28-17-07-23.html +722 -0
  33. package/reports/supasec---------app-2026-01-28-17-08-00.html +722 -0
  34. package/reports/supasec---------app-2026-01-28-17-08-20.html +722 -0
  35. package/reports/supasec---------app-2026-01-28-17-08-41.html +722 -0
  36. package/reports/supasec-au---your-app-2026-01-28-17-14-57.html +715 -0
  37. package/reports/supasec-au---your-app-2026-01-28-17-19-03.html +715 -0
  38. package/reports/supasec-audityour-app-2026-01-28-17-09-24.html +722 -0
  39. package/reports/supasec-ex-mple-com-2026-01-28-17-14-52.json +229 -0
  40. package/reports/supasec-ex-mple-com-2026-01-28-17-15-39.html +715 -0
  41. package/reports/supasec-ex-mple-com-2026-01-28-17-17-22.html +715 -0
  42. package/reports/supasec-example-com-2026-01-28-17-15-06.html +715 -0
  43. package/reports/supasec-my--------------name-com-2026-01-28-17-15-02.html +715 -0
  44. package/reports/supasec-st-ging-com-2026-01-28-17-16-17.html +715 -0
  45. package/PUBLISHING.md +0 -51
@@ -0,0 +1,229 @@
1
+ {
2
+ "scan_metadata": {
3
+ "tool": "supasec",
4
+ "version": "1.0.0",
5
+ "scan_id": "scan_2026-01-28T17-14-52",
6
+ "target_url": "ex*mple.com/",
7
+ "scan_date": "2026-01-28T17:14:52.023Z",
8
+ "scan_duration_seconds": 0.007,
9
+ "scanner_mode": "url"
10
+ },
11
+ "project_info": {
12
+ "tables_count": 0,
13
+ "rpcs_count": 0,
14
+ "storage_buckets": 0,
15
+ "auth_providers": [],
16
+ "edge_functions": 0
17
+ },
18
+ "summary": {
19
+ "total_issues": 2,
20
+ "critical": 0,
21
+ "high": 1,
22
+ "medium": 1,
23
+ "low": 0,
24
+ "info": 0,
25
+ "passed_checks": 2,
26
+ "overall_grade": "B",
27
+ "overall_score": 85
28
+ },
29
+ "findings": [
30
+ {
31
+ "finding_id": "SEC-001",
32
+ "timestamp": "2026-01-28T17:14:52.026Z",
33
+ "severity": "MEDIUM",
34
+ "category": "secrets",
35
+ "subcategory": "supabase",
36
+ "title": "Supabase Anon Key Exposed",
37
+ "description": "Found supabase anon key in javascript content. Potential Supabase anon key - verify if properly scoped",
38
+ "location": {
39
+ "file": "https://ex*****.com/",
40
+ "line": 3,
41
+ "column": 28
42
+ },
43
+ "evidence": {
44
+ "code_snippet": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiJ9.",
45
+ "matched_pattern": "Supabase Anon Key",
46
+ "sample_data": {
47
+ "masked": "eyJh**************************************************iJ9.",
48
+ "original": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiJ9."
49
+ },
50
+ "key_type": "supabase",
51
+ "line_number": 3,
52
+ "column_number": 28
53
+ },
54
+ "impact": {
55
+ "severity_score": 5,
56
+ "description": "Complete database access - attacker can read, write, and delete all data",
57
+ "affected_resources": [
58
+ "application",
59
+ "database",
60
+ "api"
61
+ ],
62
+ "compliance_violations": [
63
+ "SOC2-CC6.1",
64
+ "GDPR-Article-32"
65
+ ]
66
+ },
67
+ "remediation": {
68
+ "summary": "Remove supabase anon key from client-side code",
69
+ "priority": "HIGH",
70
+ "effort": "LOW",
71
+ "steps": [
72
+ {
73
+ "order": 1,
74
+ "action": "Regenerate the service_role key in Supabase dashboard",
75
+ "command": "Dashboard > Settings > API > Regenerate service_role key"
76
+ },
77
+ {
78
+ "order": 2,
79
+ "action": "Move service_role key to backend environment variables only",
80
+ "code": "// Server-side only\nconst supabase = createClient(url, process.env.SUPABASE_SERVICE_ROLE_KEY)"
81
+ },
82
+ {
83
+ "order": 3,
84
+ "action": "Use anon key for client-side operations",
85
+ "code": "// Client-side\nconst supabase = createClient(url, process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY)"
86
+ },
87
+ {
88
+ "order": 4,
89
+ "action": "Review database access logs for unauthorized access"
90
+ }
91
+ ],
92
+ "auto_fixable": false
93
+ },
94
+ "references": [
95
+ {
96
+ "title": "Supabase API Keys Documentation",
97
+ "url": "https://supabase.com/docs/guides/api#api-keys"
98
+ },
99
+ {
100
+ "title": "CWE-798: Use of Hard-coded Credentials",
101
+ "url": "https://cwe.mitre.org/data/definitions/798.html"
102
+ }
103
+ ],
104
+ "false_positive_likelihood": "LOW",
105
+ "confidence": 0.95
106
+ },
107
+ {
108
+ "finding_id": "SEC-003",
109
+ "timestamp": "2026-01-28T17:14:52.027Z",
110
+ "severity": "HIGH",
111
+ "category": "secrets",
112
+ "subcategory": "auth",
113
+ "title": "JWT Token Exposed",
114
+ "description": "Found jwt token in javascript content. JWT token detected",
115
+ "location": {
116
+ "file": "https://ex*****.com/",
117
+ "line": 3,
118
+ "column": 28
119
+ },
120
+ "evidence": {
121
+ "code_snippet": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiJ9.",
122
+ "matched_pattern": "JWT Token",
123
+ "sample_data": {
124
+ "masked": "eyJh**************************************************iJ9.",
125
+ "original": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiJ9."
126
+ },
127
+ "key_type": "auth",
128
+ "line_number": 3,
129
+ "column_number": 28
130
+ },
131
+ "impact": {
132
+ "severity_score": 8,
133
+ "description": "Authentication token exposure - unauthorized access to user accounts",
134
+ "affected_resources": [
135
+ "application",
136
+ "database",
137
+ "api"
138
+ ],
139
+ "compliance_violations": [
140
+ "SOC2-CC6.1",
141
+ "OWASP-A02-2021"
142
+ ]
143
+ },
144
+ "remediation": {
145
+ "summary": "Remove jwt token from client-side code",
146
+ "priority": "HIGH",
147
+ "effort": "LOW",
148
+ "steps": [
149
+ {
150
+ "order": 1,
151
+ "action": "Remove the exposed secret from client-side code immediately",
152
+ "code": "// Remove hardcoded key\nconst supabaseKey = process.env.SUPABASE_KEY;"
153
+ },
154
+ {
155
+ "order": 2,
156
+ "action": "Move the secret to environment variables on the server",
157
+ "command": "export API_KEY=your_key_here"
158
+ },
159
+ {
160
+ "order": 3,
161
+ "action": "Regenerate the exposed secret to invalidate the compromised key",
162
+ "command": "Regenerate in service dashboard"
163
+ },
164
+ {
165
+ "order": 4,
166
+ "action": "Use only the anon/public key in frontend code",
167
+ "code": "const supabase = createClient(url, process.env.SUPABASE_ANON_KEY)"
168
+ }
169
+ ],
170
+ "auto_fixable": false
171
+ },
172
+ "references": [
173
+ {
174
+ "title": "OWASP Authentication Cheat Sheet",
175
+ "url": "https://cheatsheetseries.owasp.org/cheatsheets/Authentication_Cheat_Sheet.html"
176
+ }
177
+ ],
178
+ "false_positive_likelihood": "LOW",
179
+ "confidence": 0.95
180
+ }
181
+ ],
182
+ "passed_checks": [
183
+ {
184
+ "check_id": "SEC-HTTPS-001",
185
+ "category": "transport",
186
+ "title": "HTTPS Enforced",
187
+ "description": "All connections use HTTPS/TLS 1.2+"
188
+ },
189
+ {
190
+ "check_id": "AUTH-EMAIL-001",
191
+ "category": "auth",
192
+ "title": "Email Verification Enabled",
193
+ "description": "New users must verify email before access"
194
+ }
195
+ ],
196
+ "grading": {
197
+ "overall_grade": "B",
198
+ "overall_score": 85,
199
+ "category_scores": {},
200
+ "scoring_methodology": {
201
+ "base_score": 100,
202
+ "critical_deduction": -20,
203
+ "high_deduction": -10,
204
+ "medium_deduction": -5,
205
+ "low_deduction": -2
206
+ },
207
+ "grade_thresholds": {
208
+ "A": 90,
209
+ "B": 80,
210
+ "C": 70,
211
+ "D": 60,
212
+ "F": 0
213
+ },
214
+ "improvement_priority": [
215
+ "Fix SEC-003: JWT Token Exposed"
216
+ ]
217
+ },
218
+ "recommendations": {
219
+ "immediate_actions": [],
220
+ "security_best_practices": [
221
+ "Audit all environment variables and secrets management"
222
+ ],
223
+ "next_steps": [
224
+ "Run: supasec fix --interactive",
225
+ "Schedule weekly scans: supasec watch --interval 604800",
226
+ "Add to CI/CD: see https://github.com/yourusername/supasec#cicd"
227
+ ]
228
+ }
229
+ }