Skip to content

Commit 441310f

Browse files
authored
edit CLI reference (#2190)
1 parent de41d5a commit 441310f

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

docs/cli-reference.md.template

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,20 @@ Command output:
3939

4040
<CLIHelpOutput />
4141

42-
## `semgrep scan` and `semgrep ci` command options
42+
## `semgrep ci` and `semgrep scan` command options
4343

44-
To list all available `semgrep scan` or `semgrep ci` options, run one of the following commands:
44+
You can invoke Semgrep using the CLI with either `semgrep ci` or `semgrep scan`.
45+
46+
<details>
47+
<summary>Differences between `semgrep ci` and `semgrep scan`</summary>
48+
49+
The `semgrep scan` command is primarily used for local scans and is suitable if you want to scan your codebase for security issues without requiring a Semgrep account. You can run scans using specific rules or rulesets. For example, to use the default ruleset, the command would be `semgrep scan --config "p/default"`. By default, these scans don't return failing error codes on findings for further handling.
50+
51+
The `semgrep ci` command is primarily used in CI pipelines for both full scans of codebases, as well as diff-aware scans that are initiated in the context of a pull request or a merge request. With `semgrep ci`, Semgrep uses the policies and rules defined by your organization. It also uses cross-file (interfile) and cross-function (intrafile) analysis for improved results. By default, these scans return failing error codes on findings for further handling.
52+
53+
</details>
54+
55+
You can list all available `semgrep ci` or `semgrep scan` options by running `semgrep ci --help` or `semgrep scan --help`, respectively. The available options are also listed below; **select the tab that best fits the command that you're using.**
4556

4657
<Tabs>
4758
<TabItem value="semgrep scan --help" label="semgrep scan --help">

0 commit comments

Comments
 (0)