@codacy/tools-checkov-3 0.20.0 → 0.22.0

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.
package/README.md CHANGED
@@ -22,7 +22,7 @@ Infrastructure-as-Code security scanner using the [Checkov](https://www.checkov.
22
22
  | Languages | JSON, YAML, Terraform, Dockerfile |
23
23
  | Binary | `checkov` (Python package) |
24
24
  | File patterns | `**/*.tf`, `**/*.yaml`, `**/*.yml`, `**/*.json`, `**/Dockerfile` |
25
- | Pattern count | ~1,358 |
25
+ | Pattern count | ~1,359 |
26
26
  | Pattern ID format | `Checkov_{check_id}` (e.g. `Checkov_CKV_AWS_41`) |
27
27
 
28
28
  ## Updating patterns
@@ -47,7 +47,7 @@ git add src/patterns.json
47
47
 
48
48
  ```bash
49
49
  # Install checkov locally (requires Python 3.9+)
50
- pip install checkov==3.2.508
50
+ pip install checkov==3.3.8
51
51
 
52
52
  # Build with tsup
53
53
  pnpm build
@@ -68,7 +68,7 @@ pnpm test
68
68
  - **Pattern filtering**: Uses `--check CKV_xxx,CKV_yyy,...` to run only specific checks. The `Checkov_` prefix is stripped from pattern IDs to get the raw check ID.
69
69
  - **Config files**: Looks for `.checkov.yaml` or `.checkov.yml`. When local config is active, passes `--config-file <path>`.
70
70
  - **Parsing errors**: Checkov reports `parsing_errors` in its JSON output, which are surfaced as `AnalysisError` objects with `kind: "ParsingError"`.
71
- - **Preset mappings (`src/pattern-mappings.json`)**: gates 1,278 of the 1,358 patterns on a detected IaC framework, so `init --auto` doesn't enable AWS resource policy in a repo with no infrastructure. Measured effect: a repo with only a `package.json` went from 1,225 enabled Checkov patterns to 80.
71
+ - **Preset mappings (`src/pattern-mappings.json`)**: gates 1,279 of the 1,359 patterns on a detected IaC framework, so `init --auto` doesn't enable AWS resource policy in a repo with no infrastructure. Measured effect: a repo with only a `package.json` went from 1,225 enabled Checkov patterns to 80.
72
72
 
73
73
  The gate is **per IaC framework, not per cloud**, because a cloud resource can be declared several ways — the same bucket is an `aws_s3_bucket` in Terraform, an `AWS::S3::Bucket` in CloudFormation and a `resources:` block under Serverless. `filterAutoPatterns` enables a framework pattern when **any** of its keys was detected, so the same prefix is listed under several keys to mean "AWS resources, however they are declared". That OR is what makes gating safe here; an earlier revision left all ~1,091 cloud-provider checks universal precisely because gating them on `.tf` alone would have dropped every cloud check for a CloudFormation-only repo.
74
74
  - `"lang:Terraform"` maps `CKV_TF_` plus every cloud-provider family (`CKV_AWS_`, `CKV_AZURE_`, `CKV_GCP_`, and the 10 smaller clouds). No file signal is needed: `.tf` **is** the `Terraform` language, so `lang:Terraform` already means "this repo has Terraform".