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
+17-7Lines changed: 17 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -94,18 +94,27 @@ This will:
94
94
- Save to `gl-dependency-scanning-report.json`
95
95
- Include all actionable security alerts (error/warn level)
96
96
97
+
**Save SARIF report to file (e.g. for GitHub Code Scanning, SonarQube, or VS Code):**
98
+
```bash
99
+
socketcli --sarif-file results.sarif \
100
+
--repo owner/repo \
101
+
--target-path .
102
+
```
103
+
97
104
**Multiple output formats:**
98
105
```bash
99
106
socketcli --enable-json \
100
-
--enable-sarif \
107
+
--sarif-file results.sarif \
101
108
--enable-gitlab-security \
102
109
--repo owner/repo
103
110
```
104
111
105
112
This will simultaneously generate:
106
113
- JSON output to console
107
-
- SARIF format to console
108
-
- GitLab Security Dashboard report to file
114
+
- SARIF report to `results.sarif` (and stdout)
115
+
- GitLab Security Dashboard report to `gl-dependency-scanning-report.json`
116
+
117
+
> **Note:**`--enable-sarif` prints SARIF to stdout only. Use `--sarif-file <path>` to save to a file (this also implies `--enable-sarif`). These are independent from `--enable-gitlab-security`, which produces a separate GitLab-specific Dependency Scanning report.
| --enable-json | False | False | Output in JSON format |
192
-
| --enable-sarif | False | False | Enable SARIF output of results instead of table or JSON format |
201
+
| --enable-sarif | False | False | Enable SARIF output of results instead of table or JSON format (prints to stdout) |
202
+
| --sarif-file | False | | Output file path for SARIF report (implies --enable-sarif). Use this to save SARIF output to a file for upload to GitHub Code Scanning, SonarQube, VS Code, or other SARIF-compatible tools |
0 commit comments