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
+76-26Lines changed: 76 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ This guide walks you through both installation and usage.
35
35
3.[Path Scan](#path-scan)
36
36
1.[Terraform Plan Scan](#terraform-plan-scan)
37
37
4.[Commit History Scan](#commit-history-scan)
38
-
1.[Commit Range Option](#commit-range-option)
38
+
1.[Commit Range Option (Diff Scanning)](#commit-range-option-diff-scanning)
39
39
5.[Pre-Commit Scan](#pre-commit-scan)
40
40
2.[Scan Results](#scan-results)
41
41
1.[Show/Hide Secrets](#showhide-secrets)
@@ -538,25 +538,26 @@ This information can be helpful when:
538
538
539
539
The Cycode CLI application offers several types of scans so that you can choose the option that best fits your case. The following are the current options and commands available:
| `-t, --scan-type [secret\|iac\|sca\|sast]` | Specify the scan you wish to execute (`secret`/`iac`/`sca`/`sast`), the default is `secret`. |
544
+
| `--show-secret BOOLEAN` | Show secrets in plain text. See [Show/Hide Secrets](#showhide-secrets) section for more details. |
545
+
| `--soft-fail BOOLEAN` | Run scan without failing, always return a non-error status code. See [Soft Fail](#soft-fail) section for more details. |
546
+
| `--severity-threshold [INFO\|LOW\|MEDIUM\|HIGH\|CRITICAL]` | Show only violations at the specified level or higher. |
547
+
| `--sca-scan` | Specify the SCA scan you wish to execute (`package-vulnerabilities`/`license-compliance`). The default is both. |
548
+
| `--monitor` | When specified, the scan results will be recorded in Cycode. |
549
+
| `--cycode-report` | Display a link to the scan report in the Cycode platform in the console output. |
550
+
| `--no-restore` | When specified, Cycode will not run the restore command. This will scan direct dependencies ONLY! |
551
+
| `--gradle-all-sub-projects` | Run gradle restore command for all sub projects. This should be run from |
552
+
| `--maven-settings-file` | For Maven only, allows using a custom [settings.xml](https://maven.apache.org/settings.html) file when scanning for dependencies |
| [commit-history](#commit-history-scan) | Scan commit history or perform diff scanning between specific commits |
558
+
| [path](#path-scan) | Scan the files in the path supplied in the command |
559
+
| [pre-commit](#pre-commit-scan) | Use this command to scan the content that was not committed yet |
560
+
| [repository](#repository-scan) | Scan git repository including its history |
560
561
561
562
### Options
562
563
@@ -700,9 +701,16 @@ If you just have a configuration file, you can generate a plan by doing the foll
700
701
### Commit History Scan
701
702
702
703
> [!NOTE]
703
-
> Secrets scanning analyzes all commits in the repository history because secrets introduced and later removed can still be leaked or exposed. SCA and SAST scanning focus only on the latest code state and the changes between branches or pull requests. Full commit history scanning is not performed for SCA and SAST.
704
+
> Commit History Scan is not available for IaC scans.
704
705
705
-
A commit history scan is limited to a local repository’s previous commits, focused on finding any secrets within the commit history, instead of examining the repository’s current state.
706
+
The commit history scan command provides two main capabilities:
707
+
708
+
1. **Full History Scanning**: Analyze all commits in the repository history
709
+
2. **Diff Scanning**: Scan only the changes between specific commits
710
+
711
+
Secrets scanning can analyze all commits in the repository history because secrets introduced and later removed can still be leaked or exposed. For SCA and SAST scans, the commit history command focuses on scanning the differences/changes between commits, making it perfect for pull request reviews and incremental scanning.
712
+
713
+
A commit history scan examines your Git repository's commit history and can be used both for comprehensive historical analysis and targeted diff scanning of specific changes.
706
714
707
715
To execute a commit history scan, execute the following:
708
716
@@ -718,13 +726,55 @@ The following options are available for use with this command:
The commit history scan, by default, examines the repository’s entire commit history, all the way back to the initial commit. You can instead limit the scan to a specific commit range by adding the argument `--commit-range` (`-r`) followed by the name you specify.
761
+
**Scan changes in your feature branch compared to main:**
> For CI/CD pipelines, you can use environment variables like `${{ github.event.pull_request.base.sha }}..${{ github.sha }}` (GitHub Actions) or `$CI_MERGE_REQUEST_TARGET_BRANCH_SHA..$CI_COMMIT_SHA` (GitLab CI) to scan only PR/MR changes.
0 commit comments