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
{{ message }}
Repository navigation
Commit f8c17a7
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/ci-cd.md
+11-9Lines changed: 11 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -499,18 +499,20 @@ pipelines:
499
499
500
500
## Scan type by pipeline
501
501
502
-
With `--scm github` or `--scm gitlab`, the detected event controls which
503
-
pipelines can run a comparison. The table assumes changed-file detection:
502
+
With `--scm github` or `--scm gitlab`, the adapter uses the event and PR/MR
503
+
context to select the scan type. A push given a PR/MR number can use the
504
+
comparison path.
504
505
505
506
| Event | Scan | Blocks the build |
506
507
|:------|:-----|:-----------------|
507
-
| Pull request / merge request with a supported manifest change | Comparison | New Block findings, plus existing Block findings with `--strict-blocking` |
508
-
| Pull request / merge request with no supported manifest change | Full scan by default. Comparison with `--strict-blocking` or `--ignore-commit-files` | In a comparison, new Block findings, plus existing Block findings with `--strict-blocking` |
509
-
| Branch pipeline, including a default-branch push | Full scan | No |
510
-
511
-
Full scans report through the Dashboard. The SCM adapter keeps branch pipelines
512
-
in full-scan mode even with `--enable-diff`, `--ignore-commit-files`, or
513
-
`--strict-blocking`.
508
+
| Pull request / merge request | Diff scan against the repository's baseline | Yes, on new blocking alerts; also existing blockers with `--strict-blocking` |
509
+
| Any other pipeline, including default-branch pushes | Full scan | No |
510
+
511
+
With changed-file detection, a PR/MR with no supported manifest change runs a
512
+
full scan by default. Use `--strict-blocking` or `--ignore-commit-files` to
513
+
compare it. Full scans report through the Dashboard. A branch pipeline without
514
+
PR/MR context stays in full-scan mode even with `--enable-diff`,
515
+
`--ignore-commit-files`, or `--strict-blocking`.
514
516
515
517
Without a GitHub or GitLab SCM adapter, `--strict-blocking` runs a comparison
516
518
even when no supported manifest changed. This includes default-branch pushes and
Copy file name to clipboardExpand all lines: docs/cli-reference.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -660,7 +660,7 @@ Security issues detected by Socket Security:
660
660
661
661
### Important Notes
662
662
663
-
- **Scan scope**. Strict mode compares the configured scan scope even when no supported manifest changed. Scan options such as `--sub-path` and `--reach-use-only-pregenerated-sboms` still control what the CLI submits. GitHub and GitLab branch pipelines using `--scm` perform non-blocking full scans. See [Scan type by pipeline](ci-cd.md#scan-type-by-pipeline).
663
+
- **Scan scope**. Strict mode compares the configured scan scope even when no supported manifest changed. Scan options such as `--sub-path` and `--reach-use-only-pregenerated-sboms` still control what the CLI submits. With `--scm`, GitHub and GitLab branch pipelines without PR/MR context perform non-blocking full scans. See [Scan type by pipeline](ci-cd.md#scan-type-by-pipeline).
664
664
- **With `--reach`**. With no explicit baseline, the CLI looks for a default-branch head scan with reachability enabled. If none exists, the CLI compares against an empty baseline and classifies all findings as new. Scan the default branch with `--reach` too.
665
665
- **Policy actions**. Warn findings are reported. If the same finding has both Warn and Block actions, Block takes precedence.
666
666
- **Existing alerts come from the full scan**. The CLI fetches the current full scan when the comparison leaves out alerts on unchanged packages or when a dependency version changes. A failed fetch or a missing package in that response triggers the infrastructure-error exit code.
@@ -773,7 +773,7 @@ uses the configured scan scope, including any `--sub-path` restrictions.
773
773
### Scanning Modes
774
774
775
775
- **Differential Mode**: When manifest files are detected in changes, performs a diff scan with PR/MR comment integration
776
-
- **Full Scan**: Reports findings to the Dashboard. SCM branch pipelines use this mode.
776
+
- **Full Scan**: Reports findings to the Dashboard. SCM branch pipelines without PR/MR context use this mode.
777
777
- **Force Mode**: With `--ignore-commit-files`, compares regardless of which files changed on pipelines eligible for comparison.
778
778
- **Forced Diff Mode**: With `--enable-diff`, forces differential mode even when using `--integration api` (without SCM integration)
779
779
@@ -782,7 +782,7 @@ uses the configured scan scope, including any `--sub-path` restrictions.
782
782
- **Commit with manifest file**: If your commit includes changes to `package.json`, a differential scan will be triggered automatically with PR comment integration.
783
783
- **Code-only commit**: The CLI runs a full scan by default. `--strict-blocking` selects a comparison on pipelines eligible for comparison.
784
784
- **Using `--files`**: If you specify `--files '["package.json"]'`, the CLI will check if this file exists and is a manifest file before determining scan type.
785
-
- **Using `--ignore-commit-files`**: This runs the comparison regardless of what's in your commit, over all manifest files in the target path. Use it when the changed-file check would otherwise skip a comparison you need.
785
+
- **Using `--ignore-commit-files`**: Compare the configured scan scope regardless of which files changed when the pipeline supports comparison.
786
786
- **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`
787
787
- **Auto-detection**: Most CI/CD scenarios now work with just `socketcli --target-path /path/to/repo --scm github --pr-number $PR_NUM`
0 commit comments