Skip to content

Commit 417d747

Browse files
committed
Add comparison table of alert behaviors between GitLab + JSON/SARIF
Signed-off-by: lelia <2418071+lelia@users.noreply.github.com>
1 parent d68aa6e commit 417d747

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

docs/cli-reference.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -700,6 +700,26 @@ The GitLab report includes **actionable security alerts** based on your Socket p
700700

701701
All alert types are included in the GitLab report if they're marked as `error` or `warn` by your Socket Security policy, ensuring the Security Dashboard shows only actionable findings.
702702
703+
### Alert Population: GitLab vs JSON/SARIF
704+
705+
The GitLab Security Dashboard report and the JSON/SARIF diff outputs use different alert selection strategies, reflecting their distinct purposes:
706+
707+
| Output Format | Default Alerts | With `--strict-blocking` |
708+
|:---|:---|:---|
709+
| `--enable-gitlab-security` | **All** alerts (new + existing) | All alerts (same) |
710+
| `--enable-json` | New alerts only | New + existing alerts |
711+
| `--enable-sarif` (diff scope) | New alerts only | New + existing alerts |
712+
713+
**Why the difference?** GitLab's Security Dashboard is designed to present the full security posture of a project. An empty dashboard on a scan with no dependency changes would be misleading -- the vulnerabilities still exist, they just didn't change. By contrast, JSON and SARIF in diff scope are designed to answer "what changed?" and only include existing alerts when `--strict-blocking` explicitly requests it.
714+
715+
> **Tip:** If you use `--enable-json` alongside `--enable-gitlab-security`, the GitLab report may contain more vulnerabilities than the JSON output. This is expected. To make JSON output match, add `--strict-blocking`.
716+
717+
### Alert Ignoring via PR/MR Comments
718+
719+
When using the CLI with SCM integration (`--scm github` or `--scm gitlab`), users can ignore specific alerts by reacting to Socket's PR/MR comments. Ignored alerts are removed from `--enable-json`, `--enable-sarif`, and console output.
720+
721+
However, the GitLab Security Dashboard report includes **all** alerts matching your security policy (new and existing), regardless of comment-based ignores. This ensures the Security Dashboard always reflects the full set of known issues. To suppress a vulnerability from the GitLab report, adjust the alert's policy in Socket's dashboard rather than ignoring it via a PR comment.
722+
703723
### Report Schema
704724

705725
Socket CLI generates reports compliant with [GitLab Dependency Scanning schema version 15.0.0](https://gitlab.com/gitlab-org/security-products/security-report-schemas/-/blob/v15.0.0/dist/dependency-scanning-report-format.json). The reports include:

0 commit comments

Comments
 (0)