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
package/STATUS.md DELETED
@@ -1,269 +0,0 @@
1
- # SupaSec Project Status
2
-
3
- **Last Updated:** January 28, 2026
4
- **Build Version:** 1.0.2
5
- **Status:** ✅ Fully Functional
6
-
7
- ---
8
-
9
- ## What's Working
10
-
11
- ### ✅ Core Scanning
12
- - Scan websites for security vulnerabilities
13
- - Detect exposed secrets (API keys, JWT tokens, etc.)
14
- - Analyze RLS policies (mock data)
15
- - Generate findings with severity levels
16
- - Provide remediation guidance
17
-
18
- ### ✅ Report Formats
19
- - **Terminal**: Colored, formatted console output
20
- - **JSON**: Machine-readable for CI/CD integration
21
- - **HTML**: Beautiful, interactive visual reports
22
- - **Custom Output**: Save to any location with `--output`
23
-
24
- ### ✅ Privacy Features
25
- - Domain masking: `example.com` → `ex*mple.com`
26
- - Secret masking: Shows first/last chars only
27
- - Works with `--mask` flag
28
- - Applied to all findings and descriptions
29
-
30
- ### ✅ Technical Details
31
- HTML reports include:
32
- - Exposed keys (masked)
33
- - Key types (what kind of secret)
34
- - Locations (file, URL, table)
35
- - Code snippets (context)
36
- - Remediation steps
37
- - Security grades
38
-
39
- ### ✅ Development
40
- - TypeScript compilation works
41
- - Clean build (no errors/warnings)
42
- - All dependencies resolved
43
- - Ready for npm publishing
44
- - Includes publish script
45
-
46
- ---
47
-
48
- ## What's Not Yet Implemented
49
-
50
- ### ⏳ Fix Command
51
- ```bash
52
- supasec fix --interactive # Not implemented yet
53
- ```
54
- To implement: SQL generation and database updates
55
-
56
- ### ⏳ Watch Mode
57
- ```bash
58
- supasec watch --interval 86400 # Not implemented yet
59
- ```
60
- To implement: Periodic scanning with trend tracking
61
-
62
- ### ⏳ Real Database Connection
63
- ```bash
64
- --project-url https://abc.supabase.co # Currently uses mock data
65
- --service-key abc123... # Planning for future
66
- --local # Local Supabase support
67
- ```
68
- To implement: Actual Supabase SDK integration
69
-
70
- ### ⏳ Configuration Files
71
- ```bash
72
- .supasecrc.json # Not yet supported
73
- supasec.config.json
74
- ```
75
- To implement: YAML/JSON config loading
76
-
77
- ---
78
-
79
- ## Test Results
80
-
81
- ### Build Status
82
- ```
83
- npm run build
84
- → ✅ No errors
85
- → ✅ No warnings
86
- → ✅ TypeScript compilation successful
87
- ```
88
-
89
- ### Functional Tests
90
- ```
91
- ✅ Scan command works
92
- ✅ Masking applies correctly
93
- ✅ JSON format exports
94
- ✅ HTML reports generate
95
- ✅ Technical details display
96
- ✅ Reports save to reports/ folder
97
- ✅ Terminal output colors work
98
- ✅ Severity levels calculate correctly
99
- ✅ Security grade calculation works
100
- ```
101
-
102
- ### Privacy Tests
103
- ```
104
- ✅ Domain masking: audityour.app → au******.app
105
- ✅ Long domains: myverylongdomainname.com → my**************name.com
106
- ✅ Secrets masked: pk_live_1234... → pk_live_1234****...
107
- ✅ URLs masked in findings: https://example.com/ → https://ex*mple.com/
108
- ✅ Code snippets masked when needed
109
- ```
110
-
111
- ### Quality Tests
112
- ```
113
- ✅ No unused imports
114
- ✅ No TypeScript errors
115
- ✅ Proper error handling
116
- ✅ Clean code structure
117
- ✅ Comprehensive comments
118
- ```
119
-
120
- ---
121
-
122
- ## Performance
123
-
124
- | Operation | Time | Status |
125
- |-----------|------|--------|
126
- | Build | <1s | ✅ Fast |
127
- | Scan | <100ms | ✅ Instant |
128
- | Generate HTML | <50ms | ✅ Fast |
129
- | Generate JSON | <10ms | ✅ Instant |
130
- | Full Report | <500ms | ✅ Quick |
131
-
132
- ---
133
-
134
- ## Documentation
135
-
136
- | Document | Purpose | Status |
137
- |----------|---------|--------|
138
- | [AGENTS.md](./AGENTS.md) | Development guide | ✅ Complete |
139
- | [QUICK_REFERENCE.md](./QUICK_REFERENCE.md) | Common commands | ✅ Complete |
140
- | [REPORTING.md](./REPORTING.md) | Report formats | ✅ Complete |
141
- | [PUBLISHING.md](./PUBLISHING.md) | npm publishing | ✅ Complete |
142
- | [IMPLEMENTATION_NOTES.md](./IMPLEMENTATION_NOTES.md) | Technical notes | ✅ Complete |
143
- | [COMPLETION_REPORT.md](./COMPLETION_REPORT.md) | Fixes verification | ✅ Complete |
144
- | [README.md](./README.md) | Project overview | ✅ Updated |
145
-
146
- ---
147
-
148
- ## Usage Examples
149
-
150
- ### Basic Scan
151
- ```bash
152
- npm start -- scan https://myapp.com
153
- ```
154
- Output: Terminal display + JSON + HTML reports
155
-
156
- ### Masked Report (For Sharing)
157
- ```bash
158
- npm start -- scan https://myapp.com --mask --format html --output report.html
159
- ```
160
- Output: HTML report with masked domains
161
-
162
- ### JSON Export (For CI/CD)
163
- ```bash
164
- npm start -- scan https://myapp.com --format json --output audit.json
165
- ```
166
- Output: Machine-readable security report
167
-
168
- ---
169
-
170
- ## File Structure
171
-
172
- ```
173
- supasec/
174
- ├── src/
175
- │ ├── cli.ts # Entry point
176
- │ ├── commands/
177
- │ │ ├── scan.ts # Main scan command ✅
178
- │ │ └── fix.ts # (Not implemented)
179
- │ ├── reporters/
180
- │ │ ├── terminal.ts # CLI output ✅
181
- │ │ └── html.ts # HTML generation ✅
182
- │ ├── scanners/
183
- │ │ ├── rls/
184
- │ │ ├── secrets/
185
- │ │ ├── auth/
186
- │ │ └── api/
187
- │ └── models/
188
- │ ├── finding.ts
189
- │ └── scan-result.ts
190
- ├── dist/ # Compiled output (auto-generated)
191
- ├── reports/ # Generated reports
192
- ├── scripts/
193
- │ └── publish.js # npm publish helper ✅
194
- ├── AGENTS.md # Dev guide ✅
195
- ├── QUICK_REFERENCE.md # Commands cheat sheet ✅
196
- ├── REPORTING.md # Report format docs ✅
197
- ├── PUBLISHING.md # npm publishing docs ✅
198
- └── package.json
199
- ```
200
-
201
- ---
202
-
203
- ## Next Steps
204
-
205
- ### High Priority
206
- 1. ✅ Privacy masking (COMPLETED)
207
- 2. ✅ Remove demo text (COMPLETED)
208
- 3. ✅ Technical details display (COMPLETED)
209
- 4. Implement `supasec fix` command
210
- 5. Add real Supabase connection
211
-
212
- ### Medium Priority
213
- 1. Implement watch mode
214
- 2. Add configuration file support
215
- 3. Create web dashboard
216
- 4. Add webhook integration
217
-
218
- ### Low Priority
219
- 1. Multi-project support
220
- 2. Team collaboration features
221
- 3. Custom rule builder
222
- 4. Advanced analytics
223
-
224
- ---
225
-
226
- ## Getting Started
227
-
228
- ```bash
229
- # Install
230
- npm install
231
-
232
- # Build
233
- npm run build
234
-
235
- # Scan a website
236
- npm start -- scan https://example.com
237
-
238
- # View report
239
- open reports/supasec-example-com-*.html
240
-
241
- # Learn more
242
- cat QUICK_REFERENCE.md
243
- ```
244
-
245
- ---
246
-
247
- ## Support & Documentation
248
-
249
- - **Quick Start:** [QUICK_REFERENCE.md](./QUICK_REFERENCE.md)
250
- - **Development:** [AGENTS.md](./AGENTS.md)
251
- - **Reports:** [REPORTING.md](./REPORTING.md)
252
- - **Publishing:** [PUBLISHING.md](./PUBLISHING.md)
253
- - **Technical:** [IMPLEMENTATION_NOTES.md](./IMPLEMENTATION_NOTES.md)
254
- - **Details:** [COMPLETION_REPORT.md](./COMPLETION_REPORT.md)
255
-
256
- ---
257
-
258
- ## Contact & Contributing
259
-
260
- - **GitHub:** https://github.com/Interpoolx/supasec
261
- - **npm:** https://www.npmjs.com/package/supasec
262
- - **Issues:** Report on GitHub
263
- - **Contributing:** See GitHub for guidelines
264
-
265
- ---
266
-
267
- **Status:** Production Ready ✅
268
- **Last Test:** January 28, 2026
269
- **Build:** v1.0.2