这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/checkov.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,5 @@ skip-path:
- /checkov/cdk/checks/python/GlueDataCatalogEncryption.yaml
- /checkov/cdk/checks/python/GlueDataCatalogEncryption.yaml
- /checkov/cdk/checks/python/GlueDataCatalogEncryption.yaml
- tests/terraform/runner/resources/plan_with_providers
summary-position: bottom
1 change: 0 additions & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ pyston-autoload = {version = "==2.3.5", markers="python_version < '3.11' and (sy
pyston = {version = "==2.3.5", markers="python_version < '3.11' and (sys_platform == 'linux' or sys_platform == 'darwin') and platform_machine == 'x86_64' and implementation_name == 'cpython'", index="pypi"}
requests = ">=2.28.0,<3.0.0"
yarl = ">=1.9.1,<2.0.0"
openai = "<1.0.0" # it comes with a couple of changes a different dependencies, needs separate testing
spdx-tools = ">=0.8.0,<0.9.0"
license-expression = ">=30.1.0,<31.0.0"
rustworkx = ">=0.13.0,<1.0.0"
Expand Down
4,201 changes: 2,076 additions & 2,125 deletions Pipfile.lock

Large diffs are not rendered by default.

151 changes: 0 additions & 151 deletions checkov/common/output/ai.py

This file was deleted.

4 changes: 0 additions & 4 deletions checkov/common/output/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
from checkov.common.bridgecrew.severities import BcSeverities, Severity
from checkov.common.bridgecrew.check_type import CheckType
from checkov.common.models.enums import CheckResult, ErrorStatus
from checkov.common.output.ai import OpenAi
from checkov.common.typing import _ExitCodeThresholds, _ScaExitCodeThresholds
from checkov.common.output.record import Record, SCA_PACKAGE_SCAN_CHECK_NAME
from checkov.common.sast.consts import POLICIES_ERRORS, POLICIES_ERRORS_COUNT, SOURCE_FILES_COUNT, POLICY_COUNT
Expand Down Expand Up @@ -288,7 +287,6 @@ def print_console(
baseline: Baseline | None = None,
use_bc_ids: bool = False,
summary_position: str = 'top',
openai_api_key: str | None = None,
) -> str:
summary = self.get_summary()
output_data = colored(f"{self.check_type} scan results:\n", "blue")
Expand Down Expand Up @@ -327,8 +325,6 @@ def print_console(
if not is_quiet:
for record in self.passed_checks:
output_data += record.to_string(compact=is_compact, use_bc_ids=use_bc_ids)
if self.failed_checks:
OpenAi(api_key=openai_api_key).enhance_records(runner_type=self.check_type, records=self.failed_checks)
for record in self.failed_checks:
output_data += record.to_string(compact=is_compact, use_bc_ids=use_bc_ids)
if not is_quiet:
Expand Down
1 change: 0 additions & 1 deletion checkov/common/runners/runner_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,6 @@ def print_reports(
baseline=baseline,
use_bc_ids=config.output_bc_ids,
summary_position=config.summary_position,
openai_api_key=config.openai_api_key,
)

self._print_to_console(
Expand Down
3 changes: 0 additions & 3 deletions checkov/common/util/env_vars_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ def __init__(self) -> None:
self.MAX_FILE_SIZE = force_int(os.getenv("CHECKOV_MAX_FILE_SIZE", 5_000_000)) # 5 MB is default limit
self.MAX_IAC_FILE_SIZE = force_int(os.getenv("CHECKOV_MAX_IAC_FILE_SIZE", 50_000_000)) # 50 MB is default limit
self.NO_OUTPUT = convert_str_to_bool(os.getenv("CHECKOV_NO_OUTPUT", False))
self.OPENAI_MAX_FINDINGS = force_int(os.getenv("CKV_OPENAI_MAX_FINDINGS", 5))
self.OPENAI_MAX_TOKENS = force_int(os.getenv("CKV_OPENAI_MAX_TOKENS", 512))
self.OPENAI_MODEL = os.getenv("CKV_OPENAI_MODEL", "gpt-3.5-turbo")
self.OUTPUT_CODE_LINE_LIMIT = force_int(os.getenv("CHECKOV_OUTPUT_CODE_LINE_LIMIT", 50))
self.PARSE_ERROR_FAIL = convert_str_to_bool(os.getenv("CKV_PARSE_ERROR_FAIL", False))
self.RENDER_ASYNC_MAX_WORKERS = force_int(os.getenv("RENDER_ASYNC_MAX_WORKERS", 50))
Expand Down
8 changes: 0 additions & 8 deletions checkov/common/util/ext_argument_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,14 +551,6 @@ def add_parser_args(self) -> None:
default='12h',
help="maximum time to stop the scan "
)
self.add(
"--openai-api-key",
env_var="CKV_OPENAI_API_KEY",
sanitize=True,
help="Add an OpenAI API key to enhance finding guidelines by sending violated policies and "
"resource code to OpenAI to request remediation guidance. This will use your OpenAI credits. "
"Set your number of findings that will receive enhanced guidelines using CKV_OPENAI_MAX_FINDINGS",
)
self.add(
"--custom-tool-name",
default="Checkov",
Expand Down
1 change: 0 additions & 1 deletion docs/2.Basics/CLI Command Reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ nav_order: 2
| `--scan-secrets-history` | Enable secret scan history of commits |
| `--block-list-secret-scan CKV_SECRETS_SCAN_BLOCK_LIST` | List of files to filter out in the secret scanner |
| `--support` | Enable debug logs and upload the logs to the server. Requires a Prisma Cloud API key. |
| `--openai-api-key` | Add an OpenAI API key to enhance finding guidelines by sending violated policies and resource code to OpenAI to request remediation guidance. This will use your OpenAI credits. Set your number of findings that will receive enhanced guidelines using CKV_OPENAI_MAX_FINDINGS |
| `--custom-tool-name` | Add a custom tool name to change the tool name field, this is especially useful for outputting results in SARIF format for upload to Github Code Scanning |

### Environment variables
Expand Down
Loading
Loading