supasec 1.0.3 → 1.0.5

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 (117) hide show
  1. package/Feature-List.md +233 -0
  2. package/README.md +53 -12
  3. package/dist/cli.js +2 -0
  4. package/dist/cli.js.map +1 -1
  5. package/dist/commands/index.d.ts +1 -0
  6. package/dist/commands/index.d.ts.map +1 -1
  7. package/dist/commands/index.js +1 -0
  8. package/dist/commands/index.js.map +1 -1
  9. package/dist/commands/scan.d.ts.map +1 -1
  10. package/dist/commands/scan.js +82 -26
  11. package/dist/commands/scan.js.map +1 -1
  12. package/dist/commands/snapshot.d.ts +32 -0
  13. package/dist/commands/snapshot.d.ts.map +1 -0
  14. package/dist/commands/snapshot.js +282 -0
  15. package/dist/commands/snapshot.js.map +1 -0
  16. package/dist/reporters/html.d.ts +3 -2
  17. package/dist/reporters/html.d.ts.map +1 -1
  18. package/dist/reporters/html.js +844 -538
  19. package/dist/reporters/html.js.map +1 -1
  20. package/dist/reporters/terminal.d.ts +38 -2
  21. package/dist/reporters/terminal.d.ts.map +1 -1
  22. package/dist/reporters/terminal.js +292 -131
  23. package/dist/reporters/terminal.js.map +1 -1
  24. package/dist/scanners/auth/analyzer.d.ts +40 -0
  25. package/dist/scanners/auth/analyzer.d.ts.map +1 -0
  26. package/dist/scanners/auth/analyzer.js +673 -0
  27. package/dist/scanners/auth/analyzer.js.map +1 -0
  28. package/dist/scanners/auth/index.d.ts +6 -0
  29. package/dist/scanners/auth/index.d.ts.map +1 -0
  30. package/dist/scanners/auth/index.js +22 -0
  31. package/dist/scanners/auth/index.js.map +1 -0
  32. package/dist/scanners/edge/analyzer.d.ts +35 -0
  33. package/dist/scanners/edge/analyzer.d.ts.map +1 -0
  34. package/dist/scanners/edge/analyzer.js +614 -0
  35. package/dist/scanners/edge/analyzer.js.map +1 -0
  36. package/dist/scanners/edge/index.d.ts +6 -0
  37. package/dist/scanners/edge/index.d.ts.map +1 -0
  38. package/dist/scanners/edge/index.js +22 -0
  39. package/dist/scanners/edge/index.js.map +1 -0
  40. package/dist/scanners/functions/analyzer.d.ts +41 -0
  41. package/dist/scanners/functions/analyzer.d.ts.map +1 -0
  42. package/dist/scanners/functions/analyzer.js +378 -0
  43. package/dist/scanners/functions/analyzer.js.map +1 -0
  44. package/dist/scanners/functions/index.d.ts +6 -0
  45. package/dist/scanners/functions/index.d.ts.map +1 -0
  46. package/dist/scanners/functions/index.js +22 -0
  47. package/dist/scanners/functions/index.js.map +1 -0
  48. package/dist/scanners/git/index.d.ts +6 -0
  49. package/dist/scanners/git/index.d.ts.map +1 -0
  50. package/dist/scanners/git/index.js +22 -0
  51. package/dist/scanners/git/index.js.map +1 -0
  52. package/dist/scanners/git/scanner.d.ts +22 -0
  53. package/dist/scanners/git/scanner.d.ts.map +1 -0
  54. package/dist/scanners/git/scanner.js +531 -0
  55. package/dist/scanners/git/scanner.js.map +1 -0
  56. package/dist/scanners/https/analyzer.d.ts +42 -0
  57. package/dist/scanners/https/analyzer.d.ts.map +1 -0
  58. package/dist/scanners/https/analyzer.js +470 -0
  59. package/dist/scanners/https/analyzer.js.map +1 -0
  60. package/dist/scanners/https/index.d.ts +8 -0
  61. package/dist/scanners/https/index.d.ts.map +1 -0
  62. package/dist/scanners/https/index.js +17 -0
  63. package/dist/scanners/https/index.js.map +1 -0
  64. package/dist/scanners/index.d.ts +6 -0
  65. package/dist/scanners/index.d.ts.map +1 -1
  66. package/dist/scanners/index.js +6 -0
  67. package/dist/scanners/index.js.map +1 -1
  68. package/dist/scanners/rls/fuzzer.d.ts +40 -0
  69. package/dist/scanners/rls/fuzzer.d.ts.map +1 -0
  70. package/dist/scanners/rls/fuzzer.js +360 -0
  71. package/dist/scanners/rls/fuzzer.js.map +1 -0
  72. package/dist/scanners/rls/index.d.ts +1 -0
  73. package/dist/scanners/rls/index.d.ts.map +1 -1
  74. package/dist/scanners/rls/index.js +1 -0
  75. package/dist/scanners/rls/index.js.map +1 -1
  76. package/dist/scanners/secrets/detector.d.ts.map +1 -1
  77. package/dist/scanners/secrets/detector.js +44 -12
  78. package/dist/scanners/secrets/detector.js.map +1 -1
  79. package/dist/scanners/secrets/index.d.ts +1 -0
  80. package/dist/scanners/secrets/index.d.ts.map +1 -1
  81. package/dist/scanners/secrets/index.js +4 -0
  82. package/dist/scanners/secrets/index.js.map +1 -1
  83. package/dist/scanners/secrets/patterns.d.ts +25 -0
  84. package/dist/scanners/secrets/patterns.d.ts.map +1 -1
  85. package/dist/scanners/secrets/patterns.js +138 -27
  86. package/dist/scanners/secrets/patterns.js.map +1 -1
  87. package/dist/scanners/storage/analyzer.d.ts +49 -0
  88. package/dist/scanners/storage/analyzer.d.ts.map +1 -0
  89. package/dist/scanners/storage/analyzer.js +438 -0
  90. package/dist/scanners/storage/analyzer.js.map +1 -0
  91. package/dist/scanners/storage/index.d.ts +6 -0
  92. package/dist/scanners/storage/index.d.ts.map +1 -0
  93. package/dist/scanners/storage/index.js +22 -0
  94. package/dist/scanners/storage/index.js.map +1 -0
  95. package/package.json +1 -1
  96. package/reports/{supasec-audityour-app-2026-01-28-17-09-24.html → supasec-audityour-app-2026-01-28-19-42-22.html} +51 -16
  97. package/reports/supasec-audityour-app-2026-01-28-19-49-18.html +1122 -0
  98. package/COMPLETION_REPORT.md +0 -324
  99. package/FIXES_SUMMARY.md +0 -224
  100. package/IMPLEMENTATION_NOTES.md +0 -305
  101. package/QUICK_REFERENCE.md +0 -185
  102. package/REPORTING.md +0 -217
  103. package/STATUS.md +0 -269
  104. package/reports/supasec---------app-2026-01-28-16-58-47.html +0 -804
  105. package/reports/supasec---------app-2026-01-28-17-06-43.html +0 -722
  106. package/reports/supasec---------app-2026-01-28-17-07-23.html +0 -722
  107. package/reports/supasec---------app-2026-01-28-17-08-00.html +0 -722
  108. package/reports/supasec---------app-2026-01-28-17-08-20.html +0 -722
  109. package/reports/supasec---------app-2026-01-28-17-08-41.html +0 -722
  110. package/reports/supasec-au---your-app-2026-01-28-17-14-57.html +0 -715
  111. package/reports/supasec-au---your-app-2026-01-28-17-19-03.html +0 -715
  112. package/reports/supasec-ex-mple-com-2026-01-28-17-14-52.json +0 -229
  113. package/reports/supasec-ex-mple-com-2026-01-28-17-15-39.html +0 -715
  114. package/reports/supasec-ex-mple-com-2026-01-28-17-17-22.html +0 -715
  115. package/reports/supasec-example-com-2026-01-28-17-15-06.html +0 -715
  116. package/reports/supasec-my--------------name-com-2026-01-28-17-15-02.html +0 -715
  117. package/reports/supasec-st-ging-com-2026-01-28-17-16-17.html +0 -715
@@ -1,229 +0,0 @@
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
- }