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 69f7121
Browse filesBrowse the repository at this point in the historyBrowse files
- GitHub Actions for [pull requests](https://github.com/SocketDev/socket-python-cli/blob/main/workflows/github-actions.yml), [pushes](https://github.com/SocketDev/socket-python-cli/blob/main/workflows/github-actions-push.yml), and [ignore commands](https://github.com/SocketDev/socket-python-cli/blob/main/workflows/github-actions-comments.yml)
GitHub Actions `paths` filters only decide whether a workflow starts. They do not
@@ -499,27 +506,75 @@ pipelines:
499
506
500
507
## Scan type by pipeline
501
508
502
-
With `--scm github` or `--scm gitlab`, the detected event decides the scan type:
509
+
With `--scm github` or `--scm gitlab`, the adapter uses the event and PR/MR
510
+
context to select the scan type. A push given a PR/MR number can use the
511
+
comparison path.
503
512
504
513
| Event | Scan | Blocks the build |
505
514
|:------|:-----|:-----------------|
506
-
| Pull request / merge request | Diff scan against the repository's baseline | Yes, on new blocking alerts; also existing blockers with `--strict-blocking` |
507
-
| Any other pipeline, including default-branch pushes | Full scan | No |
515
+
| Supported pull request / merge request events | Diff scan against the repository's baseline when a comparison runs | Yes, on new blocking alerts and on existing blockers with `--strict-blocking` |
516
+
| Push without a PR/MR number, including default-branch pushes | Full scan | No blocking on findings |
508
517
509
-
A full scan has no baseline, so it cannot tell a newly introduced alert from one
510
-
that was already there. Rather than block on a number that would mean something
511
-
different depending on which output format was enabled, those runs behave as if
512
-
`--disable-blocking`was supplied and report through the Dashboard instead. This
513
-
matches how the CLI already treats a run with no supported manifest files.
518
+
With changed-file detection, a PR/MR with no supported manifest change runs a
519
+
full scan by default. Use `--strict-blocking` or `--ignore-commit-files` to
520
+
compare it. Full scans report through the Dashboard. A branch pipeline without
521
+
PR/MR context stays in full-scan mode even with `--enable-diff`,
522
+
`--ignore-commit-files`, or `--strict-blocking`.
514
523
515
-
The event type is authoritative once `--scm` is set: `--enable-diff`and
516
-
`--ignore-commit-files`do not turn a branch pipeline into a comparison. To diff
517
-
a branch build, drop `--scm` and use `--enable-diff` with `--integration`, which
518
-
runs the comparison without the PR comment adapter.
524
+
Without a GitHub or GitLab SCM adapter, `--strict-blocking` runs a comparison
525
+
even when no supported manifest changed. This includes default-branch pushes and
526
+
scans of non-git paths. A Block finding exits `1`. A comparison infrastructure
527
+
error exits `3` by default. Check the [API token scopes for comparison runs](troubleshooting.md#api-token-permissions)
528
+
when upgrading a pipeline that previously ran only full scans.
519
529
520
530
`--generate-license`and `--legal-format fossa` work on both paths; a full scan
521
531
fetches the package list for them.
522
532
533
+
### Skipped events
534
+
535
+
With `--scm github`, `pull_request` runs scan on the `opened`, `synchronize`,
536
+
`reopened`and `ready_for_review` actions. Other actions (`closed`, `labeled`,
537
+
`edited`, and others) and unsupported events log a warning and exit `0` without
538
+
scanning. `issue_comment` handles ignore commands. With `--scm gitlab`, the
539
+
recognized scan sources are `web`, `merge_request_event`, `push`, `api`, and
540
+
`pipeline`. Other sources, apart from the comment flow, also warn and exit `0`
541
+
without scanning.
542
+
543
+
- A GitHub merge queue evaluates required checks on the `merge_group` commit.
544
+
The CLI skips that event. Use a check that scans the merge group for
- GitHub Actions for [pull requests](../workflows/github-actions.yml), [pushes](../workflows/github-actions-push.yml), and [ignore commands](../workflows/github-actions-comments.yml)
0 commit comments