You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+78Lines changed: 78 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -285,6 +285,84 @@ The CLI determines which files to scan based on the following logic:
285
285
- **Using `--enable-diff`**: Forces diff mode without SCM integration - useful when you want differential scanning but are using `--integration api`. For example: `socketcli --integration api --enable-diff --target-path /path/to/repo`
286
286
- **Auto-detection**: Most CI/CD scenarios now work with just `socketcli --target-path /path/to/repo --scm github --pr-number $PR_NUM`
287
287
288
+
## CI/CD Platform Notes
289
+
290
+
### Buildkite Integration
291
+
292
+
Buildkite triggers may require special environment variable setup when integrated with GitLab or other source control systems.
293
+
294
+
#### Event Type Override
295
+
296
+
If you encounter "Unknown event type trigger"in Buildkite-triggered jobs, you can override the event type:
297
+
298
+
```bash
299
+
# Override Buildkite pipeline event type to merge_request_event
If these variables are missing, the CLI will fall back to merge-aware Git diff detection, which may produce partial results for complex merge scenarios.
319
+
320
+
#### Buildkite-Specific Configuration
321
+
322
+
For optimal detection in Buildkite environments triggered by GitLab:
323
+
324
+
```bash
325
+
# Example Buildkite pipeline step
326
+
steps:
327
+
- label: "Socket Security Scan"
328
+
command: |
329
+
# Override event type if needed
330
+
export CI_PIPELINE_SOURCE=merge_request_event
331
+
332
+
# Run Socket scan with GitLab SCM detection
333
+
socketcli \
334
+
--target-path $BUILDKITE_BUILD_CHECKOUT_PATH \
335
+
--scm gitlab \
336
+
--pr-number ${CI_MERGE_REQUEST_IID:-0} \
337
+
--enable-debug
338
+
```
339
+
340
+
### Advanced Configuration Options
341
+
342
+
#### Squash Merge Detection Control
343
+
344
+
The CLI uses heuristic-based detection for squash merges. To disable this behavior:
345
+
346
+
```bash
347
+
export SOCKET_GIT_DISABLE_SQUASH_HEURISTIC=1
348
+
socketcli --target-path ./my-project
349
+
```
350
+
351
+
**When to use this:**
352
+
- False positives: Regular commits with merge-like messages are misclassified
353
+
- Consistent behavior: You want deterministic single-commit detection only
354
+
- Performance: Avoiding heuristic analysis for large repositories
0 commit comments