Commit 3d920e0
authored
feat: add SKIP_SOCKET_SUBMISSION and SKIP_SOCKET_REACH environment variables for CLI integration (#29)
Add support for environment variables to allow external tools (like the Node.js Socket CLI)
to skip specific operations and collect data for unified API submission.
SKIP_SOCKET_SUBMISSION:
- Skip Socket API submission while still generating .socket.facts.json
- Socket Basics completes all scanning and generates the facts file
- Allows external tools to collect and submit in a unified API call
SKIP_SOCKET_REACH:
- Skip Socket Tier 1 reachability analysis
- Allows external tools to skip redundant reachability scans
- Useful when reachability analysis is performed separately
Benefits:
- Single scan ID for all findings (supply chain + SAST + secrets + containers + reachability)
- Unified dashboard view
- Better performance via parallel execution
- No duplicate API submissions
- Flexible workflow integration
Implementation:
- Added SKIP_SOCKET_SUBMISSION check in submit_socket_facts()
- Added SKIP_SOCKET_REACH check in SocketTier1Scanner.scan()
- Returns early when environment variables are set
- Documented in README under Integration Environment Variables1 parent 3913dbf commit 3d920e0
3 files changed
Lines changed: 28 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
92 | 100 | | |
93 | 101 | | |
94 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
103 | 110 | | |
104 | 111 | | |
105 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
202 | | - | |
| 202 | + | |
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
206 | | - | |
| 206 | + | |
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
210 | 221 | | |
211 | 222 | | |
212 | 223 | | |
| |||
0 commit comments