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 cc87960
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+23Lines changed: 23 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,6 +74,29 @@ Once you've installed the CLI, you're ready to scan your project. You can scan a
74
74
75
75
When the scan is complete, you will see the total number of vulnerabilities found and a list of automation rules that have been evaluated. Read more about automations [here](https://debricked.com/docs/automation/automation-overview.html#automation-overview).
76
76
77
+
### Exit codes
78
+
| Code | Meaning |
79
+
| ---- | ------- |
80
+
| 0 | The scan completed and no triggered automation rule failed the pipeline |
81
+
| 1 | The scan failed. This covers triggered automation rules configured to fail the pipeline, resolution failures (see below), and errors such as a bad access token or an unreachable service |
82
+
| 3 | The scan completed, but some (not all) dependency files failed to resolve. Only produced by `--resolution-strictness=3`|
83
+
84
+
Failed resolution of dependency files affects the scan and its exit code according to
85
+
`--resolution-strictness` (default `1`):
86
+
87
+
| Level | Meaning |
88
+
| ----- | ------- |
89
+
| 0 | Always continue the scan, even if any or all files failed to resolve |
90
+
| 1 | Exit with code 1 if all files failed to resolve, otherwise continue the scan |
91
+
| 2 | Exit with code 1 if any file failed to resolve, otherwise continue the scan |
92
+
| 3 | Exit with code 1 if all files failed to resolve. If some but not all files failed to resolve, complete the scan and then exit with code 3 |
93
+
94
+
A resolution failure typically means the relevant package manager is not installed or not on the
95
+
`PATH` (for example `mvn` or `composer`).
96
+
97
+
If Debricked's scan queue is long, the CLI stops polling for progress and exits with code 1, having
98
+
printed a link to the results. Pass `--pass-on-timeout` to exit 0 in that case instead.
99
+
77
100
### Docker
78
101
To make a scan directly through Docker based on your current working directory, you can use the following command:
cmd.Flags().BoolVar(&debug, DebugFlag, false, "write all debug output to stderr")
165
-
cmd.Flags().BoolVarP(&passOnDowntime, PassOnTimeOut, "p", false, "pass scan if there is a service access timeout")
169
+
cmd.Flags().BoolVarP(&passOnDowntime, PassOnTimeOut, "p", false, "pass scan if there is a service access timeout, or if the scan is still queued once progress polling gives up")
166
170
cmd.Flags().BoolVar(&noResolve, NoResolveFlag, false, `disables resolution of manifest files that lack lock files. Resolving manifest files enables more accurate dependency scanning since the whole dependency tree will be analysed.
167
171
For example, if there is a "go.mod" in the target path, its dependencies are going to get resolved onto a lock file, and latter scanned.`)
172
+
resolutionStrictnessDoc:=strings.Join(
173
+
[]string{
174
+
"Allows you to configure how failed resolution of manifest files affects the scan and its exit code.\n",
175
+
"Strictness Level | Meaning",
176
+
"---------------- | -------",
177
+
"0 | Always continue the scan, even if any or all files failed to resolve",
178
+
"1 (default) | Exit with code 1 if all files failed to resolve, otherwise continue the scan",
179
+
"2 | Exit with code 1 if any file failed to resolve, otherwise continue the scan",
180
+
"3 | Exit with code 1 if all files failed to resolve. If some but not all files failed to resolve, complete the scan and then exit with code 3",
cmd.Flags().BoolVar(&noFingerprint, NoFingerprintFlag, false, "Toggle fingerprinting for undeclared component identification. Can be run as a standalone command [fingerprint] with more granular options.")
169
185
cmd.Flags().BoolVar(&callgraph, CallGraphFlag, false, `Enables call graph generation during scan.`)
170
186
cmd.Flags().StringVar(&javaCallgraphEngine, JavaCallgraphEngineFlag, "soot", "Java call graph engine to use during scan callgraph generation: soot or sootup.")
0 commit comments