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
+62-13Lines changed: 62 additions & 13 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)
@@ -552,12 +552,12 @@ The Cycode CLI application offers several types of scans so that you can choose
552
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 |
561
561
562
562
### Options
563
563
@@ -701,9 +701,16 @@ If you just have a configuration file, you can generate a plan by doing the foll
701
701
### Commit History Scan
702
702
703
703
> [!NOTE]
704
-
> 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.
705
705
706
-
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.
707
714
708
715
To execute a commit history scan, execute the following:
709
716
@@ -719,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