cycode 1.11.1.dev5__tar.gz → 1.11.1.dev8__tar.gz
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-1.11.1.dev8/LICENCE +21 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/PKG-INFO +34 -8
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/README.md +32 -6
- cycode-1.11.1.dev8/cycode/__init__.py +1 -0
- cycode-1.11.1.dev8/cycode/cli/files_collector/sca/go/restore_go_dependencies.py +31 -0
- cycode-1.11.1.dev8/cycode/cli/utils/__init__.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/pyproject.toml +1 -1
- cycode-1.11.1.dev5/cycode/__init__.py +0 -1
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/__init__.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/__init__.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/auth/__init__.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/auth/auth_command.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/auth/auth_manager.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/configure/__init__.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/configure/configure_command.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/ignore/__init__.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/ignore/ignore_command.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/main_cli.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/report/__init__.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/report/report_command.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/report/sbom/__init__.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/report/sbom/common.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/report/sbom/path/__init__.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/report/sbom/path/path_command.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/report/sbom/repository_url/__init__.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/report/sbom/repository_url/repository_url_command.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/report/sbom/sbom_command.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/report/sbom/sbom_report_file.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/scan/__init__.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/scan/code_scanner.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/scan/commit_history/__init__.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/scan/commit_history/commit_history_command.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/scan/path/__init__.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/scan/path/path_command.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/scan/pre_commit/__init__.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/scan/pre_commit/pre_commit_command.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/scan/pre_receive/__init__.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/scan/pre_receive/pre_receive_command.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/scan/repository/__init__.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/scan/repository/repository_command.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/scan/scan_ci/__init__.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/scan/scan_ci/ci_integrations.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/scan/scan_ci/scan_ci_command.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/scan/scan_command.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/version/__init__.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/version/version_command.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/config.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/config.yaml +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/consts.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/exceptions/__init__.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/exceptions/custom_exceptions.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/exceptions/handle_report_sbom_errors.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/exceptions/handle_scan_errors.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/files_collector/__init__.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/files_collector/excluder.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/files_collector/iac/__init__.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/files_collector/iac/tf_content_generator.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/files_collector/models/__init__.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/files_collector/models/in_memory_zip.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/files_collector/path_documents.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/files_collector/repository_documents.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/files_collector/sca/__init__.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/files_collector/sca/base_restore_dependencies.py +0 -0
- {cycode-1.11.1.dev5/cycode/cli/files_collector/sca/maven → cycode-1.11.1.dev8/cycode/cli/files_collector/sca/go}/__init__.py +0 -0
- {cycode-1.11.1.dev5/cycode/cli/files_collector/sca/npm → cycode-1.11.1.dev8/cycode/cli/files_collector/sca/maven}/__init__.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/files_collector/sca/maven/restore_gradle_dependencies.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/files_collector/sca/maven/restore_maven_dependencies.py +0 -0
- {cycode-1.11.1.dev5/cycode/cli/files_collector/sca/nuget → cycode-1.11.1.dev8/cycode/cli/files_collector/sca/npm}/__init__.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/files_collector/sca/npm/restore_npm_dependencies.py +0 -0
- {cycode-1.11.1.dev5/cycode/cli/printers/tables → cycode-1.11.1.dev8/cycode/cli/files_collector/sca/nuget}/__init__.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/files_collector/sca/nuget/restore_nuget_dependencies.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/files_collector/sca/sca_code_scanner.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/files_collector/zip_documents.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/main.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/models.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/printers/__init__.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/printers/console_printer.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/printers/json_printer.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/printers/printer_base.py +0 -0
- {cycode-1.11.1.dev5/cycode/cli/user_settings → cycode-1.11.1.dev8/cycode/cli/printers/tables}/__init__.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/printers/tables/sca_table_printer.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/printers/tables/table.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/printers/tables/table_models.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/printers/tables/table_printer.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/printers/tables/table_printer_base.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/printers/text_printer.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/sentry.py +0 -0
- {cycode-1.11.1.dev5/cycode/cli/utils → cycode-1.11.1.dev8/cycode/cli/user_settings}/__init__.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/user_settings/base_file_manager.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/user_settings/config_file_manager.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/user_settings/configuration_manager.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/user_settings/credentials_manager.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/user_settings/jwt_creator.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/utils/enum_utils.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/utils/get_api_client.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/utils/git_proxy.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/utils/jwt_utils.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/utils/path_utils.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/utils/progress_bar.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/utils/scan_batch.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/utils/scan_utils.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/utils/shell_executor.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/utils/string_utils.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/utils/task_timer.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/utils/yaml_utils.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cyclient/__init__.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cyclient/auth_client.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cyclient/client_creator.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cyclient/config.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cyclient/config.yaml +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cyclient/config_dev.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cyclient/cycode_client.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cyclient/cycode_client_base.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cyclient/cycode_dev_based_client.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cyclient/cycode_token_based_client.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cyclient/headers.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cyclient/models.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cyclient/report_client.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cyclient/scan_client.py +0 -0
- {cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cyclient/scan_config_base.py +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 Cycode Ltd.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: cycode
|
|
3
|
-
Version: 1.11.1.
|
|
3
|
+
Version: 1.11.1.dev8
|
|
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
|
|
@@ -19,8 +19,8 @@ Classifier: Programming Language :: Python :: 3.8
|
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.9
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.10
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
-
Classifier: Programming Language :: Python :: 3 :: Only
|
|
23
22
|
Classifier: Programming Language :: Python :: 3.12
|
|
23
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
24
24
|
Classifier: Programming Language :: Python :: 3.13
|
|
25
25
|
Requires-Dist: arrow (>=1.0.0,<1.4.0)
|
|
26
26
|
Requires-Dist: binaryornot (>=0.4.4,<0.5.0)
|
|
@@ -239,33 +239,59 @@ export CYCODE_CLIENT_SECRET={your Cycode Secret Key}
|
|
|
239
239
|
|
|
240
240
|
Cycode’s pre-commit hook can be set up within your local repository so that the Cycode CLI application will identify any issues with your code automatically before you commit it to your codebase.
|
|
241
241
|
|
|
242
|
+
> [!NOTE]
|
|
243
|
+
> pre-commit hook is only available to Secrets and SCA scans.
|
|
244
|
+
|
|
242
245
|
Perform the following steps to install the pre-commit hook:
|
|
243
246
|
|
|
244
|
-
1. Install the pre-commit framework:
|
|
247
|
+
1. Install the pre-commit framework (Python 3.8 or higher must be installed):
|
|
245
248
|
|
|
246
249
|
`pip3 install pre-commit`
|
|
247
250
|
|
|
248
|
-
2. Navigate to the top directory of the local repository you wish to
|
|
251
|
+
2. Navigate to the top directory of the local Git repository you wish to configure.
|
|
249
252
|
|
|
250
253
|
3. Create a new YAML file named `.pre-commit-config.yaml` (include the beginning `.`) in the repository’s top directory that contains the following:
|
|
251
254
|
|
|
252
255
|
```yaml
|
|
253
256
|
repos:
|
|
254
257
|
- repo: https://github.com/cycodehq/cycode-cli
|
|
255
|
-
rev: v1.
|
|
258
|
+
rev: v1.11.0
|
|
259
|
+
hooks:
|
|
260
|
+
- id: cycode
|
|
261
|
+
stages:
|
|
262
|
+
- commit
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
4. Modify the created file for your specific needs. Use hook ID `cycode` to enable scan for Secrets. Use hook ID `cycode-sca` to enable SCA scan. If you want to enable both, use this configuration:
|
|
266
|
+
|
|
267
|
+
```yaml
|
|
268
|
+
repos:
|
|
269
|
+
- repo: https://github.com/cycodehq/cycode-cli
|
|
270
|
+
rev: v1.11.0
|
|
256
271
|
hooks:
|
|
257
272
|
- id: cycode
|
|
258
273
|
stages:
|
|
259
274
|
- commit
|
|
275
|
+
- id: cycode-sca
|
|
276
|
+
stages:
|
|
277
|
+
- commit
|
|
260
278
|
```
|
|
261
279
|
|
|
262
|
-
|
|
280
|
+
5. Install Cycode’s hook:
|
|
263
281
|
|
|
264
282
|
`pre-commit install`
|
|
265
283
|
|
|
284
|
+
A successful hook installation will result in the message: `Pre-commit installed at .git/hooks/pre-commit`.
|
|
285
|
+
|
|
286
|
+
6. Keep the pre-commit hook up to date:
|
|
287
|
+
|
|
288
|
+
`pre-commit autoupdate`
|
|
289
|
+
|
|
290
|
+
It will automatically bump "rev" in ".pre-commit-config.yaml" to the latest available version of Cycode CLI.
|
|
291
|
+
|
|
266
292
|
> [!NOTE]
|
|
267
|
-
>
|
|
268
|
-
|
|
293
|
+
> Trigger happens on `git commit` command.
|
|
294
|
+
> Hook triggers only on the files that are staged for commit.
|
|
269
295
|
|
|
270
296
|
# Cycode CLI Commands
|
|
271
297
|
|
|
@@ -199,33 +199,59 @@ export CYCODE_CLIENT_SECRET={your Cycode Secret Key}
|
|
|
199
199
|
|
|
200
200
|
Cycode’s pre-commit hook can be set up within your local repository so that the Cycode CLI application will identify any issues with your code automatically before you commit it to your codebase.
|
|
201
201
|
|
|
202
|
+
> [!NOTE]
|
|
203
|
+
> pre-commit hook is only available to Secrets and SCA scans.
|
|
204
|
+
|
|
202
205
|
Perform the following steps to install the pre-commit hook:
|
|
203
206
|
|
|
204
|
-
1. Install the pre-commit framework:
|
|
207
|
+
1. Install the pre-commit framework (Python 3.8 or higher must be installed):
|
|
205
208
|
|
|
206
209
|
`pip3 install pre-commit`
|
|
207
210
|
|
|
208
|
-
2. Navigate to the top directory of the local repository you wish to
|
|
211
|
+
2. Navigate to the top directory of the local Git repository you wish to configure.
|
|
209
212
|
|
|
210
213
|
3. Create a new YAML file named `.pre-commit-config.yaml` (include the beginning `.`) in the repository’s top directory that contains the following:
|
|
211
214
|
|
|
212
215
|
```yaml
|
|
213
216
|
repos:
|
|
214
217
|
- repo: https://github.com/cycodehq/cycode-cli
|
|
215
|
-
rev: v1.
|
|
218
|
+
rev: v1.11.0
|
|
219
|
+
hooks:
|
|
220
|
+
- id: cycode
|
|
221
|
+
stages:
|
|
222
|
+
- commit
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
4. Modify the created file for your specific needs. Use hook ID `cycode` to enable scan for Secrets. Use hook ID `cycode-sca` to enable SCA scan. If you want to enable both, use this configuration:
|
|
226
|
+
|
|
227
|
+
```yaml
|
|
228
|
+
repos:
|
|
229
|
+
- repo: https://github.com/cycodehq/cycode-cli
|
|
230
|
+
rev: v1.11.0
|
|
216
231
|
hooks:
|
|
217
232
|
- id: cycode
|
|
218
233
|
stages:
|
|
219
234
|
- commit
|
|
235
|
+
- id: cycode-sca
|
|
236
|
+
stages:
|
|
237
|
+
- commit
|
|
220
238
|
```
|
|
221
239
|
|
|
222
|
-
|
|
240
|
+
5. Install Cycode’s hook:
|
|
223
241
|
|
|
224
242
|
`pre-commit install`
|
|
225
243
|
|
|
244
|
+
A successful hook installation will result in the message: `Pre-commit installed at .git/hooks/pre-commit`.
|
|
245
|
+
|
|
246
|
+
6. Keep the pre-commit hook up to date:
|
|
247
|
+
|
|
248
|
+
`pre-commit autoupdate`
|
|
249
|
+
|
|
250
|
+
It will automatically bump "rev" in ".pre-commit-config.yaml" to the latest available version of Cycode CLI.
|
|
251
|
+
|
|
226
252
|
> [!NOTE]
|
|
227
|
-
>
|
|
228
|
-
|
|
253
|
+
> Trigger happens on `git commit` command.
|
|
254
|
+
> Hook triggers only on the files that are staged for commit.
|
|
229
255
|
|
|
230
256
|
# Cycode CLI Commands
|
|
231
257
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '1.11.1.dev8' # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import os
|
|
2
|
+
from typing import List
|
|
3
|
+
|
|
4
|
+
import click
|
|
5
|
+
|
|
6
|
+
from cycode.cli.files_collector.sca.base_restore_dependencies import BaseRestoreDependencies
|
|
7
|
+
from cycode.cli.models import Document
|
|
8
|
+
|
|
9
|
+
GO_PROJECT_FILE_EXTENSIONS = ['.mod']
|
|
10
|
+
GO_RESTORE_FILE_NAME = 'go.sum'
|
|
11
|
+
BUILD_GO_FILE_NAME = 'go.mod'
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class RestoreGoDependencies(BaseRestoreDependencies):
|
|
15
|
+
def __init__(self, context: click.Context, is_git_diff: bool, command_timeout: int) -> None:
|
|
16
|
+
super().__init__(context, is_git_diff, command_timeout, create_output_file_manually=True)
|
|
17
|
+
|
|
18
|
+
def is_project(self, document: Document) -> bool:
|
|
19
|
+
return any(document.path.endswith(ext) for ext in GO_PROJECT_FILE_EXTENSIONS)
|
|
20
|
+
|
|
21
|
+
def get_command(self, manifest_file_path: str) -> List[str]:
|
|
22
|
+
return ['cd', self.prepare_tree_file_path_for_command(manifest_file_path), '&&', 'go', 'list', '-m', '-json']
|
|
23
|
+
|
|
24
|
+
def get_lock_file_name(self) -> str:
|
|
25
|
+
return GO_RESTORE_FILE_NAME
|
|
26
|
+
|
|
27
|
+
def verify_restore_file_already_exist(self, restore_file_path: str) -> bool:
|
|
28
|
+
return os.path.isfile(restore_file_path)
|
|
29
|
+
|
|
30
|
+
def prepare_tree_file_path_for_command(self, manifest_file_path: str) -> str:
|
|
31
|
+
return manifest_file_path.replace(os.sep + BUILD_GO_FILE_NAME, '')
|
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "cycode"
|
|
3
|
-
version = "1.11.1.
|
|
3
|
+
version = "1.11.1.dev8" # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag
|
|
4
4
|
description = "Boost security in your dev lifecycle via SAST, SCA, Secrets & IaC scanning."
|
|
5
5
|
keywords=["secret-scan", "cycode", "devops", "token", "secret", "security", "cycode", "code"]
|
|
6
6
|
authors = ["Cycode <support@cycode.com>"]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = '1.11.1.dev5' # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/configure/configure_command.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/report/sbom/path/path_command.py
RENAMED
|
File without changes
|
{cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/report/sbom/repository_url/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/report/sbom/sbom_report_file.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/scan/commit_history/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/scan/pre_commit/pre_commit_command.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/scan/repository/repository_command.py
RENAMED
|
File without changes
|
|
File without changes
|
{cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/scan/scan_ci/ci_integrations.py
RENAMED
|
File without changes
|
{cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/commands/scan/scan_ci/scan_ci_command.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/exceptions/handle_report_sbom_errors.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/files_collector/iac/tf_content_generator.py
RENAMED
|
File without changes
|
|
File without changes
|
{cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/files_collector/models/in_memory_zip.py
RENAMED
|
File without changes
|
|
File without changes
|
{cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/files_collector/repository_documents.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cycode-1.11.1.dev5 → cycode-1.11.1.dev8}/cycode/cli/files_collector/sca/sca_code_scanner.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cycode-1.11.1.dev5/cycode/cli/utils → cycode-1.11.1.dev8/cycode/cli/user_settings}/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|