cycode 3.3.1.dev4__py3-none-any.whl → 3.3.1.dev6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cycode/__init__.py +1 -1
- cycode/cli/apps/scan/__init__.py +1 -1
- cycode/cli/files_collector/walk_ignore.py +2 -1
- {cycode-3.3.1.dev4.dist-info → cycode-3.3.1.dev6.dist-info}/METADATA +63 -14
- {cycode-3.3.1.dev4.dist-info → cycode-3.3.1.dev6.dist-info}/RECORD +8 -8
- {cycode-3.3.1.dev4.dist-info → cycode-3.3.1.dev6.dist-info}/LICENCE +0 -0
- {cycode-3.3.1.dev4.dist-info → cycode-3.3.1.dev6.dist-info}/WHEEL +0 -0
- {cycode-3.3.1.dev4.dist-info → cycode-3.3.1.dev6.dist-info}/entry_points.txt +0 -0
cycode/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = '3.3.1.
|
|
1
|
+
__version__ = '3.3.1.dev6' # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag
|
cycode/cli/apps/scan/__init__.py
CHANGED
|
@@ -20,7 +20,7 @@ app.callback(
|
|
|
20
20
|
|
|
21
21
|
app.command(name='path', short_help='Scan the files in the paths provided in the command.')(path_command)
|
|
22
22
|
app.command(name='repository', short_help='Scan the Git repository included files.')(repository_command)
|
|
23
|
-
app.command(name='commit-history', short_help='Scan
|
|
23
|
+
app.command(name='commit-history', short_help='Scan commit history or perform diff scanning between specific commits.')(
|
|
24
24
|
commit_history_command
|
|
25
25
|
)
|
|
26
26
|
app.command(
|
|
@@ -4,8 +4,9 @@ from collections.abc import Generator, Iterable
|
|
|
4
4
|
from cycode.cli.logger import logger
|
|
5
5
|
from cycode.cli.utils.ignore_utils import IgnoreFilterManager
|
|
6
6
|
|
|
7
|
-
_SUPPORTED_IGNORE_PATTERN_FILES = {
|
|
7
|
+
_SUPPORTED_IGNORE_PATTERN_FILES = {
|
|
8
8
|
'.gitignore',
|
|
9
|
+
'.cycodeignore',
|
|
9
10
|
}
|
|
10
11
|
_DEFAULT_GLOBAL_IGNORE_PATTERNS = [
|
|
11
12
|
'.git',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: cycode
|
|
3
|
-
Version: 3.3.1.
|
|
3
|
+
Version: 3.3.1.dev6
|
|
4
4
|
Summary: Boost security in your dev lifecycle via SAST, SCA, Secrets & IaC scanning.
|
|
5
5
|
Home-page: https://github.com/cycodehq/cycode-cli
|
|
6
6
|
License: MIT
|
|
@@ -79,7 +79,7 @@ This guide walks you through both installation and usage.
|
|
|
79
79
|
3. [Path Scan](#path-scan)
|
|
80
80
|
1. [Terraform Plan Scan](#terraform-plan-scan)
|
|
81
81
|
4. [Commit History Scan](#commit-history-scan)
|
|
82
|
-
1. [Commit Range Option](#commit-range-option)
|
|
82
|
+
1. [Commit Range Option (Diff Scanning)](#commit-range-option-diff-scanning)
|
|
83
83
|
5. [Pre-Commit Scan](#pre-commit-scan)
|
|
84
84
|
2. [Scan Results](#scan-results)
|
|
85
85
|
1. [Show/Hide Secrets](#showhide-secrets)
|
|
@@ -596,12 +596,12 @@ The Cycode CLI application offers several types of scans so that you can choose
|
|
|
596
596
|
| `--maven-settings-file` | For Maven only, allows using a custom [settings.xml](https://maven.apache.org/settings.html) file when scanning for dependencies |
|
|
597
597
|
| `--help` | Show options for given command. |
|
|
598
598
|
|
|
599
|
-
| Command | Description
|
|
600
|
-
|
|
601
|
-
| [commit-history](#commit-history-scan) | Scan
|
|
602
|
-
| [path](#path-scan) | Scan the files in the path supplied in the command
|
|
603
|
-
| [pre-commit](#pre-commit-scan) | Use this command to scan the content that was not committed yet
|
|
604
|
-
| [repository](#repository-scan) | Scan git repository including its history
|
|
599
|
+
| Command | Description |
|
|
600
|
+
|----------------------------------------|-----------------------------------------------------------------------|
|
|
601
|
+
| [commit-history](#commit-history-scan) | Scan commit history or perform diff scanning between specific commits |
|
|
602
|
+
| [path](#path-scan) | Scan the files in the path supplied in the command |
|
|
603
|
+
| [pre-commit](#pre-commit-scan) | Use this command to scan the content that was not committed yet |
|
|
604
|
+
| [repository](#repository-scan) | Scan git repository including its history |
|
|
605
605
|
|
|
606
606
|
### Options
|
|
607
607
|
|
|
@@ -745,9 +745,16 @@ If you just have a configuration file, you can generate a plan by doing the foll
|
|
|
745
745
|
### Commit History Scan
|
|
746
746
|
|
|
747
747
|
> [!NOTE]
|
|
748
|
-
>
|
|
748
|
+
> Commit History Scan is not available for IaC scans.
|
|
749
749
|
|
|
750
|
-
|
|
750
|
+
The commit history scan command provides two main capabilities:
|
|
751
|
+
|
|
752
|
+
1. **Full History Scanning**: Analyze all commits in the repository history
|
|
753
|
+
2. **Diff Scanning**: Scan only the changes between specific commits
|
|
754
|
+
|
|
755
|
+
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.
|
|
756
|
+
|
|
757
|
+
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.
|
|
751
758
|
|
|
752
759
|
To execute a commit history scan, execute the following:
|
|
753
760
|
|
|
@@ -763,13 +770,55 @@ The following options are available for use with this command:
|
|
|
763
770
|
|---------------------------|----------------------------------------------------------------------------------------------------------|
|
|
764
771
|
| `-r, --commit-range TEXT` | Scan a commit range in this git repository, by default cycode scans all commit history (example: HEAD~1) |
|
|
765
772
|
|
|
766
|
-
#### Commit Range Option
|
|
773
|
+
#### Commit Range Option (Diff Scanning)
|
|
774
|
+
|
|
775
|
+
The commit range option enables **diff scanning** – scanning only the changes between specific commits instead of the entire repository history.
|
|
776
|
+
This is particularly useful for:
|
|
777
|
+
- **Pull request validation**: Scan only the changes introduced in a PR
|
|
778
|
+
- **Incremental CI/CD scanning**: Focus on recent changes rather than the entire codebase
|
|
779
|
+
- **Feature branch review**: Compare changes against main/master branch
|
|
780
|
+
- **Performance optimization**: Faster scans by limiting scope to relevant changes
|
|
781
|
+
|
|
782
|
+
#### Commit Range Syntax
|
|
783
|
+
|
|
784
|
+
The `--commit-range` (`-r`) option supports standard Git revision syntax:
|
|
785
|
+
|
|
786
|
+
| Syntax | Description | Example |
|
|
787
|
+
|---------------------|-----------------------------------|-------------------------|
|
|
788
|
+
| `commit1..commit2` | Changes from commit1 to commit2 | `abc123..def456` |
|
|
789
|
+
| `commit1...commit2` | Changes in commit2 not in commit1 | `main...feature-branch` |
|
|
790
|
+
| `commit` | Changes from commit to HEAD | `HEAD~1` |
|
|
791
|
+
| `branch1..branch2` | Changes from branch1 to branch2 | `main..feature-branch` |
|
|
792
|
+
|
|
793
|
+
#### Diff Scanning Examples
|
|
794
|
+
|
|
795
|
+
**Scan changes in the last commit:**
|
|
796
|
+
```bash
|
|
797
|
+
cycode scan commit-history -r HEAD~1 ~/home/git/codebase
|
|
798
|
+
```
|
|
799
|
+
|
|
800
|
+
**Scan changes between two specific commits:**
|
|
801
|
+
```bash
|
|
802
|
+
cycode scan commit-history -r abc123..def456 ~/home/git/codebase
|
|
803
|
+
```
|
|
767
804
|
|
|
768
|
-
|
|
805
|
+
**Scan changes in your feature branch compared to main:**
|
|
806
|
+
```bash
|
|
807
|
+
cycode scan commit-history -r main..HEAD ~/home/git/codebase
|
|
808
|
+
```
|
|
769
809
|
|
|
770
|
-
|
|
810
|
+
**Scan changes between main and a feature branch:**
|
|
811
|
+
```bash
|
|
812
|
+
cycode scan commit-history -r main..feature-branch ~/home/git/codebase
|
|
813
|
+
```
|
|
771
814
|
|
|
772
|
-
|
|
815
|
+
**Scan all changes in the last 3 commits:**
|
|
816
|
+
```bash
|
|
817
|
+
cycode scan commit-history -r HEAD~3..HEAD ~/home/git/codebase
|
|
818
|
+
```
|
|
819
|
+
|
|
820
|
+
> [!TIP]
|
|
821
|
+
> 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.
|
|
773
822
|
|
|
774
823
|
### Pre-Commit Scan
|
|
775
824
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
cycode/__init__.py,sha256=
|
|
1
|
+
cycode/__init__.py,sha256=YLnL2XEf8MrO-FCiEmy2elOgf1vuG6aliWOBG1tnSqg,114
|
|
2
2
|
cycode/__main__.py,sha256=Z3bD5yrA7yPvAChcADQrqCaZd0ChGI1gdiwALwbWJ6U,104
|
|
3
3
|
cycode/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
cycode/cli/app.py,sha256=UC5A5TKIvlxOYKERfJykN8apTT0VyMY5pUjRh_LM-dw,6098
|
|
@@ -31,7 +31,7 @@ cycode/cli/apps/report/sbom/repository_url/__init__.py,sha256=47DEQpj8HBSa-_TImW
|
|
|
31
31
|
cycode/cli/apps/report/sbom/repository_url/repository_url_command.py,sha256=VO4jSR748BEpCuOrAvOK4_rNLw63lO4iHCTfWkWdfMQ,2179
|
|
32
32
|
cycode/cli/apps/report/sbom/sbom_command.py,sha256=bykQnmO0CCNInkih6bGmCcq5HFH-ItkFHPoxz683HCc,2229
|
|
33
33
|
cycode/cli/apps/report/sbom/sbom_report_file.py,sha256=uyaJRvmg1K4DvJaMppbCf6yCj6UU-NdvNg-ZVZk0jx4,1576
|
|
34
|
-
cycode/cli/apps/scan/__init__.py,sha256=
|
|
34
|
+
cycode/cli/apps/scan/__init__.py,sha256=yHbx8sLMlE5Sqy0_UQfjDws9FMy0n1RTdG6IsRoN4Cw,1990
|
|
35
35
|
cycode/cli/apps/scan/aggregation_report.py,sha256=8f9kPfO7biNf5OsDZG6UhMPqG6ymoFrX5GBtlEIfFAg,1540
|
|
36
36
|
cycode/cli/apps/scan/code_scanner.py,sha256=lWAcdtdeOmLe9zaXnItlbL-WIgnJ6d4iUeYiprxUJ34,11205
|
|
37
37
|
cycode/cli/apps/scan/commit_history/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -94,7 +94,7 @@ cycode/cli/files_collector/sca/ruby/restore_ruby_dependencies.py,sha256=WS_T9-2C
|
|
|
94
94
|
cycode/cli/files_collector/sca/sbt/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
95
95
|
cycode/cli/files_collector/sca/sbt/restore_sbt_dependencies.py,sha256=6ZFTWkga2bZ_dwCCWeZxDkgBMEOLw4S_YnhIYGBSKbc,617
|
|
96
96
|
cycode/cli/files_collector/sca/sca_file_collector.py,sha256=5M6VzWRDyLcsIJU43flq8RSRrLbkpLGghvXI24CvRzM,7582
|
|
97
|
-
cycode/cli/files_collector/walk_ignore.py,sha256=
|
|
97
|
+
cycode/cli/files_collector/walk_ignore.py,sha256=OKZrGHp8UMpBLXT4J1CxJeXlnOzDUmokL1iLxDUgGuM,1417
|
|
98
98
|
cycode/cli/files_collector/zip_documents.py,sha256=WTNLp4yHY6zeVYkE2QTOO8K93cJEA9I-BmD39sRdo5k,1837
|
|
99
99
|
cycode/cli/logger.py,sha256=mlaYEQGYd582fTCc3SC3cFMj0PKTB6EsaI12Q4VL1z8,65
|
|
100
100
|
cycode/cli/main.py,sha256=QTPqIZsJsNK_vun8---vP2jP4ljlNJ15xidNrQ-Y0Rc,316
|
|
@@ -157,8 +157,8 @@ cycode/cyclient/report_client.py,sha256=h12pz3vWCwDF73BhqFX7iDSxBgQDFwkiGh3hmul2
|
|
|
157
157
|
cycode/cyclient/scan_client.py,sha256=nQJyt34Bne8UAQNj9OHSgvoCfI1EJFKNaEeeGPnrKcg,12471
|
|
158
158
|
cycode/cyclient/scan_config_base.py,sha256=mXsPZGYCtp85rv5GIige40yQZXuRcEKUW-VQJ0vgFzk,1201
|
|
159
159
|
cycode/logger.py,sha256=xAzpkWLZhixO4egRcYn4HXM9lIfx5wHdpkHxNc5jrX8,2225
|
|
160
|
-
cycode-3.3.1.
|
|
161
|
-
cycode-3.3.1.
|
|
162
|
-
cycode-3.3.1.
|
|
163
|
-
cycode-3.3.1.
|
|
164
|
-
cycode-3.3.1.
|
|
160
|
+
cycode-3.3.1.dev6.dist-info/LICENCE,sha256=2Wx4N6mD_4xB7-E3hPkZ3MPhpJy__k_I8MaCSO-PDRo,1068
|
|
161
|
+
cycode-3.3.1.dev6.dist-info/METADATA,sha256=LtRExrjB5luEXzbOs2zbmpAzlWq0uvDTOVDupgXqOE4,71912
|
|
162
|
+
cycode-3.3.1.dev6.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
163
|
+
cycode-3.3.1.dev6.dist-info/entry_points.txt,sha256=iDcVJM8ByLElVgvBgtYxDjw1kT7O8Mo0LcWZIT5L3Ig,45
|
|
164
|
+
cycode-3.3.1.dev6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|