Public report of bridgecrewio/checkov, published 16 November 2026. It has the same score, grades and number of findings as the full report. The details of security findings (where they are in the code, which known vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey → Signed and filed in the standard's public register, 16 November 2026, 23:47 UTC · Survey ID cd_a006f4c367f548b5b9013fcaa668da61

bridgecrewio/checkov

Measured 16 November 2026, 23:46 UTC, at code version e55b089

First survey, so nothing to compare with yet Code coverage: not measuredKnowledge freshness: not measured

Code coverage is not measured: Suite not runnable in-image.

Knowledge freshness is not measured: Freshness signal contradicted by repo activity.

CAI score 57.8out of 100 At risk

The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.

A large codebase: 104,636 lines of product code in 1 project, tests not counted · Estimated rebuild effort: about 1.5 person-years · Weakest lens: Code Health, 51.3

Findings by how serious they are

54 critical 1148 serious 179 minor

4 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.

This survey was produced by

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
16 November 2026, 23:46 UTC

A measurement, not a certificate. The Code Assurance Index records a number together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that implements it, and today the Canine Code Analyzer is the only one that does.

A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.

The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸

63of 63 dimensions measured by tools.
1366of 1381 findings point to an exact file and line, so you can open each one in the code. The other 15 concern the repository as a whole, such as missing documentation.
63dimensions across 6 lenses, read from 104,636 lines of product code in 1 project.
Chapters

Executive summary

bridgecrewio/checkov is rated At risk because critical security findings are open, most of them in the build pipeline. It scores 57.8 out of 100, which the At risk rating leaves unchanged.

Code Health, at 51.3, is the weakest lens and counts most in the score. The best first step for the work it takes is fixing the six pieces of code switched off by turning them into comments, worth about 3.8 points. Fixing the 35 comments that repeat the code, or contradict it comes next, worth about 5.9 points. Raising Code Health to 70 would lift the score to about 62.1.

Seventeen pipeline steps install packages that can change without warning. Eight known security holes in the packages the code depends on can be used by attackers. Pinning what the pipeline installs and updating the vulnerable packages would close both risks. Pinning each tool to an exact version would fix the eight pipeline tools referenced by a changeable name, and limiting each secret to its own step would deal with the five secrets exposed to more of the pipeline than needed. The 12 uses of packages that aren't listed need adding to the project's list of dependencies.

The product code is 104,636 lines, about €210,000 to rebuild.

A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.

How the score is built: what each lens counts for The lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Code Health 51.3 · counts for 46%Maturity 52.6 · counts for 25%Production Readiness 64.1 · counts for 14%Security and Compliance 69.1 · counts for 8%Architecture 95.3 · counts for 4%Performance 100.0 · counts for 2%

If Code Health rose from 51.3 to 70, the lowest score rated Strong, the score would rise from 57.8 to about 62.1.

Code composition: what the lines of code are
Product code 51%Tests 49%
Rebuild cost: about €210,000 · Estimate
Cost to rebuild€71,000 to €360,000, for 1,189 to 3,772 hours of work, about 1.5 person-years for 1 to 3 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.8 at a score of 58. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeLarge: 104,636 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.

Top priorities

The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.

1
Resolve the 6 CommentedOutCode finding(s) in Explicit Debt — start with slsa-gen.yaml (2), main.yaml, ALBListenerHTTPS-FAILED-HTTP.yaml.
Raises the score by about 3.8 points · Low effort · Explicit Debt
2
Resolve the 35 redundant comment finding(s) in Comment Value — start with pass.ts (17), fail__2__.ts (6), fail.ts (4).
Raises the score by about 5.9 points · Medium effort · Comment Value
3
Record your significant design decisions.
Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Raises the score by about 4.5 points · Medium effort · Architecture documentation

Diagnosis: what the measurements show together

Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.

Where the investment is most exposed · Value at risk
This code would cost about €210,000 to build again, about 1.5 person-years of work. Its weakest lens is Code Health, at 51.3 (Adequate). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
Resolve the 6 CommentedOutCode finding(s) in Explicit Debt. Of all the actions in this report, it raises the score most for the work it takes: about 3.8 points for low effort, because it clears the 6 Explicit Debt findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 5.6 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 6% to 14% on every change. The history of the code shows how much it changes: about 32,465 lines over the last 90 days, which is about 131,664 lines a year. At that pace, the extra work comes to an estimated 19.8 to 118.6 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture: which parts of the code depend on which

The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.

2007 modules, with 2586 dependencies between them. One loop runs through 2 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 1967 more are left out to keep it readable.

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 common.bridgecrew.platform_integration2 common.graph.checks_infra.solvers.base_solver3 common.graph.graph_builder.graph_components.blocks4 common.graph.graph_builder.local_graph5 common.graph.graph_manager6 common.models.enums7 common.vcs.vcs_schema8 openapi.checks.resource.v2.BaseOpenapiCheckV29 runner_filter10 ansible.checks.base_ansible_task_value_check11 common.checks_infra.solvers.attribute_solvers.base_attribute_solver12 common.typing13 terraform.graph_builder.local_graph14 common.checks.base_check15 common.output.record16 arm.base_resource_check17 circleci_pipelines.base_circleci_pipelines_check18 cloudformation.checks.resource.base_resource_check19 common.checks.base_check_registry20 common.output.report21 dockerfile.base_dockerfile_check22 github.base_github_configuration_check23 kubernetes.checks.resource.base_spec_check24 terraform.checks.data.base_check25 terraform.checks.provider.base_check26 terraform.checks.resource.base_resource_check27 arm.base_resource_negative_value_check28 arm.base_resource_value_check29 cloudformation.checks.resource.base_resource_negative_value_check30 cloudformation.checks.resource.base_resource_value_check31 common.bridgecrew.integration_features.base_integration_feature32 common.images.image_referencer33 common.runners.base_runner34 github.base_github_branch_security35 kubernetes.checks.resource.base_container_check36 terraform.checks.data.base_cloudsplaining_data_iam_check37 terraform.checks.resource.base_cloudsplaining_resource_iam_check38 terraform.checks.resource.base_resource_negative_value_check39 terraform.checks.resource.base_resource_value_check40 yaml_doc.runner
1 common.bridgecrew.platform_integration
2 common.graph.checks_infra.solvers.base_solver
3 common.graph.graph_builder.graph_components.blocks
4 common.graph.graph_builder.local_graph
5 common.graph.graph_manager
6 common.models.enums
7 common.vcs.vcs_schema
8 openapi.checks.resource.v2.BaseOpenapiCheckV2
9 runner_filter
10 ansible.checks.base_ansible_task_value_check1
11 common.checks_infra.solvers.attribute_solvers.base_attribute_solver1
12 common.typing1
13 terraform.graph_builder.local_graph1
14 common.checks.base_check2
15 common.output.record1
16 arm.base_resource_check11
17 circleci_pipelines.base_circleci_pipelines_check1
18 cloudformation.checks.resource.base_resource_check11
19 common.checks.base_check_registry121
20 common.output.report11
21 dockerfile.base_dockerfile_check1
22 github.base_github_configuration_check1
23 kubernetes.checks.resource.base_spec_check11
24 terraform.checks.data.base_check11
25 terraform.checks.provider.base_check11
26 terraform.checks.resource.base_resource_check11
27 arm.base_resource_negative_value_check11
28 arm.base_resource_value_check11
29 cloudformation.checks.resource.base_resource_negative_value_check11
30 cloudformation.checks.resource.base_resource_value_check11
31 common.bridgecrew.integration_features.base_integration_feature11
32 common.images.image_referencer111
33 common.runners.base_runner11
34 github.base_github_branch_security11
35 kubernetes.checks.resource.base_container_check11
36 terraform.checks.data.base_cloudsplaining_data_iam_check11
37 terraform.checks.resource.base_cloudsplaining_resource_iam_check11
38 terraform.checks.resource.base_resource_negative_value_check11
39 terraform.checks.resource.base_resource_value_check11
40 yaml_doc.runner1
Uses a module listed above itPart of a loopThe module itself
1 common.bridgecrew.platform_integration2 common.graph.checks_infra.solvers.base_solver3 common.graph.graph_builder.graph_components.blocks4 common.graph.graph_builder.local_graph5 common.graph.graph_manager6 common.models.enums7 common.vcs.vcs_schema8 openapi.checks.resource.v2.BaseOpenapiCheckV29 runner_filter10 ansible.checks.base_ansible_task_value_check11 common.checks_infra.solvers.attribute_solvers.base_attribute_solver12 common.typing13 terraform.graph_builder.local_graph14 common.checks.base_check15 common.output.record16 arm.base_resource_check17 circleci_pipelines.base_circleci_pipelines_check18 cloudformation.checks.resource.base_resource_check19 common.checks.base_check_registry20 common.output.report21 dockerfile.base_dockerfile_check22 github.base_github_configuration_check23 kubernetes.checks.resource.base_spec_check24 terraform.checks.data.base_check25 terraform.checks.provider.base_check26 terraform.checks.resource.base_resource_check27 arm.base_resource_negative_value_check28 arm.base_resource_value_check29 cloudformation.checks.resource.base_resource_negative_value_check30 cloudformation.checks.resource.base_resource_value_check31 common.bridgecrew.integration_features.base_integration_feature32 common.images.image_referencer33 common.runners.base_runner34 github.base_github_branch_security35 kubernetes.checks.resource.base_container_check36 terraform.checks.data.base_cloudsplaining_data_iam_check37 terraform.checks.resource.base_cloudsplaining_resource_iam_check38 terraform.checks.resource.base_resource_negative_value_check39 terraform.checks.resource.base_resource_value_check40 yaml_doc.runnercommon.bridgecrew.platform_integration1common.graph.checks_infra.solvers.base_solver2common.graph.graph_builder.graph_components.blocks3common.graph.graph_builder.local_graph4common.graph.graph_manager5common.models.enums6common.vcs.vcs_schema7openapi.checks.resource.v2.BaseOpenapiCheckV28runner_filter9ansible.checks.base_ansible_task_value_check10common.checks_infra.solvers.attribute_solvers.base_attribute_solver11common.typing12terraform.graph_builder.local_graph13common.checks.base_check14common.output.record15arm.base_resource_check16circleci_pipelines.base_circleci_pipelines_check17cloudformation.checks.resource.base_resource_check18common.checks.base_check_registry19common.output.report20dockerfile.base_dockerfile_check21github.base_github_configuration_check22kubernetes.checks.resource.base_spec_check23terraform.checks.data.base_check24terraform.checks.provider.base_check25terraform.checks.resource.base_resource_check26arm.base_resource_negative_value_check27arm.base_resource_value_check28cloudformation.checks.resource.base_resource_negative_value_check29cloudformation.checks.resource.base_resource_value_check30common.bridgecrew.integration_features.base_integration_feature31common.images.image_referencer32common.runners.base_runner33github.base_github_branch_security34kubernetes.checks.resource.base_container_check35terraform.checks.data.base_cloudsplaining_data_iam_check36terraform.checks.resource.base_cloudsplaining_resource_iam_check37terraform.checks.resource.base_resource_negative_value_check38terraform.checks.resource.base_resource_value_check39yaml_doc.runner40111121111111211111111111111111111111111111111111111111+1967 more modules (most-connected shown)

At a glance — Code Health · 51.3 · Adequate · gated by D2, X4, X5 ·

At a glance — Architecture · 95.3 · Exemplary ·

At a glance — Maturity · 52.6 · Adequate · gated by M2 ·

At a glance — Readiness · 64.1 · Adequate · gated by R8 ·

At a glance — Security · 69.1 · Adequate · gated by D29 ·

At a glance — Performance · 100.0 · Exemplary ·

Security & Compliance — OWASP Top-10 mapping

Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).

OWASP categoryFindingsSeverity
A05:2025 — Injection42High / Critical
A03:2025 — Software Supply Chain Failures16High / Critical
A02:2025 — Security Misconfiguration10High / Critical
A07:2025 — Authentication Failures2High / Critical

Roadmap

Top priorities: Resolve the 35 redundant comment finding(s) in Comment Value — start with pass.ts (17), fail__2__.ts (6), fail.ts (4); Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them; Resolve the 6 CommentedOutCode finding(s) in Explicit Debt — start with slsa-gen.yaml (2), main.yaml, ALBListenerHTTPS-FAILED-HTTP.yaml.

Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.

Do thisHelpsEffortDimension
Resolve the 6 CommentedOutCode finding(s) in Explicit Debt — start with slsa-gen.yaml (2), main.yaml, ALBListenerHTTPS-FAILED-HTTP.yaml.+3.8 ptsLowExplicit Debt
Resolve the 35 redundant comment finding(s) in Comment Value — start with pass.ts (17), fail__2__.ts (6), fail.ts (4).+5.9 ptsMediumComment Value
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.+4.5 ptsMediumArchitecture documentation
The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Turn null checking on where it is off — `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family — and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`).+3.2 ptsMediumNullable reference types
Interpolated log message defeats structured logging+2.8 ptsMediumStructured logging
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.+2.1 ptsMediumDependency Hygiene
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.+1.5 ptsMediumDocumentation (README)
Swallowed exception (caught, then discarded)+1.1 ptsMediumException handling

File quality

Per-file score 0–10 — a quality signature. Of 637 files carrying findings, judged against the Production bar: 0% slop · 36% mixed · 64% near-clean.

FileScoreBandWorst signal
REDACTED0.5SlopDependency Vulnerabilities: Critical vulnerability: REDACTED
REDACTED1.4SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.5SlopIaC & Container Security: High IaC: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.3MixedStatic Analysis (SAST): Medium: REDACTED
checkov/cloudformation/graph_builder/variable_rendering/renderer.py5.6MixedCyclomatic Complexity: CloudformationVariableRenderer._evaluate_condition (cyclomatic 17)
REDACTED5.7MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED6.1MixedIaC & Container Security: Medium IaC: REDACTED
REDACTED6.4MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED6.4MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED6.9MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED6.9MixedIaC & Container Security: Medium IaC: REDACTED
checkov/common/runners/runner_registry.py7.0MixedCyclomatic Complexity: RunnerRegistry.print_reports (cyclomatic 66)
checkov/secrets/runner.py7.0MixedCyclomatic Complexity: Runner.get_report (cyclomatic 48)
checkov/terraform/graph_builder/local_graph.py7.0MixedCyclomatic Complexity: TerraformLocalGraph._build_edges_for_vertex (cyclomatic 24)
checkov/terraform/plan_parser.py7.0MixedCyclomatic Complexity: plan_parser._hclify (cyclomatic 21)
checkov/common/bridgecrew/platform_integration.py7.0MixedCyclomatic Complexity: BcPlatformIntegration.persist_repository (cyclomatic 20)

How the grades work

Every finding carries one of four grades. Three say how serious it is. The fourth says this survey could not settle it — and it is a grade, not a gap.

Critical — 54

A definite problem that already costs you something and drags the score down: a missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here tends to cause failures elsewhere.

Serious — 1148

Likely wrong, but not failing yet. It degrades the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to carry for two years either.

Minor — 179

Recorded, with no effect on how the codebase functions. Present so the survey is complete, not because it needs doing.

Could not be resolved — 4

Something this survey could not settle from the outside, and which could be critical or serious. Either a control was required and no positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean result. These are excluded from the score rather than awarded a pass, so the number on the cover neither rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each one is named under Limitations.

Methodology & how to trust this report

This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 63 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.

Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.

What we checked — 63 dimensions across the health lenses
D1D2D3D4D5D6D12D13D14D15D16D17D19D24D27D28D29D30D31D35D36D37D40D41D43D44AX10AX3AX4AX6M1M2M3M4P1P2P3P4P5P6PF3R1R10R2R3R5R7R8R9X1X12X13X14X17X19X23X25X27X28X3X30X4X5

Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.

How to trust any code-health report — three questions
  1. Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 1366 of 1381 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

This report answers yes to all three. That's the bar to hold any assessment to.

Tools & methods

The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Canine Code Analyzer duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivy · checkovSecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3 · 3.2.533✓ deterministic

Every finding is locatable in findings.md. Run 01a1e6c0-ed01-7d15-896b-604b91c2ac02.

The exact command behind every deep-scan dimension — tool, version, invocation and retained raw output — is in Appendix B — Reproduction & audit trail.

Run transparency — what happened this run

What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.

  • D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT READ here — but this repository measures it: a coverage step in CI (`pytest --cov-report term --cov`) shows that coverage is collected and tracked in your own CI. The suite could not be built/run in-image, so the number could not be read here — it is excluded from the score rather than treated as unmeasured-by-the-team. To have it measured, make the suite runnable without services we do not provision (a database, a broker). For context only, test code is ≈ 98% of production LoC (102,080 test / 104,636 production) — a rough proxy, NOT a coverage measurement. You can widen what we reach: optional: make the suite runnable without a database, broker or other service we do not provision, and real coverage is measured on the next scan.
  • D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.py) and this repository declares a Python test suite (repository root, 1775 test files), but it was not re-run: no test result was produced. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
  • D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares a Python pyproject.toml/requirements.txt (pip/uv/Poetry), but the licence verdict published here was taken over its NuGet package dependencies. Nothing was read about its Python dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems), but the licence verdict published here was taken over its NuGet package dependencies. Nothing was read about its Bundler dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D17 Explicit Debt — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 6 deducted marker(s) and the 0.8/KLoC density on this row were taken over this repository's .NET projects ALONE: .py (85,862 lines, 95% of production source) went unread, because every marker collector on this path is reached through a C# workspace. A read-only sweep of that source finds at least 67 task marker(s) (TODO/FIXME/HACK/XXX) across 44 file(s) that this score does not count — a floor, since only line comments are read there and D17's other eight marker kinds (suppressions, NoWarn, editorconfig severities, empty catches, commented-out code, Obsolete, dead code, preprocessor branches) need a compiler we do not have for that language. The debt in that source is UNMEASURED — its absence from the score above is a gap in this analyzer's language coverage, not a finding that the code carries none.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
  • D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
  • D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D22 Internal API Consistency — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. The loaded project set declares no packable project and no `.Contracts` project, so there is no intentionally-exposed surface for API consistency to be judged over.
  • D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
  • D31 IaC & Container Security — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Tests/dockerfile/checks/example_ReferenceLatestTag/failure_default_version_tag/REDACTED, tests/dockerfile/checks/example_ReferenceLatestTag/failure_latest_version_tag/REDACTED, tests/dockerfile/checks/example_ReferenceLatestTag/success/REDACTED, tests/dockerfile/checks/example_ReferenceLatestTag/success_scratch/REDACTED, tests/dockerfile/resources/empty_dockerfile/REDACTED (and 2 more) carries no `FROM` instruction, so it declares no build stage and every REDACTED rule this engine owns — the runtime-hardening, key-material, mutable-clone, no-op-shim, build-context, trust-anchor, install-guard, setuid and world-writable-path rules — is outside its own premise there and returned nothing. That silence is deliberate and correct: with no base image there is no image to reason about. It is reported here because it is NOT the same fact as a clean file, and coverage is stated as 3344 of 3351 Infrastructure-as-Code manifest(s) fully judged rather than as 100%. The vendor scanners (trivy, checkov) do read these files and their findings above stand; only this engine's own stage-keyed rules are absent. No owner action: a build file with no FROM is a legitimate include fragment.
  • D34 Knowledge Freshness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. File-level freshness contradicts repo activity: 74 commits in the last 90 days, yet 328 of 352 significant files carry no living knowledge. Those two readings cannot both be true, so the per-file recency signal is treated as unreliable here and freshness is not scored for this run.
  • C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
  • GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust and Java source only, and this repository's Python is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • R7 Dead Code — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 27 further occurrence(s) are not listed individually; the score already reflects all 67.
  • S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
  • X10 Duplicated predicate — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 67 further occurrence(s) are not listed individually; the score already reflects all 107.
  • X4 Structured logging — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 535 further occurrence(s) are not listed individually; the score already reflects all 575.

Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.

Limitations & what we did not check

We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.

Per-dimension blind spots

For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
  • D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D40 Network Egress Confinement: Egress confinement is read from committed Kubernetes manifests — a policy applied out-of-band (cluster-default deny, a service mesh, or a cloud firewall/security group off-repo) is invisible, and a present NetworkPolicy is declared config, not proof the cluster admission-controller actually enforces it at runtime.
  • D41 Kernel & Syscall Confinement: Syscall/MAC confinement is read from committed manifests — a profile applied by a cluster-wide PodSecurity default or a mutating webhook off-repo isn't seen, and a declared seccomp/AppArmor profile is config presence, not proof the node's kernel actually loaded and enforced it.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity6.0 / 10Adequate✓ Tool-verified

What it measures: How tangled the control flow is — methods with many branches are hard to test and change.

Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.

Maturity: Documented → Verified → Prevented · effective 6.0 / 10 · rule-coverage 100% · ceiling Prevented

110 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was Checkov.run at 103. A further 1 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being CustomJSONEncoder.default at 16 — they are counted neither in the figure above nor in this dimension's score. 1 file carries no cyclomatic complexity row at all for this reason — every one of its over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: checkov/common/util/json_utils.py (CustomJSONEncoder.default at 16). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

Checkov.run (cyclomatic 103)checkov/main.py:255
RunnerRegistry.print_reports (cyclomatic 66)checkov/common/runners/runner_registry.py:384
Runner.get_report (cyclomatic 48)checkov/secrets/runner.py:425
parser_utils.find_var_blocks (cyclomatic 44)checkov/common/util/parser_utils.py:86
Seccomp.scan_spec_conf (cyclomatic 42)checkov/kubernetes/checks/resource/k8s/Seccomp.py:25

+ 105 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 2 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with Checkov.run (cyclomatic 103), RunnerRegistry.print_reports (cyclomatic 66). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 2 together lifts Cyclomatic Complexity from 6.0 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.

D2 · Cognitive Complexity2.0 / 10Critical✓ Tool-verified

What it measures: How hard the code is for a person to follow, beyond raw branching.

Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.

Maturity: Documented → Verified → Prevented · effective 2.0 / 10 · rule-coverage 100% · ceiling Prevented

461 method(s) exceeded the cognitive complexity threshold of 15; the worst was Checkov.run at 184.

Runner.run (cognitive 16) · ×2checkov/bicep/runner.py:78
Checkov.run (cognitive 184)checkov/main.py:255
GithubActionsOIDCTrustPolicy.scan_data_conf (cognitive 141)checkov/terraform/checks/data/aws/GithubActionsOIDCTrustPolicy.py:16
RunnerRegistry.print_reports (cognitive 129)checkov/common/runners/runner_registry.py:384
Seccomp.scan_spec_conf (cognitive 129)checkov/kubernetes/checks/resource/k8s/Seccomp.py:25

+ 455 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 21 bodies over 60 down to 60 or less in Cognitive Complexity — start with Checkov.run (cognitive 184), GithubActionsOIDCTrustPolicy.scan_data_conf (cognitive 141), RunnerRegistry.print_reports (cognitive 129). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 21 together lifts Cognitive Complexity from 2.0 to about 3.8/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.

D3 · God Classes9.6 / 10Stronggated by 12 serious findings✓ Tool-verified

What it measures: Over-large classes that try to do too much ("god classes").

Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.

Maturity: Documented → Verified → Prevented · effective 9.6 / 10 · rule-coverage 100% · ceiling Prevented

12 god class(es) detected.

FileTooLong: bridgecrew/platform_integration.py · ×9checkov/common/bridgecrew/platform_integration.py
TooManyMethods: BcPlatformIntegration · ×3checkov/common/bridgecrew/platform_integration.py:113

What to do

  1. Resolve the 9 FileTooLong finding(s) in God Classes — start with runner.py (2), platform_integration.py, main.py. — One of this dimension's main actionable groups (9 warning-level).
  2. Resolve the 3 TooManyMethods finding(s) in God Classes — start with platform_integration.py, local_graph.py, tf_parser.py. — One of this dimension's main actionable groups (3 warning-level).

Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.

D4 · Code Duplication4.5 / 10Weak✓ Tool-verified

What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.

Maturity: Documented → Verified → Prevented · effective 4.5 / 10 · rule-coverage 100% · ceiling Verified

282 duplicated block group(s) detected. 13.8 % of the production lines (14,448 of 104,636) are in a reported copy. A further 200 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 80 of the 482 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.

Duplicated block (8 lines × 2) · ×20checkov/arm/checks/resource/NSGRulePortAccessRestricted.py:25
Duplicated block (7 lines × 2) · ×14checkov/arm/parser/parser.py:67
Edited copy of a member (12 corresponding lines) · ×13checkov/terraform/checks/resource/aws/SecurityGroupRuleDescription.py:41
Edited copy of a member (11 corresponding lines) · ×13checkov/terraform/checks/resource/aws/ElasticsearchDomainAuditLogging.py:18
Duplicated block (11 lines × 2) · ×13checkov/bitbucket/dal.py:24

+ 181 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 20 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with runner.py (3), NSGRulePortAccessRestricted.py, EC2PublicIP.py. — One of this dimension's main actionable groups (20 warning-level).
  2. Resolve the 14 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with runner.py (3), VnetSingleDNSServer.py (2), parser.py. — One of this dimension's main actionable groups (14 warning-level).
  3. Resolve the 13 Edited copy of a member (12 corresponding lines) finding(s) in Code Duplication — start with fail__1__.py (4), fail__2__.py (2), fail__4__.py (2). — One of this dimension's main actionable groups (13 warning-level).

Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.

D5 · Coupling6.9 / 10Adequate✓ Tool-verified

What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.

Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.

Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.

Maturity: Documented → Verified → Prevented · effective 6.9 / 10 · rule-coverage 100% · ceiling Prevented

1 projects, 0 dependency cycle(s), 0 unstable depended-on project(s).

Detailed fixes: d5_recommendation.md.

D6 · Cohesion (LCOM4)9.9 / 10Stronggated by 1 serious finding✓ Tool-verified

What it measures: Whether a class's methods are focused on a single responsibility.

Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.

Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Verified

1 of 185 classes have LCOM4 above 3.

Low cohesion: CloudformationVariableRenderer (LCOM4 5)checkov/cloudformation/graph_builder/variable_rendering/renderer.py:34

What to do

  1. Resolve the 1 Low cohesion finding(s) in Cohesion (LCOM4) — start with renderer.py. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.

D12 · Dependency Hygiene9.8 / 10Stronggated by 1 serious finding✓ Tool-verified

What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.

Maturity: Documented → Verified → Prevented · effective 9.8 / 10 · rule-coverage 100% · ceiling Verified

0 outdated direct gem(s), 1 pinning defect(s). 8 declaration(s) graded against rubygems.org, none of them against a committed Gemfile.lock — this repository commits none, which a published gem correctly does not, so currency is read off the declared requirements: a declaration that does not cap below the current release resolves to it on `bundle install`. 2 declaration(s) carry a requirement that EXCLUDES the current release; that is a deliberate constraint (a supported-version ceiling or a held-back CI pin) and is counted, not charged. Whether any of these gems is DEPRECATED or YANKED is not graded — rubygems.org publishes no deprecation marker, and a yank removes a version rather than flagging it. Whether any is UNMAINTAINED is not graded either: no registry publishes a maintenance status, and release age does not stand in for one. Whether any is UNUSED is a source question, not a registry one. Known CVEs in this dependency graph are D30's question, read from the manifest there.

No Gemfile.lock committed by an application

What to do

  1. Resolve the 1 No Gemfile.lock committed by an application finding(s) in Dependency Hygiene. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.

D13 · Secret Scanning10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.

Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

D14 · License Compliance10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether the licenses of third-party packages are compatible with your policy.

Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 of 120 packages use a banned license. ★ DEPTH: this repository's MSBuild projects declare 8 direct `PackageReference`(s), and 112 further package(s) were reached beyond them by closing the graph over nuget.org's own nuspec dependency graph — so a banned licence pulled in only by a dependency's OWN dependencies is inside this verdict. A package whose licence nuget.org could not be asked for is not graded, and version ranges are taken at their lower bound, so this is the closure as that graph states it rather than a restored consumer's exact resolution. ★ COVERAGE OF THIS VERDICT: it grades this repository's NuGet package dependencies and nothing else. The repository also declares a Python pyproject.toml/requirements.txt (pip/uv/Poetry) and a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems), and the licences of those dependency graphs were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots10.0 / 10Stronggated by 2 serious findings✓ Tool-verified

What it measures: Files that change often and are also complex — the riskiest hotspots.

Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: checkov/common/bridgecrew/integration_features/features/suppressions_integration.py (2×22=44) Repeated repair below the complexity floor: checkov/terraform/module_loading/loaders/git_loader.py (3 of 3 changes were fixes)

Hotspot: checkov/common/bridgecrew/integration_features/features/suppressions_integration.pycheckov/common/bridgecrew/integration_features/features/suppressions_integration.py:193
Repeated repair: checkov/terraform/module_loading/loaders/git_loader.pycheckov/terraform/module_loading/loaders/git_loader.py:243

What to do

  1. Resolve the 1 Hotspot finding(s) in Churn × Complexity Hotspots — start with suppressions_integration.py. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 Repeated repair finding(s) in Churn × Complexity Hotspots — start with git_loader.py. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.

D16 · Bus Factor9.9 / 10Exemplary✓ Tool-verified

What it measures: Whether knowledge is concentrated in too few people (the "bus factor").

Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Documented

5 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is checkov/bicep/graph_builder/local_graph.py. Counted over 352 of the 2720 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Off-boarding risk: anonymized user #1
Further sole-owners (lower concentration)

✓ On the Gold path — maintain.

Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.

D17 · Explicit Debt8.5 / 10Strong✓ Tool-verified

What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.

Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.

Maturity: Documented → Verified → Prevented · effective 8.5 / 10 · rule-coverage 100% · ceiling Prevented

6 deducted debt markers + 0 dead symbols across 0 LoC in the .NET projects (0.8/KLoC) → score 8.5. Measured on the .NET source only: .py (95% of production source) was not read, and carries at least 67 uncounted task marker(s) in 44 file(s).

CommentedOutCode · ×6tests/cloudformation/checks/example_WildcardEntities/main.yaml:18

What to do

  1. Resolve the 6 CommentedOutCode finding(s) in Explicit Debt — start with slsa-gen.yaml (2), main.yaml, ALBListenerHTTPS-FAILED-HTTP.yaml. — One of this dimension's main actionable groups (6 warning-level).

Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.

D19 · Documentation Quality10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether the project's documentation is clear, complete, and useful.

Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

1 of 1 documentation facets pass in full. 88 document(s) read across 1 unit(s).

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D24 · Comment Value0.0 / 10Critical✓ Tool-verified

What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).

Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 99% · ceiling Documented

35 of 178 judged comments only repeat the code they sit on (19.7 %). 6 comment(s) in another language or script were not judged.

redundant comment · ×35cdk_integration_tests/src/typescript/CloudtrailEncryption/pass.ts:32

What to do

  1. Resolve the 35 redundant comment finding(s) in Comment Value — start with pass.ts (17), fail__2__.ts (6), fail.ts (4). — One of this dimension's main actionable groups (35 recommendation-level).

Detailed fixes: d24_recommendation.md · top locations in Appendix A, every location in findings.md.

D27 · Navigability7.5 / 10Strong✓ Tool-verified

What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.

Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.

Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.

Maturity: Documented → Verified → Prevented · effective 7.5 / 10 · rule-coverage 100% · ceiling Documented

50 % of calls cross a namespace and 0 % go through an interface, but 0 % of collaborators are co-located — so following a call takes several hops. Baseline: small — navigation cost is tolerated.

Scattered collaborators

What to do

  1. Resolve the 1 Scattered collaborators finding(s) in Navigability. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d27_recommendation.md · top locations in Appendix A, every location in findings.md.

D28 · Secrets (history)9.0 / 10Adequategated by 1 critical finding✓ Tool-verified

What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.

Method: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.

Maturity: Documented → Verified → Prevented · effective 9.0 / 10 · rule-coverage 100% · ceiling Documented

1 finding(s): 0 critical, 1 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.

REDACTED
REDACTED

What to do

  1. Resolve the 1 High secret finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.

D29 · Static Analysis (SAST)0.1 / 10Critical✓ Tool-verified

What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.

Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.

Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).

Maturity: Documented → Verified → Prevented · effective 0.1 / 10 · rule-coverage 100% · ceiling Documented

43 finding(s): 0 critical, 32 high, 11 medium, 0 low. 7 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 7 file(s) — `cdk_integration_tests/src/typescript/NeptuneClusterStorageEncrypted/fail.ts` (line 40), `cdk_integration_tests/src/typescript/NeptuneClusterStorageEncrypted/pass.ts` (line 83), `checkov/common/checks_infra/resources_types.py`, `checkov/github_actions/schemas.py`, `docs/search.html` (lines 1–6), … (+2 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 3 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

+ 11 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 17 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (7), REDACTED (5), REDACTED (2). — One of this dimension's main actionable groups (17 issue-level).
  2. No action in Static Analysis (SAST) — all 4 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (4 issue-level, 0 of them charged here).
  3. No action in Static Analysis (SAST) — all 3 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (3 issue-level, 0 of them charged here).

Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.

D30 · Dependency Vulnerabilities3.6 / 10Weak✓ Tool-verified

What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.

Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

Maturity: Documented → Verified → Prevented · effective 3.6 / 10 · rule-coverage 100% · ceiling Documented

12 finding(s): 1 critical, 7 high, 4 medium, 0 low.

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 7 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (7). — One of this dimension's main actionable groups (7 issue-level).
  2. Resolve the 4 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (4). — One of this dimension's main actionable groups (4 warning-level).
  3. Resolve the 1 Critical vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).

Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.

D31 · IaC & Container Security8.8 8.7 / 10Adequategated by 1 critical finding✓ Tool-verified

What it measures: Whether Dockerfiles / Terraform / Kubernetes config follow security best practices.

Method: IaC/container misconfiguration scan via trivy config (REDACTED/Terraform/K8s/Helm/CloudFormation); severity rules to 0-10 moderate normalizer. NotApplicable without manifests. Exhaustive, deterministic.

Maturity: Documented → Verified → Prevented · effective 8.7 / 10 · rule-coverage 100% · ceiling Documented

10 finding(s): 0 critical, 1 high, 9 medium, 0 low.

REDACTED
REDACTED

What to do

  1. Resolve the 1 High IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 9 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (7), REDACTED (2). — One of this dimension's main actionable groups (9 warning-level).

Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.

D35 · Change Coupling10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.

Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.

Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No strong hidden change-coupling between production files.

✓ On the Gold path — maintain.

Detailed fixes: d35_recommendation.md.

D36 · Supply-chain Provenance & Signing7.5 / 10Strong✓ Tool-verified

What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.

Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.

Maturity: Documented → Verified → Prevented · effective 7.5 / 10 · rule-coverage 100% · ceiling Documented

3/4 supply-chain integrity signals present (provenance, signing, SBOM, pinned actions).

REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.

D37 · Vulnerability-disclosure Policy10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.

Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

A vulnerability-disclosure policy (SECURITY.md) is published with a reporting contact.

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.md.

D40 · Network Egress Confinement6.0 / 10Adequate✓ Tool-verified

What it measures: Whether Kubernetes workloads restrict network EGRESS with a NetworkPolicy (or Cilium policy), limiting where a compromised pod can send data or reach a command-and-control server. Presence of committed egress-restricting policy, not runtime enforcement.

Method: Deterministic YAML-manifest inspection (no external tool, no Roslyn — language-agnostic): Kubernetes workloads gate applicability; credits a NetworkPolicy / Cilium policy that restricts egress (policyTypes: [Egress] / egress rules). Reward-leaning (neutral floor climbing to 10, never a deduction — baseline misconfigs stay with D31). Deterministic.

Maturity: Documented → Verified → Prevented · effective 6.0 / 10 · rule-coverage 100% · ceiling Documented

0/2 network-egress controls present (network policy, egress restriction).

No network policy

What to do

  1. Resolve the 1 No network policy finding(s) in Network Egress Confinement. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d40_recommendation.md · top locations in Appendix A, every location in findings.md.

D41 · Kernel & Syscall Confinement8.0 / 10Strong✓ Tool-verified

What it measures: Whether Kubernetes workloads confine the kernel boundary — a seccomp profile (RuntimeDefault/Localhost) plus an AppArmor/SELinux mandatory-access-control layer — shrinking the syscall attack surface a container escape would use. Presence of committed confinement config, not runtime enforcement.

Method: Deterministic YAML-manifest inspection (no external tool, no Roslyn): on Kubernetes workloads, credits a seccomp profile (RuntimeDefault/Localhost) and an AppArmor/SELinux MAC layer. Reward-leaning (neutral floor climbing to 10); NotApplicable without workloads. Deterministic.

Maturity: Documented → Verified → Prevented · effective 8.0 / 10 · rule-coverage 100% · ceiling Documented

1/1 workload(s) run every container under a seccomp profile; 0/1 declare an AppArmor/SELinux profile.

Detailed fixes: d41_recommendation.md.

D43 · Malicious Dependencies10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.

Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No dependency in any ecosystem this repository declares is published as malicious.

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

D44 · Platform End-of-Life6.0 / 10Adequate✓ Tool-verified

What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.

Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.

Maturity: Documented → Verified → Prevented · effective 6.0 / 10 · rule-coverage 100% · ceiling Documented

1 end-of-life runtime(s) and 0 end-of-life framework(s), read from 2 platform declaration(s) and 55 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.

End-of-life runtime: .NET net7.0tests/sca_package_2/examples/Microsoft.NET.Sdk.csproj:4

What to do

  1. Resolve the 1 End-of-life runtime finding(s) in Platform End-of-Life — start with Microsoft.NET.Sdk.csproj. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d44_recommendation.md · top locations in Appendix A, every location in findings.md.

Frontend & cross-cutting dimensions

R = React/JS · M = Maturity · P = Readiness.

AX10 · Code composition10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.

Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.

Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.

AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).

Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.

AX4 · Dependency direction10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.

Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.

AX6 · Interface segregation10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').

Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.

M1 · Documentation (README)6.7 / 10Adequate✓ Tool-verified

Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.

Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.

What to do

  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
M2 · Architecture documentation0.0 / 10Critical✓ Tool-verified

Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.

Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.

  • No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
  • No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.

What to do

  • Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
  • Add a C4 context/container diagram (Structurizr, PlantUML or Mermaid) or an architecture.md overview.
M3 · Folder & project structure8.0 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.

Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.

  • Most of the production code is in directories of its own, but 1 application file(s) sit at the repository root beside the build and tooling files (`dangerfile.ts`).
M4 · Documentation accuracy8.0 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.

Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.

  • README.md names Python 3.6, but setup.py:119 requires `python_requires=">=3.10",`: the package does not install on Python 3.6. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — README.md:199

What to do

  • Reconcile the README with reality: README.md names Python 3.6, but setup.py:119 requires `python_requires=">=3.10",`: the package does not install on Python 3.6.
P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — Whether an automated pipeline builds and tests every change.

Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.

P2 · Observability8.0 / 10Strong✓ Tool-verified

Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.

Method: Filesystem/Roslyn scan: structured-logging frameworks (Serilog, NLog), OpenTelemetry, and health-check endpoint patterns. Exhaustive, deterministic.

P3 · Security & performance tooling10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).

Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.

  • `REDACTED` schedules updates, but no `package-ecosystem` entry covers `nuget`, `npm`, `gomod`, `pip`, `bundler`, `gitsubmodule`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entries to the `updates:` list. — REDACTED:2

What to do

  • Dependabot is configured but does not watch `nuget`, `npm`, `gomod`, `pip`, `bundler`, `gitsubmodule` — add those `package-ecosystem` entries to REDACTED so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
P4 · Deployment & Rollback10.0 / 10Exemplary✓ Tool-verified

Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.

Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.

P5 · DR & Backup7.0 / 10Strong✓ Tool-verified

Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.

Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.

What to do

  • Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.

Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.

PF3 · Async & latency hygiene10.0 / 10Exemplary✓ Tool-verified

Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.

Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.

R1 · Type Safety9.9 / 10Exemplary✓ Tool-verified

React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.

Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.

R10 · Code Duplication10.0 / 10Exemplary✓ Tool-verified

React / JS · Code Health — The share of the scored frontend lines inside a near-exact copy-pasted block of substantial extent (the D4 clone algorithm over JS/TS tokens, D-386; each line once, 10 at none and 0 at a quarter of the lines, as D4): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.

Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Scored on the share of the scored frontend lines inside a reported copy, on the same curve as D4. Deterministic.

R2 · Cyclomatic Complexity10.0 / 10Exemplary✓ Tool-verified

React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.

Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.

  • processFile has cyclomatic complexity 13 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — dangerfile.ts:56
R3 · Large Files10.0 / 10Exemplary✓ Tool-verified

React / JS · Code Health — How many source files exceed the large-file threshold.

Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.

R5 · Dependency Freshness9.8 / 10Exemplary✓ Tool-verified

React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).

Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.

R7 · Dead Code8.0 / 10Strong✓ Tool-verified

React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).

Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.

  • This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it. (×40) — cdk_integration_tests/src/typescript/AppSyncFieldLevelLogs/fail.ts:6, cdk_integration_tests/src/typescript/AppSyncFieldLevelLogs/pass.ts:6, cdk_integration_tests/src/typescript/AppSyncLogging/fail.ts:6, …

What to do

  • Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
R8 · Dependency Hygiene0.0 / 10Critical✓ Tool-verified

React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.

Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.

  • Imported but not declared in any reachable package.json — installs work only by hoisting accident. (×12) — cdk_integration_tests/src/typescript/APIGatewayAuthorization/fail.ts:2, cdk_integration_tests/src/typescript/AppSyncFieldLevelLogs/fail.ts:2, cdk_integration_tests/src/typescript/AthenaWorkgroupConfiguration/fail.ts:2, …
  • Declared in tests/sca_package_2/examples/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×2) — tests/sca_package_2/examples/package.json:23, tests/sca_package_2/examples/package.json:24

What to do

  • Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
R9 · Circular Imports10.0 / 10Exemplary✓ Tool-verified

React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.

Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.

X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.

Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.

X12 · Unreachable branch10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.

Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.

X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.

Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.

X14 · Bypassable address classification10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.

Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.

X17 · Uncapped recursion over a caller-supplied document1.9 / 10Critical✓ Tool-verified

Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.

Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.

  • `hclify` is public and takes `obj: dict[str, Any]` from its caller, and it calls itself at line 173 (`hclify`) with a piece of `obj` (and at line 179) — and nowhere in `hclify` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `hclify` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — checkov/terraform_json/parser.py:173
  • `replace_string_value` is public and takes `original_str: Any` from its caller, and it calls itself at line 120 (`replace_string_value`) with a piece of `original_str` — and nowhere in `replace_string_value` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `replace_string_value` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — checkov/terraform/graph_builder/variable_rendering/evaluate_terraform.py:120
  • `extract_value_from_vertex` is public and takes `attributes: Dict[str, Any]` from its caller, and it calls itself at line 215 (`self.extract_value_from_vertex`) with a piece of `attributes` — and nowhere in `extract_value_from_vertex` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `extract_value_from_vertex` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — checkov/terraform/graph_builder/variable_rendering/renderer.py:215
  • `evaluate_value` is public and takes `val: Any` from its caller, and it calls itself at line 567 (`self.evaluate_value`) with a piece of `val` (and at line 571, line 579, line 580) — and nowhere in `evaluate_value` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `evaluate_value` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — checkov/terraform/graph_builder/variable_rendering/renderer.py:567
  • `check_array_max_items` is public and takes `inner_conf: Any` from its caller, and it calls itself at line 32 (`self.check_array_max_items`) with a piece of `inner_conf` (and at line 37) — and nowhere in `check_array_max_items` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `check_array_max_items` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — checkov/openapi/checks/resource/generic/NoMaximumNumberItems.py:32
  • `is_acceptable_module_param` is public and takes `value: Any` from its caller, and it calls itself at line 68 (`is_acceptable_module_param`) with a piece of `value` (and at line 73) — and nowhere in `is_acceptable_module_param` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `is_acceptable_module_param` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — checkov/common/util/parser_utils.py:68
  • `prompt` is public and takes `prompt_map: dict[str, Any] | None` from its caller, and it calls itself at line 166 (`self.prompt`) with a piece of `prompt_map` — and nowhere in `prompt` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `prompt` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — checkov/common/util/prompt.py:166
  • `force_dict` is public and takes `obj: Any` from its caller, and it calls itself at line 76 (`force_dict`) with a piece of `obj` — and nowhere in `force_dict` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `force_dict` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — checkov/common/util/type_forcers.py:76
  • `adjust_value` is public and takes `value: Any` from its caller, and it calls itself at line 70 (`adjust_value`) with a piece of `value` — and nowhere in `adjust_value` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `adjust_value` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — checkov/common/graph/graph_builder/utils.py:70
  • `to_list` is public and takes `data: Any` from its caller, and it calls itself at line 79 (`to_list`) with a piece of `data` (and at line 81) — and nowhere in `to_list` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `to_list` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — checkov/common/graph/graph_builder/utils.py:79
  • `find_lines` is public and takes `node: Any` from its caller, and it calls itself at line 110 (`self.find_lines`) with a piece of `node` — and nowhere in `find_lines` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `find_lines` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — checkov/cloudformation/context_parser.py:110
  • `search_deep_keys` is public and takes `arm_dict: dict[str, Any]` from its caller, and it calls itself at line 171 (`self.search_deep_keys`) with a piece of `arm_dict` (and at line 176, line 181) — and nowhere in `search_deep_keys` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `search_deep_keys` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — checkov/arm/context_parser.py:171
  • `search_deep_values` is public and takes `arm_dict: dict[str, Any]` from its caller, and it calls itself at line 201 (`self.search_deep_values`) with a piece of `arm_dict` (and at line 206, line 211) — and nowhere in `search_deep_values` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `search_deep_values` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — checkov/arm/context_parser.py:201

What to do

  • Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
X19 · Unrestored process-global state10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.

Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.

X23 · Unguarded diagnostic materialisation7.2 / 10Strong✓ Tool-verified

Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.

Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.

  • `debug` at line 267 is called with an argument built by `json.dumps(self.run_metadata, indent = 2)` (line 267), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — checkov/main.py:267
  • `debug` at line 126 is called with an argument built by `"…".join(self.framework)` (line 126), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — checkov/runner_filter.py:126
  • `debug` at line 36 is called with an argument built by `json.dumps(violations, indent = 2, default = str)` (line 36), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — checkov/terraform/checks/utils/base_cloudsplaining_iam_scanner.py:36
  • `debug` at line 718 is called with an argument built by `[r.check_type for r in self.runners]` (line 718), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — checkov/common/runners/runner_registry.py:718
  • `debug` at line 122 is called with an argument built by `json.dumps(payload)` (line 122), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — checkov/common/bridgecrew/integration_features/features/fixes_integration.py:122
  • `debug` at line 173 is called with an argument built by `json.dumps(metadata)` (line 173), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — checkov/common/bridgecrew/integration_features/features/policy_metadata_integration.py:173
  • `debug` at line 74 is called with an argument built by `json.dumps(default_rule, indent = 2)` (line 74), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — checkov/common/bridgecrew/integration_features/features/repo_config_integration.py:74
  • `debug` at line 75 is called with an argument built by `json.dumps(other_rules, indent = 2)` (line 75), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — checkov/common/bridgecrew/integration_features/features/repo_config_integration.py:75
  • `debug` at line 115 is called with an argument built by `json.dumps(self.enforcement_rule, indent = 2)` (line 115), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — checkov/common/bridgecrew/integration_features/features/repo_config_integration.py:115
  • `debug` at line 44 is called with an argument built by `json.dumps(file_definition, indent = 2, default = str)` (line 45), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — checkov/cloudformation/graph_manager.py:44
  • `debug` at line 115 is called with an argument built by `json.dumps(file_definition, indent = 2, default = str)` (line 116), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — checkov/cloudformation/runner.py:115
  • `debug` at line 73 is called with an argument built by `json.dumps(violations)` (line 73), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — checkov/cloudformation/checks/resource/BaseCloudsplainingIAMCheck.py:73

What to do

  • In Python, put the construction behind the logger's own check (`if logger.isEnabledFor(logging.DEBUG):`), or pass the collection itself with a `%s` placeholder (`logger.debug("Items %s", items)`) so the logging module renders it only when the record is emitted. The placeholder alone is not the fix when the argument is still built first: it defers the formatting, not a `json.dumps`, a `join` or a comprehension in the argument, and an f-string defers nothing at all.
X25 · Inert configuration knob10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.

Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.

X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen.

Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.

X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.

Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.

X3 · Exception handling6.2 / 10Adequate✓ Tool-verified

Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.

Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.

  • `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×23) — checkov/terraform/parser_functions.py:208, checkov/terraform/graph_builder/variable_rendering/evaluate_terraform.py:110, checkov/terraform/graph_builder/variable_rendering/evaluate_terraform.py:175, …
  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×5) — checkov/terraform/checks/resource/aws/IAMAdminPolicyDocument.py:42, checkov/terraform/checks/resource/aws/IAMRoleAllowsPublicAssume.py:30, checkov/terraform/checks/resource/aws/IAMStarActionPolicyDocument.py:48, …

What to do

  • Swallowed exception (caught, then discarded)
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.

Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.

X4 · Structured logging2.7 / 10Weak✓ Tool-verified

Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.

Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.

  • `debug` at line 19 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — checkov/contributor_metrics.py:19
  • `debug` at line 25 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — checkov/contributor_metrics.py:25
  • `debug` at line 30 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — checkov/contributor_metrics.py:30
  • `debug` at line 31 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — checkov/contributor_metrics.py:31
  • `debug` at line 33 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — checkov/contributor_metrics.py:33
  • `info` at line 42 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — checkov/contributor_metrics.py:42
  • `info` at line 50 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — checkov/contributor_metrics.py:50
  • `debug` at line 189 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — checkov/main.py:189
  • `debug` at line 214 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — checkov/main.py:214
  • `debug` at line 218 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — checkov/main.py:218
  • `debug` at line 237 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — checkov/main.py:237
  • `debug` at line 239 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — checkov/main.py:239
  • `debug` at line 267 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — checkov/main.py:267
  • `warning` at line 357 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — checkov/main.py:357
  • `debug` at line 360 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — checkov/main.py:360
  • `debug` at line 387 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — checkov/main.py:387
  • `warning` at line 480 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — checkov/main.py:480
  • `debug` at line 500 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — checkov/main.py:500
  • `debug` at line 501 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — checkov/main.py:501
  • `error` at line 533 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog. — checkov/main.py:533
  • `debug` at line 587 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — checkov/main.py:587
  • `warning` at line 592 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — checkov/main.py:592
  • `error` at line 619 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog. — checkov/main.py:619
  • `debug` at line 642 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — checkov/main.py:642
  • `warning` at line 647 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — checkov/main.py:647
  • `debug` at line 698 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — checkov/main.py:698
  • `warning` at line 703 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — checkov/main.py:703
  • `debug` at line 126 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — checkov/runner_filter.py:126
  • `debug` at line 225 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — checkov/runner_filter.py:225
  • `debug` at line 245 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — checkov/runner_filter.py:245
  • `debug` at line 251 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — checkov/runner_filter.py:251
  • `debug` at line 255 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — checkov/runner_filter.py:255
  • `debug` at line 268 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — checkov/runner_filter.py:268
  • `debug` at line 269 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — checkov/runner_filter.py:269
  • `debug` at line 274 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — checkov/runner_filter.py:274
  • `debug` at line 277 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — checkov/runner_filter.py:277
  • `debug` at line 280 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — checkov/runner_filter.py:280
  • `debug` at line 398 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — checkov/runner_filter.py:398
  • `info` at line 171 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — checkov/yaml_doc/base_registry.py:171
  • `error` at line 35 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog. — checkov/terraform_json/parser.py:35

What to do

  • Interpolated log message defeats structured logging
X5 · Nullable reference types2.0 / 10Critical✓ Tool-verified

Other · Code Health — Whether strict null checking is enabled and not undermined by heavy `!` assertion — TypeScript's `strictNullChecks` (which `strict` turns on) is what makes `string` exclude `null` and `undefined`, and the postfix `!` is the operator that silences it.

Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.

  • 0/4 of this repository's type-checking configuration(s) turn on strict null checking (`"strict": true`, or `"strictNullChecks": true`). A configuration that states neither is counted as OFF, because off is tsc's own default; a solution-style one whose `"files"` is empty and whose `"references"` point at other projects is in neither number, because it checks no source itself. Where it is off, `string` admits `null` and `undefined`: passing a value that is null compiles silently and throws on the first property access.

What to do

  • The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Turn null checking on where it is off — `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family — and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`).

Reference — by lens

The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.

LensScoreRatingImpact
Code Health51.3Adequate — gated by D2, X4, X5Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture95.3ExemplarySolid.
Maturity52.6Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness64.1Adequate — gated by R8Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security69.1Adequate — gated by D29Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance100.0ExemplaryStrongest area.
Unscored — 3 check(s) recorded observations but carry no score

These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.

  • P12 CI test-gate honesty — 1 observation(s) recorded · Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
  • SC1 Supply-chain hygiene — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not included — 61 check(s) not relevant to this codebase

These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.

  • AC1 Text alternatives — Frontend below the scale floor (2 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC2 Forms & labels — Frontend below the scale floor (2 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC3 Page structure — Frontend below the scale floor (2 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC4 Keyboard semantics — Frontend below the scale floor (2 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC5 ARIA correctness — Frontend below the scale floor (2 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC6 Visual & motion safety — Frontend below the scale floor (2 DOM element(s) < 25) — too little surface to assess accessibility.
  • AX1 Captive dependencies — Not applicable: this repository's Python imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's TypeScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No class in this Java code is a Spring, JSR-330 or CDI singleton bean. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — docker build failed (exit 1) — #0 building with "default" instance using docker driver #1 [internal] load build definition from REDACTED.md #1 transferring dockerfile: 2.98kB done #1 DONE 0.0s REDACTED.md:1 -------------------- 1 | >>> --- 2 | layout: default 3 | published: true -------------------- ERROR: failed to solve: dockerfile parse error on line 1: unknown instruction: ---; likely cause (the repository): the REDACTED does not parse: docker reports an instruction or option it does not know; runtime evidence skipped The cause is in the repository, not in our sandbox: the REDACTED does not parse: docker reports an instruction or option it does not know. Nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C2 Access Controls — No access-control surface detected in the analyzed source — this repository registers no route and starts no server another machine can reach (no Flask/FastAPI/Starlette route, Django urlpatterns or class-based view, Tornado handler). Access control is therefore N/A here — a library or command-line tool is authorized by the application that serves it, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
  • C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Django, SQLAlchemy, SQLModel, Peewee, Tortoise or MongoEngine model, a migration or a SQL schema — and no database or data-store client (Django ORM, SQLAlchemy, psycopg, PyMongo, …) in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a store configured outside this repository, for instance), the trail belongs to wherever that data is stored.
  • C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential on a Django, SQLAlchemy, SQLModel, Peewee, Tortoise or mongoengine model, in a migration or in a SQL schema — and no database or data-store client (django.db, sqlalchemy, psycopg2, pymongo, sqlite3, …) imported either, so this repository keeps no personal data whose lifetime a retention limit would bound.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential on a Django, SQLAlchemy, SQLModel, Peewee, Tortoise or mongoengine model, in a migration or in a SQL schema — and no database or data-store client (django.db, sqlalchemy, psycopg2, pymongo, sqlite3, …) imported either, so this repository keeps no personal data for a data subject to erase, export or consent over.
  • D10 Test Quality — ~102080 lines of test source are present (.py) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D11 Test Reliability — Test reliability not included — the .py suite was found but not re-run
  • D18 Solution Shape — D18 scores the shape of a .NET solution, but this repository's production source is mostly .py, .ts — the .NET project files present are an immaterial minority — so the dimension does not apply.
  • D20 ADR Quality — N/A — ADRs are expected on deployable products with a user-facing host, not consumed libraries; no ADR log is required here.
  • D21 Naming Consistency — Naming consistency does not read html yet; not measured.
  • D22 Internal API Consistency — No intentionally-exposed public API to evaluate for consistency.
  • D23 Boundary Type-Coupling — single shared-core project — no cross-context coupling to assess
  • D25 ADR Conformance — no ADRs to check
  • D26 Project Cohesion — This repository is one project, `Microsoft.NET.Sdk` (0 LoC, 0 public types across 0 namespaces), within the size bounds. Not scored: a single unit of this size gives project cohesion nothing to grade.
  • D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
  • D34 Knowledge Freshness — knowledge concentrated in recent work — freshness signal contradicted by repo activity
  • D42 Runtime Threat Enforcement — The repository ships application workloads but no cluster-governance resources (CRDs, admission webhooks, or a committed policy engine). Runtime threat-detection (Falco/Tetragon) and admission control (Kyverno/OPA-Gatekeeper/PodSecurity) are cluster-OPERATOR controls owned by the platform, not shipped by an application repo/chart — nothing for this repo to assess.
  • D7 Architectural Integrity — no checkable ADRs and no dependency cycles — architectural integrity not assessed
  • D8 Code Coverage — Coverage not measured
  • DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (48 value object(s))
  • ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust and Java, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — reported, not scored — this repository's C# declares no analysable method bodies (a constants, record or DTO assembly), and this score is a density of unfinished work per method, which has no denominator here. The file-level signals below were still collected and are shown in full
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JavaScript/TypeScript, Python source, so there is no service whose uptime a failing dependency could take down
  • P8 Schema migrations — no EF Core usage detected
  • P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for a pytest-benchmark or pytest-codspeed dependency with tests taking the `benchmark` fixture, an asv.conf.json with its `time_`/`mem_`/`peakmem_` benchmarks, or a pyperf Runner, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
  • R4 Test Coverage — no production JavaScript/TypeScript files to cover (223 test file(s) present) — nothing to measure
  • R6 Tooling — no package.json in the repository — test/lint/typecheck wiring is read from package.json scripts (corroborated against CI), so this project's own toolchain isn't measured here
  • S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X16 Unfloored truncation loop — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X2 Cancellation propagation — no C# was loaded; this repository's Python was read, and no request in it can be cancelled by a caller — a Python request takes no token: asyncio cancels the task and trio or anyio the scope that made it, from outside the call, and requests, httpx, aiohttp and gRPC take a timeout, not a cancellation
  • X20 Mistyped argument guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X21 Side-effecting pattern guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X29 Per-element action decided by a fixed element — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X7 Silent fallback defaults — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.

Critical — 54 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · High CVE · ×7
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D28 · Secrets (history) · High secret · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Critical vulnerability · ×1
  • REDACTED
D31 · IaC & Container Security · High IaC · ×1
  • REDACTED
R8 · Dependency Hygiene · Unlisted import '@aws-cdk/aws-apigateway' · ×1
  • Unlisted import '@aws-cdk/aws-apigateway' cdk_integration_tests/src/typescript/APIGatewayAuthorization/fail.ts:2 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import '@aws-cdk/aws-appsync' · ×1
  • Unlisted import '@aws-cdk/aws-appsync' cdk_integration_tests/src/typescript/AppSyncFieldLevelLogs/fail.ts:2 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import '@aws-cdk/aws-athena' · ×1
  • Unlisted import '@aws-cdk/aws-athena' cdk_integration_tests/src/typescript/AthenaWorkgroupConfiguration/fail.ts:2 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import '@aws-cdk/aws-cloudfront' · ×1
  • Unlisted import '@aws-cdk/aws-cloudfront' cdk_integration_tests/src/typescript/CloudFrontTLS12/fail.ts:2 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import '@aws-cdk/aws-rds' · ×1
  • Unlisted import '@aws-cdk/aws-rds' cdk_integration_tests/src/typescript/RDSMultiAZEnabled/fail.ts:2 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import '@aws-cdk/aws-redshift' · ×1
  • Unlisted import '@aws-cdk/aws-redshift' cdk_integration_tests/src/typescript/RedshiftClusterLogging/fail.ts:2 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import '@aws-cdk/aws-redshift-alpha' · ×1
  • Unlisted import '@aws-cdk/aws-redshift-alpha' cdk_integration_tests/src/typescript/RedshiftClusterEncryption/fail__2__.ts:1 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import '@aws-cdk/aws-s3' · ×1
  • Unlisted import '@aws-cdk/aws-s3' cdk_integration_tests/src/typescript/S3BlockPublicPolicy/fail.ts:2 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import '@aws-cdk/core' · ×1
  • Unlisted import '@aws-cdk/core' cdk_integration_tests/src/typescript/APIGatewayAuthorization/fail.ts:3 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import 'aws-cdk-lib' · ×1
  • Unlisted import 'aws-cdk-lib' cdk_integration_tests/src/typescript/ALBDropHttpHeaders/fail.ts:1 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import 'constructs' · ×1
  • Unlisted import 'constructs' cdk_integration_tests/src/typescript/ALBDropHttpHeaders/fail.ts:2 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import 'danger' · ×1
  • Unlisted import 'danger' dangerfile.ts:1 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Serious — 1148 finding(s)
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×23
  • Swallowed exception (caught, then discarded) checkov/terraform/parser_functions.py:208 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) checkov/terraform/graph_builder/variable_rendering/evaluate_terraform.py:110 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) checkov/terraform/graph_builder/variable_rendering/evaluate_terraform.py:175 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) checkov/terraform/checks/resource/gcp/AbsGoogleComputeFirewallUnrestrictedIngress.py:44 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) checkov/terraform/checks/resource/azure/GithubActionsOIDCTrustPolicy.py:72 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) checkov/terraform/checks/resource/aws/GithubActionsOIDCTrustPolicyOnRole.py:43 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) checkov/terraform/checks/resource/aws/GlacierVaultAnyPrincipal.py:33 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) checkov/terraform/checks/resource/aws/IAMRoleAllowAssumeFromAccount.py:37 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) checkov/terraform/checks/resource/alicloud/AbsSecurityGroupUnrestrictedIngress.py:50 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) checkov/serverless/parsers/parser.py:285 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) checkov/secrets/runner.py:755 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) checkov/secrets/plugins/custom_regex_detector.py:151 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) checkov/openapi/runner.py:94 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) checkov/common/version_manager.py:17 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) checkov/common/util/http_utils.py:209 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) checkov/common/util/parser_utils.py:321 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) checkov/common/util/parser_utils.py:329 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) checkov/common/util/type_forcers.py:35 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) checkov/common/util/type_forcers.py:44 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) checkov/common/util/update_checker/update_checker.py:132 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) checkov/common/external_checks/verification/verifier.py:51 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) checkov/cloudformation/checks/resource/aws/IAMRoleAllowAssumeFromAccount.py:35 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) checkov/cloudformation/checks/resource/aws/IAMRoleAllowsPublicAssume.py:24 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×20
  • Duplicated block (8 lines × 2) checkov/arm/checks/resource/NSGRulePortAccessRestricted.py:25 — checkov/arm/checks/resource/NSGRulePortAccessRestricted.py:25-32 | checkov/terraform/checks/resource/azure/NSGRulePortAccessRestricted.py:21-28 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) checkov/arm/runner.py:311 — checkov/arm/runner.py:311-318 | checkov/bicep/runner.py:259-266 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `checkov/arm/runner.py:311` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) checkov/cloudformation/checks/resource/aws/EC2PublicIP.py:24 — checkov/cloudformation/checks/resource/aws/EC2PublicIP.py:24-34 | checkov/cloudformation/checks/resource/aws/EC2PublicIP.py:39-46 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) checkov/cloudformation/runner.py:187 — checkov/cloudformation/runner.py:187-195 | checkov/cloudformation/runner.py:248-255 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `checkov/cloudformation/runner.py:187` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) checkov/common/runners/runner_registry.py:316 — checkov/common/runners/runner_registry.py:316-323 | checkov/common/runners/runner_registry.py:332-339 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) checkov/helm/base_registry.py:31 — checkov/helm/base_registry.py:31-38 | checkov/kubernetes/checks/resource/base_registry.py:30-37 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (8 lines × 2) checkov/kubernetes/checks/resource/k8s/ApiServerStrongCryptographicCiphers.py:25 — checkov/kubernetes/checks/resource/k8s/ApiServerStrongCryptographicCiphers.py:25-32 | checkov/kubernetes/checks/resource/k8s/KubeletCryptographicCiphers.py:26-33 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) checkov/openapi/checks/resource/v2/Oauth2OperationObjectPasswordFlow.py:38 — checkov/openapi/checks/resource/v2/Oauth2OperationObjectPasswordFlow.py:38-45 | checkov/openapi/checks/resource/v2/OperationObjectSecurityScopeUndefined.py:40-47 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) checkov/openapi/checks/resource/v2/OperationObjectConsumesUndefined.py:26 — checkov/openapi/checks/resource/v2/OperationObjectConsumesUndefined.py:26-33 | checkov/openapi/checks/resource/v2/OperationObjectProducesUndefined.py:28-35 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `checkov/openapi/checks/resource/v2/OperationObjectProducesUndefined.py:25` calls `isinstance` and `checkov/openapi/checks/resource/v2/OperationObjectConsumesUndefined.py:24` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 2) checkov/sca_image/runner.py:292 — checkov/sca_image/runner.py:292-299 | checkov/sca_image/runner.py:321-328 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) checkov/terraform/checks/resource/kubernetes/DockerSocketVolume.py:33 — checkov/terraform/checks/resource/kubernetes/DockerSocketVolume.py:33-40 | checkov/terraform/checks/resource/kubernetes/DockerSocketVolume.py:45-52 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (8 lines × 2) checkov/terraform/plan_parser.py:131 — checkov/terraform/plan_parser.py:131-138 | checkov/terraform_json/parser.py:165-172 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (8 lines × 2) checkov/terraform/tf_parser.py:463 — checkov/terraform/tf_parser.py:463-470 | checkov/terraform/tf_parser.py:485-492 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (8 lines × 2) checkov/terraform/checks/resource/aws/AbsNACLUnrestrictedIngress.py:71 — checkov/terraform/checks/resource/aws/AbsNACLUnrestrictedIngress.py:71-78 | checkov/terraform/checks/resource/aws/AbsNACLUnrestrictedIngress.py:79-86 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) checkov/terraform/checks/resource/tencentcloud/TKEPublicIpAssigned.py:15 — checkov/terraform/checks/resource/tencentcloud/TKEPublicIpAssigned.py:15-22 | checkov/terraform/checks/resource/tencentcloud/TKEPublicIpAssigned.py:24-31 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) checkov/common/runners/graph_builder/local_graph.py:44 — checkov/common/runners/graph_builder/local_graph.py:44-51 | checkov/dockerfile/graph_builder/local_graph.py:93-100 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) checkov/terraform/checks/resource/aws/APIGatewayV2RouteDefinesAuthorizationType.py:9 — checkov/terraform/checks/resource/aws/APIGatewayV2RouteDefinesAuthorizationType.py:9-16 | checkov/terraform/checks/resource/gcp/GoogleIAMWorkloadIdentityConditional.py:8-20 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (8 lines × 2) checkov/ansible/checks/task/aws/EC2EBSOptimized.py:11 — checkov/ansible/checks/task/aws/EC2EBSOptimized.py:11-18 | checkov/ansible/checks/task/aws/EC2PublicIP.py:11-18 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) checkov/terraform/checks/resource/base_resource_negative_value_check.py:25 — checkov/terraform/checks/resource/base_resource_negative_value_check.py:25-32 | checkov/terraform/checks/resource/base_resource_value_check.py:29-36 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) cdk_integration_tests/src/python/SecretManagerSecretEncrypted/fail__2__.py:6 — cdk_integration_tests/src/python/SecretManagerSecretEncrypted/fail__2__.py:6-13 | cdk_integration_tests/src/python/SecretManagerSecretEncrypted/pass.py:6-13 — before extracting anything, compare `cdk_integration_tests/src/python/SecretManagerSecretEncrypted/fail__2__.py` and `cdk_integration_tests/src/python/SecretManagerSecretEncrypted/pass.py` as WHOLE FILES: 92% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×14
  • Duplicated block (7 lines × 2) checkov/arm/parser/parser.py:67 — checkov/arm/parser/parser.py:67-73 | checkov/terraform_json/parser.py:70-76 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) checkov/common/images/image_referencer.py:228 — checkov/common/images/image_referencer.py:228-234 | checkov/sca_image/runner.py:295-301 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) checkov/common/sca/reachability/package_alias_mapping/nodejs/utils.py:40 — checkov/common/sca/reachability/package_alias_mapping/nodejs/utils.py:40-46 | checkov/common/sca/reachability/package_alias_mapping/nodejs/utils.py:135-141 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (7 lines × 2) checkov/secrets/runner.py:456 — checkov/secrets/runner.py:456-462 | checkov/secrets/runner.py:944-950 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) checkov/terraform/checks/resource/aws/APIGatewayMethodWOAuth.py:92 — checkov/terraform/checks/resource/aws/APIGatewayMethodWOAuth.py:92-98 | checkov/terraform/checks/resource/aws/S3SecureDataTransport.py:120-126 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `checkov/terraform/checks/resource/aws/APIGatewayMethodWOAuth.py:92` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (7 lines × 2) checkov/terraform/checks/resource/aws/AbsNACLUnrestrictedIngress.py:97 — checkov/terraform/checks/resource/aws/AbsNACLUnrestrictedIngress.py:97-103 | checkov/terraform/checks/resource/aws/AbsNACLUnrestrictedIngress.py:104-110 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) checkov/yaml_doc/runner.py:100 — checkov/yaml_doc/runner.py:100-106 | checkov/yaml_doc/runner.py:123-129 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `checkov/yaml_doc/runner.py:120` calls `isinstance`, `get` and `checkov/yaml_doc/runner.py:99` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) checkov/arm/checks/resource/VnetSingleDNSServer.py:19 — checkov/arm/checks/resource/VnetSingleDNSServer.py:19-25 | checkov/arm/checks/resource/VnetSingleDNSServer.py:27-33 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (7 lines × 2) checkov/terraform/checks/resource/aws/DLMScheduleCrossRegionEncryption.py:15 — checkov/terraform/checks/resource/aws/DLMScheduleCrossRegionEncryption.py:15-21 | checkov/terraform/checks/resource/aws/DLMScheduleCrossRegionEncryptionWithCMK.py:15-21 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) checkov/arm/checks/resource/VnetSingleDNSServer.py:10 — checkov/arm/checks/resource/VnetSingleDNSServer.py:10-16 | checkov/terraform/checks/resource/azure/VnetSingleDNSServer.py:11-17 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) checkov/helm/runner.py:182 — checkov/helm/runner.py:182-188 | checkov/kustomize/runner.py:401-407 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) checkov/terraform/checks/resource/alicloud/MongoDBIsPublic.py:14 — checkov/terraform/checks/resource/alicloud/MongoDBIsPublic.py:14-20 | checkov/terraform/checks/resource/alicloud/RDSIsPublic.py:14-20 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) checkov/terraform/checks/resource/gcp/GoogleComputeDefaultServiceAccountFullAccess.py:12 — checkov/terraform/checks/resource/gcp/GoogleComputeDefaultServiceAccountFullAccess.py:12-18 | checkov/terraform/checks/resource/gcp/GoogleComputeInstanceOSLogin.py:7-13 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) checkov/terraform/checks/resource/kubernetes/LivenessProbe.py:10 — checkov/terraform/checks/resource/kubernetes/LivenessProbe.py:10-16 | checkov/terraform/checks/resource/kubernetes/ReadinessProbe.py:10-16 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×13
  • Edited copy of a member (12 corresponding lines) checkov/terraform/checks/resource/aws/SecurityGroupRuleDescription.py:41 — checkov/terraform/checks/resource/aws/SecurityGroupRuleDescription.py:41-53 | checkov/terraform/checks/resource/ncp/AccessControlGroupRuleDescription.py:33-44 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) checkov/helm/runner.py:97 — checkov/helm/runner.py:97-110 | checkov/kustomize/runner.py:94-105 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) checkov/terraform/graph_builder/graph_components/module.py:159 — checkov/terraform/graph_builder/graph_components/module.py:159-170 | checkov/terraform/graph_builder/graph_components/module.py:173-184 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) checkov/terraform/checks/resource/alicloud/RDSRetention.py:22 — checkov/terraform/checks/resource/alicloud/RDSRetention.py:22-33 | checkov/terraform/checks/resource/aws/SQSQueueEncryption.py:18-30 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) checkov/kubernetes/checks/resource/k8s/LivenessProbe.py:9 — checkov/kubernetes/checks/resource/k8s/LivenessProbe.py:9-20 | checkov/kubernetes/checks/resource/k8s/ReadinessProbe.py:9-20 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) cdk_integration_tests/src/python/APIGatewayAuthorization/fail__1__.py:6 — cdk_integration_tests/src/python/APIGatewayAuthorization/fail__1__.py:6-17 | cdk_integration_tests/src/python/APIGatewayAuthorization/pass.py:6-17 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) cdk_integration_tests/src/python/LambdaFunctionLevelConcurrentExecutionLimit/fail__2__.py:8 — cdk_integration_tests/src/python/LambdaFunctionLevelConcurrentExecutionLimit/fail__2__.py:8-19 | cdk_integration_tests/src/python/LambdaFunctionLevelConcurrentExecutionLimit/pass.py:8-20 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) cdk_integration_tests/src/python/DocDBEncryption/fail__1__.py:7 — cdk_integration_tests/src/python/DocDBEncryption/fail__1__.py:7-18 | cdk_integration_tests/src/python/DocDBEncryption/pass.py:7-19 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) cdk_integration_tests/src/python/LambdaFunctionLevelConcurrentExecutionLimit/fail__2__.py:23 — cdk_integration_tests/src/python/LambdaFunctionLevelConcurrentExecutionLimit/fail__2__.py:23-34 | cdk_integration_tests/src/python/LambdaFunctionLevelConcurrentExecutionLimit/pass.py:24-36 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) cdk_integration_tests/src/python/RedshiftClusterEncryption/fail__1__.py:7 — cdk_integration_tests/src/python/RedshiftClusterEncryption/fail__1__.py:7-18 | cdk_integration_tests/src/python/RedshiftClusterEncryption/pass.py:7-19 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) cdk_integration_tests/src/python/SecurityGroupRuleDescription/fail__4__.py:57 — cdk_integration_tests/src/python/SecurityGroupRuleDescription/fail__4__.py:57-68 | cdk_integration_tests/src/python/SecurityGroupRuleDescription/pass.py:57-69 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) cdk_integration_tests/src/python/SecurityGroupRuleDescription/fail__4__.py:76 — cdk_integration_tests/src/python/SecurityGroupRuleDescription/fail__4__.py:76-87 | cdk_integration_tests/src/python/SecurityGroupRuleDescription/pass.py:77-89 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) cdk_integration_tests/src/python/RedshiftClusterPubliclyAccessible/fail__1__.py:7 — cdk_integration_tests/src/python/RedshiftClusterPubliclyAccessible/fail__1__.py:7-18 | cdk_integration_tests/src/python/RedshiftClusterPubliclyAccessible/pass.py:7-18 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×13
  • Edited copy of a member (11 corresponding lines) checkov/terraform/checks/resource/aws/ElasticsearchDomainAuditLogging.py:18 — checkov/terraform/checks/resource/aws/ElasticsearchDomainAuditLogging.py:18-28 | checkov/terraform/checks/resource/aws/ElasticsearchDomainHA.py:21-35 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) checkov/terraform/image_referencer/provider/aws.py:60 — checkov/terraform/image_referencer/provider/aws.py:60-70 | checkov/terraform/image_referencer/provider/aws.py:74-84 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) checkov/common/checks_infra/solvers/connections_solvers/connection_exists_solver.py:44 — checkov/common/checks_infra/solvers/connections_solvers/connection_exists_solver.py:44-54 | checkov/common/checks_infra/solvers/connections_solvers/connection_not_exists_solver.py:32-42 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) cdk_integration_tests/src/python/DynamodbRecovery/fail__1__.py:7 — cdk_integration_tests/src/python/DynamodbRecovery/fail__1__.py:7-17 | cdk_integration_tests/src/python/DynamodbRecovery/pass.py:7-17 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) cdk_integration_tests/src/python/S3PublicACLRead/fail__3__.py:11 — cdk_integration_tests/src/python/S3PublicACLRead/fail__3__.py:11-26 | cdk_integration_tests/src/python/S3PublicACLWrite/fail__2__.py:11-21 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) cdk_integration_tests/src/python/S3RestrictPublicBuckets/fail__2__.py:7 — cdk_integration_tests/src/python/S3RestrictPublicBuckets/fail__2__.py:7-17 | cdk_integration_tests/src/python/S3RestrictPublicBuckets/pass.py:7-17 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) cdk_integration_tests/src/python/DAXEncryption/pass.py:6 — cdk_integration_tests/src/python/DAXEncryption/pass.py:6-20 | cdk_integration_tests/src/python/DAXEncryption/fail__1__.py:6-16 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) cdk_integration_tests/src/python/EBSEncryption/fail__1__.py:7 — cdk_integration_tests/src/python/EBSEncryption/fail__1__.py:7-17 | cdk_integration_tests/src/python/EBSEncryption/pass.py:7-17 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) cdk_integration_tests/src/python/AmazonMQBrokerPublicAccess/fail__1__.py:7 — cdk_integration_tests/src/python/AmazonMQBrokerPublicAccess/fail__1__.py:7-17 | cdk_integration_tests/src/python/AmazonMQBrokerPublicAccess/pass.py:7-17 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) cdk_integration_tests/src/python/RDSMultiAZEnabled/fail__1__.py:6 — cdk_integration_tests/src/python/RDSMultiAZEnabled/fail__1__.py:6-16 | cdk_integration_tests/src/python/RDSMultiAZEnabled/pass.py:6-16 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) cdk_integration_tests/src/python/RedshiftClusterLogging/fail__1__.py:6 — cdk_integration_tests/src/python/RedshiftClusterLogging/fail__1__.py:6-16 | cdk_integration_tests/src/python/RedshiftClusterLogging/pass.py:6-19 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) cdk_integration_tests/src/python/DMSReplicationInstancePubliclyAccessible/fail__1__.py:6 — cdk_integration_tests/src/python/DMSReplicationInstancePubliclyAccessible/fail__1__.py:6-16 | cdk_integration_tests/src/python/DMSReplicationInstancePubliclyAccessible/pass.py:6-16 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) cdk_integration_tests/src/python/S3BucketEncryption/fail__2__.py:6 — cdk_integration_tests/src/python/S3BucketEncryption/fail__2__.py:6-17 | cdk_integration_tests/src/python/S3BucketVersioning/fail__2__.py:6-16 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×13
  • Duplicated block (11 lines × 2) checkov/bitbucket/dal.py:24 — checkov/bitbucket/dal.py:24-34 | checkov/gitlab/dal.py:26-36 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (11 lines × 2) checkov/helm/runner.py:50 — checkov/helm/runner.py:50-60 | checkov/kustomize/runner.py:70-80 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) checkov/kubernetes/checks/resource/k8s/CPURequests.py:15 — checkov/kubernetes/checks/resource/k8s/CPURequests.py:15-25 | checkov/kubernetes/checks/resource/k8s/MemoryRequests.py:15-25 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) checkov/kubernetes/checks/resource/k8s/ControllerManagerBindAddress.py:14 — checkov/kubernetes/checks/resource/k8s/ControllerManagerBindAddress.py:14-24 | checkov/kubernetes/checks/resource/k8s/SchedulerBindAddress.py:14-24 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) checkov/openapi/checks/resource/v2/OperationObjectBasicAuth.py:39 — checkov/openapi/checks/resource/v2/OperationObjectBasicAuth.py:39-49 | checkov/openapi/checks/resource/v2/OperationObjectImplicitFlow.py:41-51 — before extracting anything, compare `checkov/openapi/checks/resource/v2/OperationObjectBasicAuth.py` and `checkov/openapi/checks/resource/v2/OperationObjectImplicitFlow.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) checkov/openapi/checks/resource/v2/OperationObjectProducesUndefined.py:25 — checkov/openapi/checks/resource/v2/OperationObjectProducesUndefined.py:25-35 | checkov/openapi/checks/resource/v2/OperationObjectSecurityScopeUndefined.py:26-36 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) checkov/terraform/checks/resource/kubernetes/PodSecurityContext.py:27 — checkov/terraform/checks/resource/kubernetes/PodSecurityContext.py:27-37 | checkov/terraform/checks/resource/kubernetes/PodSecurityContext.py:43-53 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) checkov/cloudformation/checks/resource/aws/AppSyncFieldLevelLogs.py:9 — checkov/cloudformation/checks/resource/aws/AppSyncFieldLevelLogs.py:9-19 | checkov/terraform/checks/resource/aws/AppSyncFieldLevelLogs.py:9-19 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (11 lines × 2) checkov/cloudformation/checks/resource/aws/CloudWatchLogGroupRetention.py:8 — checkov/cloudformation/checks/resource/aws/CloudWatchLogGroupRetention.py:8-18 | checkov/terraform/checks/resource/aws/CloudWatchLogGroupRetention.py:8-18 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (11 lines × 2) checkov/cloudformation/checks/resource/aws/QLDBLedgerPermissionsMode.py:7 — checkov/cloudformation/checks/resource/aws/QLDBLedgerPermissionsMode.py:7-17 | checkov/terraform/checks/resource/aws/QLDBLedgerPermissionsMode.py:7-17 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (11 lines × 2) checkov/terraform/checks/resource/aws/IAMAdminPolicyDocument.py:12 — checkov/terraform/checks/resource/aws/IAMAdminPolicyDocument.py:12-22 | checkov/terraform/checks/resource/aws/IAMStarActionPolicyDocument.py:11-21 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (11 lines × 2) checkov/terraform/checks/resource/azure/CDNDisableHttpEndpoints.py:12 — checkov/terraform/checks/resource/azure/CDNDisableHttpEndpoints.py:12-22 | checkov/terraform/checks/resource/azure/CDNTLSProtocol12.py:14-24 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (11 lines × 2) cdk_integration_tests/src/python/EKSSecretsEncryption/fail__1__.py:6 — cdk_integration_tests/src/python/EKSSecretsEncryption/fail__1__.py:6-16 | cdk_integration_tests/src/python/EKSSecretsEncryption/pass.py:6-16 — before extracting anything, compare `cdk_integration_tests/src/python/EKSSecretsEncryption/fail__1__.py` and `cdk_integration_tests/src/python/EKSSecretsEncryption/pass.py` as WHOLE FILES: 93% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `cdk_integration_tests/src/python/EKSSecretsEncryption/fail__1__.py:6` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×13
  • Duplicated block (6 lines × 2) checkov/arm/graph_builder/graph_to_definitions.py:24 — checkov/arm/graph_builder/graph_to_definitions.py:24-29 | checkov/serverless/graph_builder/graph_to_definitions.py:45-51 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 2) checkov/common/checks_infra/solvers/attribute_solvers/base_attribute_solver.py:54 — checkov/common/checks_infra/solvers/attribute_solvers/base_attribute_solver.py:54-60 | checkov/common/checks_infra/solvers/attribute_solvers/base_attribute_solver.py:63-68 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 2) checkov/terraform/checks/resource/aws/ECSContainerHostProcess.py:20 — checkov/terraform/checks/resource/aws/ECSContainerHostProcess.py:20-25 | checkov/terraform/checks/resource/aws/ECSContainerPrivilege.py:21-26 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) checkov/terraform/checks/resource/aws/LBTargetGroupsDefinesHealthcheck.py:25 — checkov/terraform/checks/resource/aws/LBTargetGroupsDefinesHealthcheck.py:25-30 | checkov/terraform/checks/resource/ncp/LBTargetGroupDefinesHealthCheck.py:18-23 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 2) checkov/terraform/checks/resource/kubernetes/ImageDigest.py:38 — checkov/terraform/checks/resource/kubernetes/ImageDigest.py:38-43 | checkov/terraform/checks/resource/kubernetes/Tiller.py:64-69 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) checkov/arm/graph_builder/definition_context.py:44 — checkov/arm/graph_builder/definition_context.py:44-49 | checkov/serverless/graph_builder/definition_context.py:60-65 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) checkov/sast/engines/prisma_engine.py:392 — checkov/sast/engines/prisma_engine.py:392-397 | checkov/sast/engines/prisma_engine.py:405-410 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) checkov/terraform/graph_builder/utils.py:350 — checkov/terraform/graph_builder/utils.py:350-355 | checkov/terraform/graph_builder/utils.py:362-367 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `checkov/terraform/graph_builder/utils.py:350` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 2) checkov/terraform/checks/data/aws/IAMCredentialsExposure.py:15 — checkov/terraform/checks/data/aws/IAMCredentialsExposure.py:15-20 | checkov/terraform/checks/resource/aws/IAMCredentialsExposure.py:15-20 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) checkov/cloudformation/checks/resource/aws/RDSEncryption.py:16 — checkov/cloudformation/checks/resource/aws/RDSEncryption.py:16-21 | checkov/cloudformation/checks/resource/aws/RDSMultiAZEnabled.py:16-21 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) checkov/common/parsers/yaml/loader.py:49 — checkov/common/parsers/yaml/loader.py:49-54 | checkov/kubernetes/parser/k8_yaml.py:60-65 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 2) checkov/terraform/checks/provider/aws/credentials.py:29 — checkov/terraform/checks/provider/aws/credentials.py:29-34 | checkov/terraform/checks/provider/ncp/credentials.py:29-34 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) checkov/terraform/checks/provider/bridgecrew/credentials.py:23 — checkov/terraform/checks/provider/bridgecrew/credentials.py:23-28 | checkov/terraform/checks/provider/linode/credentials.py:23-28 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `pattern` to `str` in one and `Pattern[str]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
X17 · Uncapped recursion over a caller-supplied document · Recursive walk over a caller-supplied document has no depth cap · ×13
  • Recursive walk over a caller-supplied document has no depth cap checkov/terraform_json/parser.py:173 — `hclify` is public and takes `obj: dict[str, Any]` from its caller, and it calls itself at line 173 (`hclify`) with a piece of `obj` (and at line 179) — and nowhere in `hclify` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `hclify` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap checkov/terraform/graph_builder/variable_rendering/evaluate_terraform.py:120 — `replace_string_value` is public and takes `original_str: Any` from its caller, and it calls itself at line 120 (`replace_string_value`) with a piece of `original_str` — and nowhere in `replace_string_value` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `replace_string_value` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap checkov/terraform/graph_builder/variable_rendering/renderer.py:215 — `extract_value_from_vertex` is public and takes `attributes: Dict[str, Any]` from its caller, and it calls itself at line 215 (`self.extract_value_from_vertex`) with a piece of `attributes` — and nowhere in `extract_value_from_vertex` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `extract_value_from_vertex` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap checkov/terraform/graph_builder/variable_rendering/renderer.py:567 — `evaluate_value` is public and takes `val: Any` from its caller, and it calls itself at line 567 (`self.evaluate_value`) with a piece of `val` (and at line 571, line 579, line 580) — and nowhere in `evaluate_value` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `evaluate_value` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap checkov/openapi/checks/resource/generic/NoMaximumNumberItems.py:32 — `check_array_max_items` is public and takes `inner_conf: Any` from its caller, and it calls itself at line 32 (`self.check_array_max_items`) with a piece of `inner_conf` (and at line 37) — and nowhere in `check_array_max_items` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `check_array_max_items` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap checkov/common/util/parser_utils.py:68 — `is_acceptable_module_param` is public and takes `value: Any` from its caller, and it calls itself at line 68 (`is_acceptable_module_param`) with a piece of `value` (and at line 73) — and nowhere in `is_acceptable_module_param` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `is_acceptable_module_param` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap checkov/common/util/prompt.py:166 — `prompt` is public and takes `prompt_map: dict[str, Any] | None` from its caller, and it calls itself at line 166 (`self.prompt`) with a piece of `prompt_map` — and nowhere in `prompt` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `prompt` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap checkov/common/util/type_forcers.py:76 — `force_dict` is public and takes `obj: Any` from its caller, and it calls itself at line 76 (`force_dict`) with a piece of `obj` — and nowhere in `force_dict` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `force_dict` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap checkov/common/graph/graph_builder/utils.py:70 — `adjust_value` is public and takes `value: Any` from its caller, and it calls itself at line 70 (`adjust_value`) with a piece of `value` — and nowhere in `adjust_value` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `adjust_value` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap checkov/common/graph/graph_builder/utils.py:79 — `to_list` is public and takes `data: Any` from its caller, and it calls itself at line 79 (`to_list`) with a piece of `data` (and at line 81) — and nowhere in `to_list` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `to_list` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap checkov/cloudformation/context_parser.py:110 — `find_lines` is public and takes `node: Any` from its caller, and it calls itself at line 110 (`self.find_lines`) with a piece of `node` — and nowhere in `find_lines` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `find_lines` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap checkov/arm/context_parser.py:171 — `search_deep_keys` is public and takes `arm_dict: dict[str, Any]` from its caller, and it calls itself at line 171 (`self.search_deep_keys`) with a piece of `arm_dict` (and at line 176, line 181) — and nowhere in `search_deep_keys` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `search_deep_keys` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap checkov/arm/context_parser.py:201 — `search_deep_values` is public and takes `arm_dict: dict[str, Any]` from its caller, and it calls itself at line 201 (`self.search_deep_values`) with a piece of `arm_dict` (and at line 206, line 211) — and nowhere in `search_deep_values` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `search_deep_values` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×12
  • Duplicated block (12 lines × 2) checkov/cloudformation/context_parser.py:151 — checkov/cloudformation/context_parser.py:151-162 | REDACTED:42-53 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (12 lines × 2) checkov/github_actions/checks/job/CosignArtifacts.py:41 — checkov/github_actions/checks/job/CosignArtifacts.py:41-52 | checkov/github_actions/checks/job/CosignSBOM.py:41-52 — before extracting anything, compare `checkov/github_actions/checks/job/CosignArtifacts.py` and `checkov/github_actions/checks/job/CosignSBOM.py` as WHOLE FILES: 84% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) checkov/kubernetes/checks/resource/k8s/ApiServerAuthorizationModeNode.py:14 — checkov/kubernetes/checks/resource/k8s/ApiServerAuthorizationModeNode.py:14-25 | checkov/kubernetes/checks/resource/k8s/ApiServerAuthorizationModeRBAC.py:14-25 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) checkov/kubernetes/checks/resource/k8s/KubeControllerManagerRootCAFile.py:14 — checkov/kubernetes/checks/resource/k8s/KubeControllerManagerRootCAFile.py:14-25 | checkov/kubernetes/checks/resource/k8s/KubeControllerManagerServiceAccountPrivateKeyFile.py:14-25 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) checkov/policies_3d/runner.py:138 — checkov/policies_3d/runner.py:138-149 | checkov/policies_3d/runner.py:301-312 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) checkov/terraform/checks/resource/aws/RDSPostgreSQLLogFDWExtension.py:29 — checkov/terraform/checks/resource/aws/RDSPostgreSQLLogFDWExtension.py:29-40 | checkov/terraform/checks/resource/aws/RDSPostgreSQLLogFDWExtension.py:67-78 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) checkov/terraform/checks/resource/kubernetes/LivenessProbe.py:35 — checkov/terraform/checks/resource/kubernetes/LivenessProbe.py:35-46 | checkov/terraform/checks/resource/kubernetes/ReadinessProbe.py:39-50 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `checkov/terraform/checks/resource/kubernetes/ReadinessProbe.py:38` calls `isinstance` and `checkov/terraform/checks/resource/kubernetes/LivenessProbe.py:33` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12 lines × 2) checkov/terraform/checks/resource/aws/ACMCertCreateBeforeDestroy.py:8 — checkov/terraform/checks/resource/aws/ACMCertCreateBeforeDestroy.py:8-19 | checkov/terraform/checks/resource/aws/SagemakerNotebookInCustomVPC.py:8-24 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (12 lines × 2) cdk_integration_tests/src/python/DocDBAuditLogs/fail__1__.py:7 — cdk_integration_tests/src/python/DocDBAuditLogs/fail__1__.py:7-18 | cdk_integration_tests/src/python/DocDBAuditLogs/pass.py:7-18 — before extracting anything, compare `cdk_integration_tests/src/python/DocDBAuditLogs/fail__1__.py` and `cdk_integration_tests/src/python/DocDBAuditLogs/pass.py` as WHOLE FILES: 93% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) cdk_integration_tests/src/python/DocDBTLS/fail__1__.py:6 — cdk_integration_tests/src/python/DocDBTLS/fail__1__.py:6-17 | cdk_integration_tests/src/python/DocDBTLS/pass.py:6-17 — before extracting anything, compare `cdk_integration_tests/src/python/DocDBTLS/fail__1__.py` and `cdk_integration_tests/src/python/DocDBTLS/pass.py` as WHOLE FILES: 93% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) cdk_integration_tests/src/python/ElasticsearchEncryption/fail__1__.py:6 — cdk_integration_tests/src/python/ElasticsearchEncryption/fail__1__.py:6-17 | cdk_integration_tests/src/python/ElasticsearchEncryption/pass.py:6-17 — before extracting anything, compare `cdk_integration_tests/src/python/ElasticsearchEncryption/fail__1__.py` and `cdk_integration_tests/src/python/ElasticsearchEncryption/pass.py` as WHOLE FILES: 93% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) cdk_integration_tests/src/python/ElasticsearchNodeToNodeEncryption/fail__1__.py:6 — cdk_integration_tests/src/python/ElasticsearchNodeToNodeEncryption/fail__1__.py:6-17 | cdk_integration_tests/src/python/ElasticsearchNodeToNodeEncryption/pass.py:6-17 — before extracting anything, compare `cdk_integration_tests/src/python/ElasticsearchNodeToNodeEncryption/fail__1__.py` and `cdk_integration_tests/src/python/ElasticsearchNodeToNodeEncryption/pass.py` as WHOLE FILES: 93% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×12
  • Duplicated block (9 lines × 2) checkov/arm/context_parser.py:146 — checkov/arm/context_parser.py:146-154 | checkov/common/util/suppression.py:45-53 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (9 lines × 2) checkov/common/bridgecrew/wrapper.py:198 — checkov/common/bridgecrew/wrapper.py:198-206 | checkov/common/bridgecrew/wrapper.py:224-232 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `checkov/common/bridgecrew/wrapper.py:198` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) checkov/terraform/image_referencer/provider/aws.py:74 — checkov/terraform/image_referencer/provider/aws.py:74-82 | checkov/terraform/image_referencer/provider/aws.py:98-106 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) checkov/terraform/tf_parser.py:324 — checkov/terraform/tf_parser.py:324-332 | checkov/terraform/tf_parser.py:354-362 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) checkov/common/runners/graph_builder/local_graph.py:24 — checkov/common/runners/graph_builder/local_graph.py:24-32 | checkov/dockerfile/graph_builder/local_graph.py:32-40 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (9 lines × 2) checkov/terraform/checks/resource/aws/APIGatewayMethodWOAuth.py:101 — checkov/terraform/checks/resource/aws/APIGatewayMethodWOAuth.py:101-109 | checkov/terraform/checks/resource/aws/S3SecureDataTransport.py:139-147 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (9 lines × 2) checkov/ansible/utils.py:71 — checkov/ansible/utils.py:71-79 | checkov/github_actions/utils.py:27-35 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (9 lines × 2) checkov/arm/checks/resource/WinVMEncryptionAtHost.py:7 — checkov/arm/checks/resource/WinVMEncryptionAtHost.py:7-18 | checkov/terraform/checks/resource/azure/AppGWDefinesSecureProtocols.py:39-47 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (9 lines × 2) checkov/cloudformation/image_referencer/provider/aws.py:54 — checkov/cloudformation/image_referencer/provider/aws.py:54-62 | checkov/terraform/image_referencer/provider/aws.py:48-56 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (9 lines × 2) checkov/github/base_github_negative_branch_security.py:20 — checkov/github/base_github_negative_branch_security.py:20-28 | checkov/github/base_github_org_check.py:15-23 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) checkov/terraform/checks/provider/aws/credentials.py:18 — checkov/terraform/checks/provider/aws/credentials.py:18-26 | checkov/terraform/checks/provider/ncp/credentials.py:18-26 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (9 lines × 2) cdk_integration_tests/src/python/CodeBuildProjectEncryption/fail__1__.py:6 — cdk_integration_tests/src/python/CodeBuildProjectEncryption/fail__1__.py:6-14 | cdk_integration_tests/src/python/CodeBuildProjectEncryption/pass.py:6-14 — before extracting anything, compare `cdk_integration_tests/src/python/CodeBuildProjectEncryption/fail__1__.py` and `cdk_integration_tests/src/python/CodeBuildProjectEncryption/pass.py` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `cdk_integration_tests/src/python/CodeBuildProjectEncryption/fail__1__.py:6` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×11
  • Duplicated block (15 lines × 2) checkov/cloudformation/checks/resource/aws/IAMAdminPolicyDocument.py:26 — checkov/cloudformation/checks/resource/aws/IAMAdminPolicyDocument.py:26-40 | checkov/cloudformation/checks/resource/aws/IAMStarActionPolicyDocument.py:27-41 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) checkov/terraform/checks/resource/aws/ElasticBeanstalkUseEnhancedHealthChecks.py:19 — checkov/terraform/checks/resource/aws/ElasticBeanstalkUseEnhancedHealthChecks.py:19-33 | checkov/terraform/checks/resource/aws/ElasticBeanstalkUseManagedUpdates.py:18-32 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) checkov/arm/checks/resource/AzureFirewallDenyThreatIntelMode.py:9 — checkov/arm/checks/resource/AzureFirewallDenyThreatIntelMode.py:9-23 | checkov/terraform/checks/resource/azure/AzureFirewallDenyThreatIntelMode.py:11-25 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (15 lines × 2) checkov/terraform/checks/resource/aws/Ec2TransitGatewayAutoAccept.py:8 — checkov/terraform/checks/resource/aws/Ec2TransitGatewayAutoAccept.py:8-22 | checkov/terraform/checks/resource/aws/SSMDocumentsArePrivate.py:9-25 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (15 lines × 2) checkov/terraform/checks/resource/aws/RedshiftClusterUseEnhancedVPCRouting.py:7 — checkov/terraform/checks/resource/aws/RedshiftClusterUseEnhancedVPCRouting.py:7-21 | checkov/terraform/checks/resource/aws/SagemakerNotebookRoot.py:8-23 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (15 lines × 2) checkov/terraform/checks/resource/azure/AKSEphemeralOSDisks.py:8 — checkov/terraform/checks/resource/azure/AKSEphemeralOSDisks.py:8-31 | checkov/terraform/checks/resource/azure/AKSOnlyCriticalPodsOnSystemNodes.py:7-21 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (15 lines × 2) checkov/terraform/checks/resource/azure/AppGWUseWAFMode.py:9 — checkov/terraform/checks/resource/azure/AppGWUseWAFMode.py:9-23 | checkov/terraform/checks/resource/azure/FrontdoorUseWAFMode.py:9-23 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (15 lines × 2) cdk_integration_tests/src/python/AthenaWorkgroupConfiguration/fail__1__.py:7 — cdk_integration_tests/src/python/AthenaWorkgroupConfiguration/fail__1__.py:7-21 | cdk_integration_tests/src/python/AthenaWorkgroupConfiguration/pass.py:7-21 — before extracting anything, compare `cdk_integration_tests/src/python/AthenaWorkgroupConfiguration/fail__1__.py` and `cdk_integration_tests/src/python/AthenaWorkgroupConfiguration/pass.py` as WHOLE FILES: 95% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `cdk_integration_tests/src/python/AthenaWorkgroupConfiguration/fail__1__.py:7` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) cdk_integration_tests/src/python/ElasticacheReplicationGroupEncryptionAtRest/fail__1__.py:7 — cdk_integration_tests/src/python/ElasticacheReplicationGroupEncryptionAtRest/fail__1__.py:7-21 | cdk_integration_tests/src/python/ElasticacheReplicationGroupEncryptionAtRest/pass.py:7-21 — before extracting anything, compare `cdk_integration_tests/src/python/ElasticacheReplicationGroupEncryptionAtRest/fail__1__.py` and `cdk_integration_tests/src/python/ElasticacheReplicationGroupEncryptionAtRest/pass.py` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `cdk_integration_tests/src/python/ElasticacheReplicationGroupEncryptionAtRest/fail__1__.py:7` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) cdk_integration_tests/src/python/ALBDropHttpHeaders/fail__1__.py:6 — cdk_integration_tests/src/python/ALBDropHttpHeaders/fail__1__.py:6-20 | cdk_integration_tests/src/python/ALBDropHttpHeaders/pass.py:6-20 — before extracting anything, compare `cdk_integration_tests/src/python/ALBDropHttpHeaders/fail__1__.py` and `cdk_integration_tests/src/python/ALBDropHttpHeaders/pass.py` as WHOLE FILES: 94% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) cdk_integration_tests/src/python/DynamodbGlobalTableRecovery/fail__1__.py:6 — cdk_integration_tests/src/python/DynamodbGlobalTableRecovery/fail__1__.py:6-20 | cdk_integration_tests/src/python/DynamodbGlobalTableRecovery/pass.py:6-20 — before extracting anything, compare `cdk_integration_tests/src/python/DynamodbGlobalTableRecovery/fail__1__.py` and `cdk_integration_tests/src/python/DynamodbGlobalTableRecovery/pass.py` as WHOLE FILES: 92% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×11
  • Duplicated block (10 lines × 2) checkov/arm/parser/parser.py:35 — checkov/arm/parser/parser.py:35-44 | checkov/terraform_json/parser.py:42-51 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (10 lines × 2) checkov/cloudformation/image_referencer/provider/aws.py:79 — checkov/cloudformation/image_referencer/provider/aws.py:79-88 | checkov/terraform/image_referencer/provider/gcp.py:19-28 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (10 lines × 2) checkov/helm/base_registry.py:59 — checkov/helm/base_registry.py:59-68 | checkov/helm/base_registry.py:72-81 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) checkov/helm/base_registry.py:87 — checkov/helm/base_registry.py:87-96 | checkov/kubernetes/checks/resource/base_registry.py:80-89 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (10 lines × 2) checkov/kubernetes/checks/resource/k8s/KubeControllerManagerBlockProfiles.py:14 — checkov/kubernetes/checks/resource/k8s/KubeControllerManagerBlockProfiles.py:14-23 | checkov/kubernetes/checks/resource/k8s/KubeControllerManagerServiceAccountCredentials.py:14-23 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) checkov/openapi/checks/resource/v2/Oauth2SecurityPasswordFlow.py:27 — checkov/openapi/checks/resource/v2/Oauth2SecurityPasswordFlow.py:27-36 | checkov/openapi/checks/resource/v2/OperationObjectImplicitFlow.py:38-47 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `checkov/openapi/checks/resource/v2/Oauth2SecurityPasswordFlow.py:37` calls `lower`, `get` and `checkov/openapi/checks/resource/v2/OperationObjectImplicitFlow.py:48` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 2) checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogMinDuration.py:39 — checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogMinDuration.py:39-48 | checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogTemp.py:38-47 — before extracting anything, compare `checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogMinDuration.py` and `checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogTemp.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) checkov/common/bridgecrew/platform_integration.py:641 — checkov/common/bridgecrew/platform_integration.py:641-650 | checkov/common/bridgecrew/platform_integration.py:655-664 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (10 lines × 2) checkov/terraform/checks/resource/aws/ElasticacheHasSecurityGroup.py:7 — checkov/terraform/checks/resource/aws/ElasticacheHasSecurityGroup.py:7-16 | checkov/terraform/checks/resource/aws/RDSHasSecurityGroup.py:7-16 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (10 lines × 2) checkov/common/images/image_referencer.py:253 — checkov/common/images/image_referencer.py:253-262 | checkov/sca_image/runner.py:334-343 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) cdk_integration_tests/src/python/S3PublicACLRead/pass.py:11 — cdk_integration_tests/src/python/S3PublicACLRead/pass.py:11-20 | cdk_integration_tests/src/python/S3PublicACLWrite/pass.py:11-20 — `cdk_integration_tests/src/python/S3PublicACLRead/pass.py` and `cdk_integration_tests/src/python/S3PublicACLWrite/pass.py` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 1 separate duplicated blocks between them, totalling at least 10 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×10
  • Edited copy of a member (13 corresponding lines) checkov/common/runners/graph_builder/local_graph.py:21 — checkov/common/runners/graph_builder/local_graph.py:21-33 | checkov/dockerfile/graph_builder/local_graph.py:29-41 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) checkov/arm/checks/resource/AzureInstancePassword.py:16 — checkov/arm/checks/resource/AzureInstancePassword.py:16-28 | checkov/arm/checks/resource/AzureScaleSetPassword.py:16-29 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) checkov/arm/utils.py:53 — checkov/arm/utils.py:53-65 | checkov/bicep/utils.py:75-90 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) checkov/bitbucket/dal.py:24 — checkov/bitbucket/dal.py:24-36 | checkov/gitlab/dal.py:26-39 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) checkov/terraform/checks/resource/aws/SecurityGroupRuleDescription.py:22 — checkov/terraform/checks/resource/aws/SecurityGroupRuleDescription.py:22-38 | checkov/terraform/checks/resource/ncp/AccessControlGroupRuleDescription.py:17-29 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) checkov/arm/graph_builder/variable_rendering/renderer.py:57 — checkov/arm/graph_builder/variable_rendering/renderer.py:57-69 | checkov/bicep/graph_builder/variable_rendering/renderer.py:41-53 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) checkov/arm/checks/resource/AppServicePlanZoneRedundant.py:7 — checkov/arm/checks/resource/AppServicePlanZoneRedundant.py:7-19 | checkov/arm/checks/resource/SQLDatabaseZoneRedundant.py:9-37 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) checkov/terraform/checks/resource/aws/ACMCertSetLoggingPreference.py:9 — checkov/terraform/checks/resource/aws/ACMCertSetLoggingPreference.py:9-21 | checkov/terraform/checks/resource/aws/ECSServicePublicIP.py:8-24 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) cdk_integration_tests/src/python/LambdaEnvironmentEncryptionSettings/fail__2__.py:27 — cdk_integration_tests/src/python/LambdaEnvironmentEncryptionSettings/fail__2__.py:27-39 | cdk_integration_tests/src/python/LambdaEnvironmentEncryptionSettings/pass.py:28-41 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) cdk_integration_tests/src/python/CloudTrailLogValidation/fail__1__.py:8 — cdk_integration_tests/src/python/CloudTrailLogValidation/fail__1__.py:8-20 | cdk_integration_tests/src/python/CloudTrailLogValidation/pass.py:8-20 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (10 corresponding lines) · ×10
  • Edited copy of a member (10 corresponding lines) checkov/arm/checks/resource/VMCredsInCustomData.py:17 — checkov/arm/checks/resource/VMCredsInCustomData.py:17-26 | checkov/terraform/checks/resource/azure/VMCredsInCustomData.py:17-28 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) checkov/bitbucket_pipelines/checks/latest_image.py:26 — checkov/bitbucket_pipelines/checks/latest_image.py:26-35 | checkov/circleci_pipelines/checks/latest_image.py:21-30 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) checkov/cloudformation/image_referencer/provider/aws.py:66 — checkov/cloudformation/image_referencer/provider/aws.py:66-75 | checkov/terraform/image_referencer/provider/aws.py:33-44 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) checkov/common/checks_infra/solvers/attribute_solvers/greater_than_attribute_solver.py:12 — checkov/common/checks_infra/solvers/attribute_solvers/greater_than_attribute_solver.py:12-21 | checkov/common/checks_infra/solvers/attribute_solvers/greater_than_or_equal_attribute_solver.py:13-22 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) checkov/common/packaging/version.py:101 — checkov/common/packaging/version.py:101-114 | checkov/common/util/update_checker/update_checker.py:277-286 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) checkov/arm/graph_builder/local_graph.py:219 — checkov/arm/graph_builder/local_graph.py:219-228 | checkov/bicep/graph_builder/local_graph.py:261-270 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) checkov/common/parsers/json/__init__.py:24 — checkov/common/parsers/json/__init__.py:24-33 | checkov/common/parsers/yaml/loader.py:33-44 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) cdk_integration_tests/src/python/CloudWatchLogGroupKMSKey/fail__1__.py:7 — cdk_integration_tests/src/python/CloudWatchLogGroupKMSKey/fail__1__.py:7-16 | cdk_integration_tests/src/python/CloudWatchLogGroupKMSKey/pass.py:7-16 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) cdk_integration_tests/src/python/AuroraEncryption/fail__1__.py:6 — cdk_integration_tests/src/python/AuroraEncryption/fail__1__.py:6-15 | cdk_integration_tests/src/python/AuroraEncryption/pass.py:6-15 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) cdk_integration_tests/src/python/APIGatewayXray/fail__2__.py:7 — cdk_integration_tests/src/python/APIGatewayXray/fail__2__.py:7-16 | cdk_integration_tests/src/python/APIGatewayXray/pass.py:7-16 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D3 · God Classes · FileTooLong · ×9
  • FileTooLong: bridgecrew/platform_integration.py checkov/common/bridgecrew/platform_integration.py — FileTooLong — 1173 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 673 over it, 2.35× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: checkov/main.py checkov/main.py — FileTooLong — 734 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 234 over it, 1.47× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: secrets/runner.py checkov/secrets/runner.py — FileTooLong — 721 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 221 over it, 1.44× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: kustomize/runner.py checkov/kustomize/runner.py — FileTooLong — 698 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 198 over it, 1.40× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: graph_builder/local_graph.py checkov/terraform/graph_builder/local_graph.py — FileTooLong — 691 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 191 over it, 1.38× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: runners/runner_registry.py checkov/common/runners/runner_registry.py — FileTooLong — 688 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 188 over it, 1.38× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: sca/output.py checkov/common/sca/output.py — FileTooLong — 586 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 86 over it, 1.17× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: terraform/tf_parser.py checkov/terraform/tf_parser.py — FileTooLong — 578 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 78 over it, 1.16× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: variable_rendering/renderer.py checkov/terraform/graph_builder/variable_rendering/renderer.py — FileTooLong — 508 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 8 over it, 1.02× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
D31 · IaC & Container Security · Medium IaC · ×9
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×8
  • Edited copy of a member (15 corresponding lines) checkov/terraform/tf_parser.py:456 — checkov/terraform/tf_parser.py:456-470 | checkov/terraform/tf_parser.py:478-492 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) checkov/arm/checks/resource/AKSNetworkPolicy.py:19 — checkov/arm/checks/resource/AKSNetworkPolicy.py:19-33 | checkov/arm/checks/resource/AKSRbacEnabled.py:19-33 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) checkov/dockerfile/utils.py:27 — checkov/dockerfile/utils.py:27-41 | checkov/serverless/utils.py:55-72 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) checkov/argo_workflows/runner.py:46 — checkov/argo_workflows/runner.py:46-61 | checkov/ansible/utils.py:83-97 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) cdk_integration_tests/src/python/ElasticacheReplicationGroupEncryptionAtTransit/fail__1__.py:7 — cdk_integration_tests/src/python/ElasticacheReplicationGroupEncryptionAtTransit/fail__1__.py:7-21 | cdk_integration_tests/src/python/ElasticacheReplicationGroupEncryptionAtTransit/pass.py:7-22 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) cdk_integration_tests/src/python/ElasticacheReplicationGroupEncryptionAtTransitAuthToken/fail__2__.py:6 — cdk_integration_tests/src/python/ElasticacheReplicationGroupEncryptionAtTransitAuthToken/fail__2__.py:6-20 | cdk_integration_tests/src/python/ElasticacheReplicationGroupEncryptionAtTransitAuthToken/pass.py:6-20 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) cdk_integration_tests/src/python/APIGatewayCacheEnable/fail__2__.py:7 — cdk_integration_tests/src/python/APIGatewayCacheEnable/fail__2__.py:7-21 | cdk_integration_tests/src/python/APIGatewayCacheEnable/pass.py:7-23 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) cdk_integration_tests/src/python/IAMPolicyAttachedToGroupOrRoles/fail__1__.py:7 — cdk_integration_tests/src/python/IAMPolicyAttachedToGroupOrRoles/fail__1__.py:7-22 | cdk_integration_tests/src/python/IAMPolicyAttachedToGroupOrRoles/pass.py:7-21 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×8
  • Edited copy of a member (7 corresponding lines) checkov/terraform/checks/resource/github/BranchProtectionReviewNumTwo.py:19 — checkov/terraform/checks/resource/github/BranchProtectionReviewNumTwo.py:19-27 | checkov/terraform/checks/resource/gitlab/RequireTwoApprovalsToMerge.py:19-25 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) checkov/arm/graph_builder/local_graph.py:179 — checkov/arm/graph_builder/local_graph.py:179-185 | checkov/cloudformation/graph_builder/local_graph.py:377-384 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) checkov/bicep/image_referencer/provider/azure.py:22 — checkov/bicep/image_referencer/provider/azure.py:22-31 | checkov/terraform/image_referencer/provider/azure.py:20-26 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) checkov/kubernetes/checks/resource/k8s/ApiServerProfiling.py:14 — checkov/kubernetes/checks/resource/k8s/ApiServerProfiling.py:14-20 | checkov/kubernetes/checks/resource/k8s/ApiServerServiceAccountLookup.py:14-23 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) checkov/kubernetes/checks/resource/k8s/KubeletAnonymousAuth.py:15 — checkov/kubernetes/checks/resource/k8s/KubeletAnonymousAuth.py:15-21 | checkov/kubernetes/checks/resource/k8s/KubeletHostnameOverride.py:15-21 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) checkov/secrets/parsers/single_line_parser.py:23 — checkov/secrets/parsers/single_line_parser.py:23-30 | checkov/secrets/plugins/detector_utils.py:241-247 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) checkov/json_doc/runner.py:27 — checkov/json_doc/runner.py:27-33 | checkov/yaml_doc/runner.py:27-33 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) cdk_integration_tests/src/python/S3BlockPublicACLs/fail__2__.py:7 — cdk_integration_tests/src/python/S3BlockPublicACLs/fail__2__.py:7-13 | cdk_integration_tests/src/python/S3BlockPublicACLs/pass.py:29-35 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (16 corresponding lines) · ×7
  • Edited copy of a member (16 corresponding lines) checkov/github/checks/webhooks_https_orgs.py:25 — checkov/github/checks/webhooks_https_orgs.py:25-41 | checkov/github/checks/webhooks_https_repos.py:25-40 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) checkov/ansible/checks/base_ansible_task_value_check.py:40 — checkov/ansible/checks/base_ansible_task_value_check.py:40-55 | checkov/bicep/checks/resource/base_resource_value_check.py:29-44 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) checkov/arm/base_resource_negative_value_check.py:37 — checkov/arm/base_resource_negative_value_check.py:37-53 | checkov/arm/base_resource_value_check.py:38-53 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) cdk_integration_tests/src/python/NeptuneClusterStorageEncrypted/fail__2__.py:25 — cdk_integration_tests/src/python/NeptuneClusterStorageEncrypted/fail__2__.py:25-40 | cdk_integration_tests/src/python/NeptuneClusterStorageEncrypted/pass.py:25-41 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) cdk_integration_tests/src/python/ElasticacheReplicationGroupEncryptionAtRest/fail__1__.py:7 — cdk_integration_tests/src/python/ElasticacheReplicationGroupEncryptionAtRest/fail__1__.py:7-22 | cdk_integration_tests/src/python/ElasticacheReplicationGroupEncryptionAtRest/pass.py:7-23 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) cdk_integration_tests/src/python/GlueSecurityConfigurationEnabled/fail__3__.py:7 — cdk_integration_tests/src/python/GlueSecurityConfigurationEnabled/fail__3__.py:7-22 | cdk_integration_tests/src/python/GlueSecurityConfigurationEnabled/pass.py:8-24 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) cdk_integration_tests/src/python/GlueSecurityConfigurationEnabled/fail__3__.py:50 — cdk_integration_tests/src/python/GlueSecurityConfigurationEnabled/fail__3__.py:50-65 | cdk_integration_tests/src/python/GlueSecurityConfigurationEnabled/pass.py:56-75 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×7
  • Edited copy of a member (9 corresponding lines) checkov/terraform/graph_builder/utils.py:347 — checkov/terraform/graph_builder/utils.py:347-355 | checkov/terraform/graph_builder/utils.py:359-367 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) checkov/bicep/checks/param/base_registry.py:22 — checkov/bicep/checks/param/base_registry.py:22-31 | checkov/common/checks/base_check_registry.py:61-69 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) checkov/kubernetes/checks/resource/k8s/CPULimits.py:15 — checkov/kubernetes/checks/resource/k8s/CPULimits.py:15-23 | checkov/kubernetes/checks/resource/k8s/MemoryLimits.py:15-23 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) checkov/arm/checks/resource/AppServicePublicAccessDisabled.py:9 — checkov/arm/checks/resource/AppServicePublicAccessDisabled.py:9-17 | checkov/arm/checks/resource/VnetLocalDNS.py:10-19 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) checkov/terraform/context_parsers/parsers/module_context_parser.py:18 — checkov/terraform/context_parsers/parsers/module_context_parser.py:18-26 | checkov/terraform/context_parsers/parsers/variable_context_parser.py:29-39 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) cdk_integration_tests/src/python/APIGatewayV2AccessLogging/fail__2__.py:6 — cdk_integration_tests/src/python/APIGatewayV2AccessLogging/fail__2__.py:6-14 | cdk_integration_tests/src/python/APIGatewayV2AccessLogging/pass.py:6-18 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) cdk_integration_tests/src/python/APIGatewayV2AccessLogging/fail__2__.py:25 — cdk_integration_tests/src/python/APIGatewayV2AccessLogging/fail__2__.py:25-33 | cdk_integration_tests/src/python/APIGatewayV2AccessLogging/pass.py:29-41 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×7
  • Duplicated block (17 lines × 2) checkov/bicep/image_referencer/base_provider.py:15 — checkov/bicep/image_referencer/base_provider.py:15-31 | checkov/cloudformation/image_referencer/base_provider.py:15-31 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `checkov/bicep/image_referencer/base_provider.py:15` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) checkov/terraform/checks/resource/azure/AzureSearchSLAIndex.py:18 — checkov/terraform/checks/resource/azure/AzureSearchSLAIndex.py:18-34 | checkov/terraform/checks/resource/azure/AzureSearchSLAQueryUpdates.py:17-33 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (17 lines × 2) checkov/terraform/checks/resource/azure/AzureServicebusLocalAuthDisabled.py:10 — checkov/terraform/checks/resource/azure/AzureServicebusLocalAuthDisabled.py:10-26 | checkov/terraform/checks/resource/azure/MLCCLADisabled.py:10-26 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (17 lines × 2) cdk_integration_tests/src/python/LambdaDLQConfigured/fail__2__.py:8 — cdk_integration_tests/src/python/LambdaDLQConfigured/fail__2__.py:8-24 | cdk_integration_tests/src/python/LambdaDLQConfigured/pass.py:8-24 — before extracting anything, compare `cdk_integration_tests/src/python/LambdaDLQConfigured/fail__2__.py` and `cdk_integration_tests/src/python/LambdaDLQConfigured/pass.py` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `cdk_integration_tests/src/python/LambdaDLQConfigured/fail__2__.py:8` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) cdk_integration_tests/src/python/LambdaDLQConfigured/fail__2__.py:32 — cdk_integration_tests/src/python/LambdaDLQConfigured/fail__2__.py:32-48 | cdk_integration_tests/src/python/LambdaDLQConfigured/pass.py:33-49 — before extracting anything, compare `cdk_integration_tests/src/python/LambdaDLQConfigured/fail__2__.py` and `cdk_integration_tests/src/python/LambdaDLQConfigured/pass.py` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `cdk_integration_tests/src/python/LambdaDLQConfigured/fail__2__.py:32` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) cdk_integration_tests/src/python/SecurityGroupRuleDescription/fail__4__.py:6 — cdk_integration_tests/src/python/SecurityGroupRuleDescription/fail__4__.py:6-22 | cdk_integration_tests/src/python/SecurityGroupRuleDescription/pass.py:6-22 — before extracting anything, compare `cdk_integration_tests/src/python/SecurityGroupRuleDescription/fail__4__.py` and `cdk_integration_tests/src/python/SecurityGroupRuleDescription/pass.py` as WHOLE FILES: 96% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 2) cdk_integration_tests/src/python/SecurityGroupRuleDescription/fail__4__.py:32 — cdk_integration_tests/src/python/SecurityGroupRuleDescription/fail__4__.py:32-48 | cdk_integration_tests/src/python/SecurityGroupRuleDescription/pass.py:32-48 — before extracting anything, compare `cdk_integration_tests/src/python/SecurityGroupRuleDescription/fail__4__.py` and `cdk_integration_tests/src/python/SecurityGroupRuleDescription/pass.py` as WHOLE FILES: 96% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×7
  • Duplicated block (16 lines × 2) checkov/arm/checks/resource/SQLServerEmailAlertsEnabled.py:20 — checkov/arm/checks/resource/SQLServerEmailAlertsEnabled.py:20-35 | checkov/arm/checks/resource/SQLServerEmailAlertsToAdminsEnabled.py:20-35 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (16 lines × 2) checkov/bicep/runner.py:129 — checkov/bicep/runner.py:129-144 | checkov/cloudformation/runner.py:129-144 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16 lines × 2) checkov/common/util/secrets.py:174 — checkov/common/util/secrets.py:174-189 | checkov/common/util/secrets.py:222-237 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16 lines × 2) checkov/terraform/checks/resource/kubernetes/AllowPrivilegeEscalation.py:31 — checkov/terraform/checks/resource/kubernetes/AllowPrivilegeEscalation.py:31-46 | checkov/terraform/checks/resource/kubernetes/CPULimits.py:28-43 — before extracting anything, compare `checkov/terraform/checks/resource/kubernetes/AllowPrivilegeEscalation.py` and `checkov/terraform/checks/resource/kubernetes/CPULimits.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (16 lines × 2) cdk_integration_tests/src/python/WorkspaceRootVolumeEncrypted/pass.py:6 — cdk_integration_tests/src/python/WorkspaceRootVolumeEncrypted/pass.py:6-21 | cdk_integration_tests/src/python/WorkspaceUserVolumeEncrypted/pass.py:6-21 — `cdk_integration_tests/src/python/WorkspaceRootVolumeEncrypted/pass.py` and `cdk_integration_tests/src/python/WorkspaceUserVolumeEncrypted/pass.py` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 1 separate duplicated blocks between them, totalling at least 16 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `cdk_integration_tests/src/python/WorkspaceRootVolumeEncrypted/pass.py:6` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) cdk_integration_tests/src/python/ALBListenerHTTPS/fail__1__.py:6 — cdk_integration_tests/src/python/ALBListenerHTTPS/fail__1__.py:6-21 | cdk_integration_tests/src/python/ALBListenerHTTPS/pass.py:23-38 — before extracting anything, compare `cdk_integration_tests/src/python/ALBListenerHTTPS/fail__1__.py` and `cdk_integration_tests/src/python/ALBListenerHTTPS/pass.py` as WHOLE FILES: 84% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 2) cdk_integration_tests/src/python/S3RestrictPublicBuckets/fail__2__.py:26 — cdk_integration_tests/src/python/S3RestrictPublicBuckets/fail__2__.py:26-41 | cdk_integration_tests/src/python/S3RestrictPublicBuckets/pass.py:26-41 — before extracting anything, compare `cdk_integration_tests/src/python/S3RestrictPublicBuckets/fail__2__.py` and `cdk_integration_tests/src/python/S3RestrictPublicBuckets/pass.py` as WHOLE FILES: 94% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×7
  • Duplicated block (14 lines × 2) checkov/arm/checks/resource/VnetLocalDNS.py:32 — checkov/arm/checks/resource/VnetLocalDNS.py:32-45 | checkov/terraform/checks/resource/azure/VnetLocalDNS.py:29-42 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) checkov/common/bridgecrew/run_metadata/extractors/gitlab_ci.py:24 — checkov/common/bridgecrew/run_metadata/extractors/gitlab_ci.py:24-37 | checkov/common/bridgecrew/run_metadata/extractors/jenkins.py:23-36 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (14 lines × 2) checkov/common/runners/object_runner.py:201 — checkov/common/runners/object_runner.py:201-214 | checkov/common/runners/object_runner.py:273-286 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `checkov/common/runners/object_runner.py:201` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) checkov/github_actions/checks/job/CosignArtifacts.py:26 — checkov/github_actions/checks/job/CosignArtifacts.py:26-39 | checkov/github_actions/checks/job/CosignSBOM.py:26-39 — before extracting anything, compare `checkov/github_actions/checks/job/CosignArtifacts.py` and `checkov/github_actions/checks/job/CosignSBOM.py` as WHOLE FILES: 84% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) checkov/terraform/checks/resource/kubernetes/DropCapabilities.py:20 — checkov/terraform/checks/resource/kubernetes/DropCapabilities.py:20-33 | checkov/terraform/checks/resource/kubernetes/MemoryLimits.py:15-28 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) checkov/terraform/checks/resource/aws/EMRClusterConfEncryptsEBS.py:19 — checkov/terraform/checks/resource/aws/EMRClusterConfEncryptsEBS.py:19-32 | checkov/terraform/checks/resource/aws/EMRClusterConfEncryptsLocalDisk.py:19-32 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) checkov/terraform/checks/resource/aws/ECSServiceFargateLatest.py:11 — checkov/terraform/checks/resource/aws/ECSServiceFargateLatest.py:11-24 | checkov/terraform/checks/resource/aws/LambdaFunctionIsNotPublic.py:10-27 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×7
  • Duplicated block (9 lines × 3) checkov/arm/checks/resource/PostgreSQLServerConnectionThrottlingEnabled.py:28 — checkov/arm/checks/resource/PostgreSQLServerConnectionThrottlingEnabled.py:28-36 | checkov/arm/checks/resource/PostgreSQLServerLogCheckpointsEnabled.py:30-38 | checkov/arm/checks/resource/PostgreSQLServerLogConnectionsEnabled.py:28-36 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 3) checkov/openapi/checks/resource/v2/OperationObjectProducesUndefined.py:24 — checkov/openapi/checks/resource/v2/OperationObjectProducesUndefined.py:24-32 | checkov/openapi/checks/resource/v2/OperationObjectSecurityScopeUndefined.py:25-33 | checkov/openapi/checks/resource/v2/SecurityDefinitionBasicAuth.py:24-32 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `checkov/openapi/checks/resource/v2/OperationObjectSecurityScopeUndefined.py:24` calls `get` and `checkov/openapi/checks/resource/v2/OperationObjectProducesUndefined.py:23` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 3) checkov/terraform/checks/resource/gcp/GoogleComputeBlockProjectSSH.py:18 — checkov/terraform/checks/resource/gcp/GoogleComputeBlockProjectSSH.py:18-26 | checkov/terraform/checks/resource/gcp/GoogleComputeInstanceOSLogin.py:17-25 | checkov/terraform/checks/resource/gcp/GoogleComputeSerialPorts.py:16-24 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 3) checkov/arm/checks/resource/KeyVaultEnablesSoftDelete.py:8 — checkov/arm/checks/resource/KeyVaultEnablesSoftDelete.py:8-16 | checkov/terraform/checks/resource/aws/CloudtrailEnableLogging.py:7-15 | checkov/terraform/checks/resource/azure/KeyVaultEnablesSoftDelete.py:8-16 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (9 lines × 3) checkov/arm/checks/resource/AppServiceEnableFailedRequest.py:9 — checkov/arm/checks/resource/AppServiceEnableFailedRequest.py:9-17 | checkov/terraform/checks/resource/alicloud/RDSTransparentDataEncryptionEnabled.py:11-19 | checkov/terraform/checks/resource/aws/CloudtrailDefinesSNSTopic.py:8-22 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (9 lines × 3) checkov/azure_pipelines/checks/job/ContainerDigest.py:12 — checkov/azure_pipelines/checks/job/ContainerDigest.py:12-20 | checkov/azure_pipelines/checks/job/ContainerLatestTag.py:12-20 | checkov/azure_pipelines/checks/job/SetSecretVariable.py:12-20 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
  • Duplicated block (9 lines × 3) checkov/terraform/checks/resource/aws/APIGatewayMethodSettingsCacheEncrypted.py:12 — checkov/terraform/checks/resource/aws/APIGatewayMethodSettingsCacheEncrypted.py:12-20 | checkov/terraform/checks/resource/aws/KinesisFirehoseDeliveryStreamSSE.py:7-15 | checkov/terraform/checks/resource/azure/WinVMEncryptionAtHost.py:7-17 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×7
  • Duplicated block (5 lines × 2) REDACTED:121 — REDACTED:121-125 | REDACTED:130-134 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (5 lines × 2) checkov/ansible/checks/task/aws/EC2EBSOptimized.py:21 — checkov/ansible/checks/task/aws/EC2EBSOptimized.py:21-25 | checkov/ansible/checks/task/aws/EC2PublicIP.py:21-25 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) checkov/arm/checks/resource/AzureBatchAccountEndpointAccessDefaultAction.py:15 — checkov/arm/checks/resource/AzureBatchAccountEndpointAccessDefaultAction.py:15-19 | checkov/terraform/checks/resource/azure/AzureBatchAccountEndpointAccessDefaultAction.py:12-16 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) checkov/terraform/checks/resource/aws/AbsSecurityGroupUnrestrictedEgress.py:13 — checkov/terraform/checks/resource/aws/AbsSecurityGroupUnrestrictedEgress.py:13-17 | checkov/terraform/checks/resource/aws/AbsSecurityGroupUnrestrictedIngress.py:13-17 — before extracting anything, compare `checkov/terraform/checks/resource/aws/AbsSecurityGroupUnrestrictedEgress.py` and `checkov/terraform/checks/resource/aws/AbsSecurityGroupUnrestrictedIngress.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) checkov/terraform/checks/resource/azure/AppServiceEnableFailedRequest.py:7 — checkov/terraform/checks/resource/azure/AppServiceEnableFailedRequest.py:7-11 | checkov/terraform/checks/resource/azure/AppServiceHttpLoggingEnabled.py:8-12 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) checkov/terraform/checks/resource/gcp/GKEMetadataServerIsEnabled.py:8 — checkov/terraform/checks/resource/gcp/GKEMetadataServerIsEnabled.py:8-12 | checkov/terraform/checks/resource/gcp/GKESecureBootforShieldedNodes.py:7-11 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) checkov/kubernetes/checks/resource/k8s/PrivilegedContainers.py:17 — checkov/kubernetes/checks/resource/k8s/PrivilegedContainers.py:17-21 | checkov/kubernetes/checks/resource/k8s/ReadOnlyFilesystem.py:15-19 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D17 · Explicit Debt · CommentedOutCode · ×6
  • CommentedOutCode tests/cloudformation/checks/example_WildcardEntities/main.yaml:18 — commented-out configuration block `ALBSecurityGroup` (16 lines)
  • CommentedOutCode tests/cloudformation/checks/resource/aws/example_ALBListener/ALBListenerHTTPS-FAILED-HTTP.yaml:18 — commented-out configuration block `ALBSecurityGroup` (16 lines)
  • CommentedOutCode tests/cloudformation/checks/resource/aws/example_ALBListener/ALBListenerHTTPS-PASSED-HTTPS.yaml:18 — commented-out configuration block `ALBSecurityGroup` (16 lines)
  • CommentedOutCode tests/cloudformation/checks/resource/aws/example_ALBListener/ALBListenerHTTPS-PASSED-redirect.yaml:18 — commented-out configuration block `ALBSecurityGroup` (16 lines)
  • CommentedOutCode tests/github_actions/resources/.github/workflows/slsa-gen.yaml:78 — commented-out configuration entry `scan-type`
  • CommentedOutCode tests/github_actions/resources/.github/workflows/slsa-gen.yaml:82 — commented-out configuration entry `vuln-type`
D4 · Code Duplication · Edited copy of a member (8 corresponding lines) · ×6
  • Edited copy of a member (8 corresponding lines) checkov/kubernetes/checks/resource/k8s/DropCapabilities.py:18 — checkov/kubernetes/checks/resource/k8s/DropCapabilities.py:18-25 | checkov/kubernetes/checks/resource/k8s/MinimizeCapabilities.py:16-25 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) checkov/arm/checks/resource/NSGRulePortAccessRestricted.py:25 — checkov/arm/checks/resource/NSGRulePortAccessRestricted.py:25-32 | checkov/terraform/checks/resource/azure/NSGRulePortAccessRestricted.py:20-28 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) checkov/terraform/checks/resource/aws/LBTargetGroupsDefinesHealthcheck.py:25 — checkov/terraform/checks/resource/aws/LBTargetGroupsDefinesHealthcheck.py:25-33 | checkov/terraform/checks/resource/ncp/LBTargetGroupDefinesHealthCheck.py:18-25 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) checkov/kubernetes/checks/resource/k8s/NginxIngressCVE202125742Alias.py:19 — checkov/kubernetes/checks/resource/k8s/NginxIngressCVE202125742Alias.py:19-26 | checkov/kubernetes/checks/resource/k8s/NginxIngressCVE202125742AllSnippets.py:19-26 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) cdk_integration_tests/src/python/S3BlockPublicPolicy/fail__2__.py:10 — cdk_integration_tests/src/python/S3BlockPublicPolicy/fail__2__.py:10-17 | cdk_integration_tests/src/python/S3BlockPublicPolicy/pass.py:11-19 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) cdk_integration_tests/src/python/EFSEncryptionEnabled/fail__1__.py:7 — cdk_integration_tests/src/python/EFSEncryptionEnabled/fail__1__.py:7-14 | cdk_integration_tests/src/python/EFSEncryptionEnabled/pass.py:7-15 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×6
  • Duplicated block (11 lines × 3) checkov/arm/context_parser.py:160 — checkov/arm/context_parser.py:160-170 | checkov/cloudformation/context_parser.py:153-163 | REDACTED:44-54 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Note first that the copies are not typed on the same thing: the declarations holding them bind `path` to `list[str | int]` in one and `list[int | str]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (11 lines × 3) checkov/cloudformation/runner.py:224 — checkov/cloudformation/runner.py:224-234 | checkov/common/runners/object_runner.py:366-376 | checkov/dockerfile/runner.py:283-293 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (11 lines × 3) checkov/kubernetes/checks/resource/k8s/ApiServerEtcdCertAndKey.py:16 — checkov/kubernetes/checks/resource/k8s/ApiServerEtcdCertAndKey.py:16-26 | checkov/kubernetes/checks/resource/k8s/ApiServerKubeletClientCertAndKey.py:16-26 | checkov/kubernetes/checks/resource/k8s/KubeletKeyFilesSetAppropriate.py:17-27 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 3) checkov/terraform/checks/resource/kubernetes/AllowPrivilegeEscalation.py:33 — checkov/terraform/checks/resource/kubernetes/AllowPrivilegeEscalation.py:33-43 | checkov/terraform/checks/resource/kubernetes/CPULimits.py:30-40 | checkov/terraform/checks/resource/kubernetes/Tiller.py:57-67 — before extracting anything, compare `checkov/terraform/checks/resource/kubernetes/AllowPrivilegeEscalation.py` and `checkov/terraform/checks/resource/kubernetes/CPULimits.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 3) checkov/cloudformation/checks/resource/aws/LambdaFunctionURLAuth.py:8 — checkov/cloudformation/checks/resource/aws/LambdaFunctionURLAuth.py:8-18 | checkov/terraform/checks/resource/aws/DBSnapshotsArePrivate.py:9-19 | checkov/terraform/checks/resource/aws/LambdaFunctionURLAuth.py:8-18 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (11 lines × 3) checkov/terraform/checks/resource/alicloud/MongoDBInstanceSSL.py:8 — checkov/terraform/checks/resource/alicloud/MongoDBInstanceSSL.py:8-18 | checkov/terraform/checks/resource/alicloud/RDSInstanceSSL.py:8-18 | checkov/terraform/checks/resource/alicloud/TLSPoliciesAreSecure.py:7-17 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
D4 · Code Duplication · Edited copy of a member (26 corresponding lines) · ×5
  • Edited copy of a member (26 corresponding lines) checkov/openapi/checks/resource/v2/OperationObjectBasicAuth.py:24 — checkov/openapi/checks/resource/v2/OperationObjectBasicAuth.py:24-49 | checkov/openapi/checks/resource/v2/OperationObjectImplicitFlow.py:24-51 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) checkov/terraform/checks/resource/kubernetes/DangerousGitSync.py:17 — checkov/terraform/checks/resource/kubernetes/DangerousGitSync.py:17-43 | checkov/terraform/checks/resource/kubernetes/PrivilegedContainer.py:19-44 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) checkov/common/checks/object_registry.py:107 — checkov/common/checks/object_registry.py:107-132 | checkov/json_doc/base_registry.py:74-99 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) checkov/bicep/graph_builder/local_graph.py:143 — checkov/bicep/graph_builder/local_graph.py:143-169 | checkov/bicep/graph_builder/local_graph.py:172-197 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) checkov/cloudformation/checks/resource/aws/IAMAdminPolicyDocument.py:15 — checkov/cloudformation/checks/resource/aws/IAMAdminPolicyDocument.py:15-40 | checkov/cloudformation/checks/resource/aws/IAMStarActionPolicyDocument.py:16-41 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (18 corresponding lines) · ×5
  • Edited copy of a member (18 corresponding lines) checkov/terraform/checks/resource/aws/SSMSessionManagerDocumentEncryption.py:20 — checkov/terraform/checks/resource/aws/SSMSessionManagerDocumentEncryption.py:20-37 | checkov/terraform/checks/resource/aws/SSMSessionManagerDocumentLogging.py:20-41 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) checkov/arm/parser/parser.py:58 — checkov/arm/parser/parser.py:58-75 | checkov/kubernetes/parser/k8_json.py:42-66 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) checkov/cloudformation/cfn_utils.py:25 — checkov/cloudformation/cfn_utils.py:25-44 | checkov/serverless/utils.py:95-112 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) cdk_integration_tests/src/python/LambdaDLQConfigured/fail__2__.py:8 — cdk_integration_tests/src/python/LambdaDLQConfigured/fail__2__.py:8-25 | cdk_integration_tests/src/python/LambdaDLQConfigured/pass.py:8-26 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) cdk_integration_tests/src/python/AthenaWorkgroupConfiguration/fail__1__.py:7 — cdk_integration_tests/src/python/AthenaWorkgroupConfiguration/fail__1__.py:7-24 | cdk_integration_tests/src/python/AthenaWorkgroupConfiguration/pass.py:7-24 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (19 corresponding lines) · ×5
  • Edited copy of a member (19 corresponding lines) checkov/arm/graph_builder/definition_context.py:15 — checkov/arm/graph_builder/definition_context.py:15-33 | checkov/serverless/graph_builder/definition_context.py:13-33 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) checkov/bicep/utils.py:26 — checkov/bicep/utils.py:26-44 | checkov/terraform_json/utils.py:21-44 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) checkov/common/packaging/version.py:123 — checkov/common/packaging/version.py:123-141 | checkov/common/util/update_checker/update_checker.py:290-331 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) cdk_integration_tests/src/python/WorkspaceRootVolumeEncrypted/pass.py:6 — cdk_integration_tests/src/python/WorkspaceRootVolumeEncrypted/pass.py:6-24 | cdk_integration_tests/src/python/WorkspaceUserVolumeEncrypted/pass.py:6-24 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) cdk_integration_tests/src/python/S3IgnorePublicACLs/fail__2__.py:10 — cdk_integration_tests/src/python/S3IgnorePublicACLs/fail__2__.py:10-29 | cdk_integration_tests/src/python/S3IgnorePublicACLs/pass.py:11-29 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×5
  • Duplicated block (13 lines × 2) checkov/common/output/github_actions_record.py:28 — checkov/common/output/github_actions_record.py:28-40 | checkov/common/output/secrets_record.py:64-76 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `checkov/common/output/github_actions_record.py:28` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) checkov/kubernetes/checks/resource/k8s/Seccomp.py:36 — checkov/kubernetes/checks/resource/k8s/Seccomp.py:36-48 | checkov/kubernetes/checks/resource/k8s/Seccomp.py:61-73 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) checkov/terraform/checks/resource/aws/SSMSessionManagerDocumentEncryption.py:20 — checkov/terraform/checks/resource/aws/SSMSessionManagerDocumentEncryption.py:20-32 | checkov/terraform/checks/resource/aws/SSMSessionManagerDocumentLogging.py:20-32 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) checkov/terraform/plan_parser.py:548 — checkov/terraform/plan_parser.py:548-560 | checkov/terraform_json/parser.py:215-227 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `value_list` to `List[Any]` in one and `list[Any]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (13 lines × 2) cdk_integration_tests/src/python/KinesisStreamEncryptionType/fail__1__.py:7 — cdk_integration_tests/src/python/KinesisStreamEncryptionType/fail__1__.py:7-19 | cdk_integration_tests/src/python/KinesisStreamEncryptionType/pass.py:7-19 — before extracting anything, compare `cdk_integration_tests/src/python/KinesisStreamEncryptionType/fail__1__.py` and `cdk_integration_tests/src/python/KinesisStreamEncryptionType/pass.py` as WHOLE FILES: 94% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×5
  • Duplicated block (12 lines × 3) checkov/kubernetes/checks/resource/k8s/ApiServerAuditLogMaxAge.py:14 — checkov/kubernetes/checks/resource/k8s/ApiServerAuditLogMaxAge.py:14-25 | checkov/kubernetes/checks/resource/k8s/ApiServerAuditLogMaxBackup.py:14-25 | checkov/kubernetes/checks/resource/k8s/ApiServerAuditLogMaxSize.py:14-25 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 3) checkov/openapi/checks/resource/v2/Oauth2OperationObjectPasswordFlow.py:41 — checkov/openapi/checks/resource/v2/Oauth2OperationObjectPasswordFlow.py:41-52 | checkov/openapi/checks/resource/v2/Oauth2SecurityDefinitionImplicitFlow.py:26-37 | checkov/openapi/checks/resource/v2/Oauth2SecurityDefinitionPasswordFlow.py:26-37 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 3) checkov/kubernetes/checks/resource/k8s/ApiServerKubeletHttps.py:9 — checkov/kubernetes/checks/resource/k8s/ApiServerKubeletHttps.py:9-20 | checkov/kubernetes/checks/resource/k8s/KubeletStreamingConnectionIdleTimeout.py:10-21 | checkov/kubernetes/checks/resource/k8s/KubletRotateCertificates.py:10-21 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
  • Duplicated block (12 lines × 3) cdk_integration_tests/src/python/CloudFrontTLS12/fail__2__.py:6 — cdk_integration_tests/src/python/CloudFrontTLS12/fail__2__.py:6-17 | cdk_integration_tests/src/python/CloudFrontTLS12/fail__2__.py:25-36 | cdk_integration_tests/src/python/CloudFrontTLS12/pass.py:6-17 — before extracting anything, compare `cdk_integration_tests/src/python/CloudFrontTLS12/fail__2__.py` and `cdk_integration_tests/src/python/CloudFrontTLS12/pass.py` as WHOLE FILES: 93% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 3) cdk_integration_tests/src/python/LaunchConfigurationEBSEncryption/fail__1__.py:6 — cdk_integration_tests/src/python/LaunchConfigurationEBSEncryption/fail__1__.py:6-19 | cdk_integration_tests/src/python/LaunchConfigurationEBSEncryption/pass.py:6-20 | cdk_integration_tests/src/python/LaunchConfigurationEBSEncryption/pass.py:28-39 — before extracting anything, compare `cdk_integration_tests/src/python/LaunchConfigurationEBSEncryption/fail__1__.py` and `cdk_integration_tests/src/python/LaunchConfigurationEBSEncryption/pass.py` as WHOLE FILES: 88% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
X3 · Exception handling · Swallowed exception (empty catch) · ×5
  • Swallowed exception (empty catch) checkov/terraform/checks/resource/aws/IAMAdminPolicyDocument.py:42 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) checkov/terraform/checks/resource/aws/IAMRoleAllowsPublicAssume.py:30 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) checkov/terraform/checks/resource/aws/IAMStarActionPolicyDocument.py:48 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) checkov/terraform/checks/resource/aws/KMSKeyWildcardPrincipal.py:39 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) checkov/terraform/checks/resource/aws/S3ProtectAgainstPolicyLockout.py:48 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
D30 · Dependency Vulnerabilities · Medium CVE · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×4
  • Edited copy of a member (14 corresponding lines) checkov/terraform/checks/resource/aws/DLMScheduleCrossRegionEncryption.py:14 — checkov/terraform/checks/resource/aws/DLMScheduleCrossRegionEncryption.py:14-27 | checkov/terraform/checks/resource/aws/DLMScheduleCrossRegionEncryptionWithCMK.py:14-29 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) checkov/circleci_pipelines/checks/ReverseShellNetcat.py:24 — checkov/circleci_pipelines/checks/ReverseShellNetcat.py:24-37 | checkov/circleci_pipelines/checks/ShellInjection.py:23-39 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) checkov/cloudformation/graph_builder/variable_rendering/renderer.py:272 — checkov/cloudformation/graph_builder/variable_rendering/renderer.py:272-285 | checkov/cloudformation/graph_builder/variable_rendering/renderer.py:292-308 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) cdk_integration_tests/src/python/NeptuneClusterStorageEncrypted/fail__2__.py:7 — cdk_integration_tests/src/python/NeptuneClusterStorageEncrypted/fail__2__.py:7-20 | cdk_integration_tests/src/python/NeptuneClusterStorageEncrypted/pass.py:7-20 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (17 corresponding lines) · ×4
  • Edited copy of a member (17 corresponding lines) checkov/openapi/checks/resource/v2/OperationObjectConsumesUndefined.py:24 — checkov/openapi/checks/resource/v2/OperationObjectConsumesUndefined.py:24-40 | checkov/openapi/checks/resource/v2/OperationObjectProducesUndefined.py:24-42 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) checkov/bicep/parser.py:36 — checkov/bicep/parser.py:36-52 | checkov/terraform_json/utils.py:50-69 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) checkov/helm/runner.py:597 — checkov/helm/runner.py:597-613 | checkov/kustomize/runner.py:900-917 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) cdk_integration_tests/src/python/APIGatewayXray/fail__2__.py:24 — cdk_integration_tests/src/python/APIGatewayXray/fail__2__.py:24-40 | cdk_integration_tests/src/python/APIGatewayXray/pass.py:24-40 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (6 corresponding lines) · ×4
  • Edited copy of a member (6 corresponding lines) checkov/github/dal.py:177 — checkov/github/dal.py:177-182 | checkov/github/dal.py:192-197 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) checkov/kubernetes/checks/resource/k8s/AllowedCapabilitiesSysAdmin.py:17 — checkov/kubernetes/checks/resource/k8s/AllowedCapabilitiesSysAdmin.py:17-23 | checkov/kubernetes/checks/resource/k8s/AllowedCapabilities.py:18-23 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) checkov/arm/graph_manager.py:28 — checkov/arm/graph_manager.py:28-33 | checkov/serverless/graph_manager.py:28-33 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) checkov/arm/checks/parameter/SecureStringParameterNoHardcodedValue.py:19 — checkov/arm/checks/parameter/SecureStringParameterNoHardcodedValue.py:19-24 | checkov/terraform/checks/resource/openstack/ComputeInstanceAdminPassword.py:16-23 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (5 corresponding lines) · ×4
  • Edited copy of a member (5 corresponding lines) checkov/arm/checks/resource/ACREnableImageQuarantine.py:8 — checkov/arm/checks/resource/ACREnableImageQuarantine.py:8-12 | checkov/terraform/checks/resource/azure/ACREnableImageQuarantine.py:7-11 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) checkov/arm/checks/resource/StorageAccountName.py:17 — checkov/arm/checks/resource/StorageAccountName.py:17-27 | checkov/terraform/checks/resource/azure/StorageAccountName.py:14-18 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) checkov/terraform/graph_builder/local_graph.py:813 — checkov/terraform/graph_builder/local_graph.py:813-817 | checkov/terraform/tf_parser.py:526-531 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) checkov/cloudformation/checks/resource/aws/DocDBBackupRetention.py:17 — checkov/cloudformation/checks/resource/aws/DocDBBackupRetention.py:17-22 | checkov/cloudformation/checks/resource/aws/NeptuneClusterBackupRetention.py:18-22 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×4
  • Duplicated block (14 lines × 3) checkov/kubernetes/checks/resource/k8s/ShareHostIPC.py:37 — checkov/kubernetes/checks/resource/k8s/ShareHostIPC.py:37-50 | checkov/kubernetes/checks/resource/k8s/ShareHostPID.py:37-50 | checkov/kubernetes/checks/resource/k8s/SharedHostNetworkNamespace.py:37-50 — before extracting anything, compare `checkov/kubernetes/checks/resource/k8s/ShareHostIPC.py` and `checkov/kubernetes/checks/resource/k8s/ShareHostPID.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 3) checkov/cloudformation/checks/resource/aws/IAMPrivilegeEscalation.py:7 — checkov/cloudformation/checks/resource/aws/IAMPrivilegeEscalation.py:7-20 | checkov/terraform/checks/data/aws/IAMPrivilegeEscalation.py:13-26 | checkov/terraform/checks/resource/aws/IAMPrivilegeEscalation.py:14-27 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (14 lines × 3) checkov/terraform/checks/resource/aws/CodeArtifactDomainEncryptedWithCMK.py:8 — checkov/terraform/checks/resource/aws/CodeArtifactDomainEncryptedWithCMK.py:8-21 | checkov/terraform/checks/resource/aws/RDSClusterActivityStreamEncryptedWithCMK.py:8-24 | checkov/terraform/checks/resource/aws/RDSInstanceAutoBackupEncryptionWithCMK.py:8-24 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
  • Duplicated block (14 lines × 3) checkov/terraform/checks/resource/gcp/GKEClientCertificateDisabled.py:7 — checkov/terraform/checks/resource/gcp/GKEClientCertificateDisabled.py:7-23 | checkov/terraform/checks/resource/gcp/GKENodePoolAutoRepairEnabled.py:7-21 | checkov/terraform/checks/resource/gcp/GKENodePoolAutoUpgradeEnabled.py:7-20 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (10 lines × 4) · ×4
  • Duplicated block (10 lines × 4) checkov/openapi/checks/resource/v2/Oauth2OperationObjectPasswordFlow.py:27 — checkov/openapi/checks/resource/v2/Oauth2OperationObjectPasswordFlow.py:27-36 | checkov/openapi/checks/resource/v2/OperationObjectBasicAuth.py:27-36 | checkov/openapi/checks/resource/v2/OperationObjectImplicitFlow.py:27-36 | checkov/openapi/checks/resource/v2/OperationObjectSecurityScopeUndefined.py:29-38 — before extracting anything, compare `checkov/openapi/checks/resource/v2/Oauth2OperationObjectPasswordFlow.py` and `checkov/openapi/checks/resource/v2/OperationObjectBasicAuth.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 4) checkov/openapi/checks/resource/v2/Oauth2OperationObjectPasswordFlow.py:25 — checkov/openapi/checks/resource/v2/Oauth2OperationObjectPasswordFlow.py:25-34 | checkov/openapi/checks/resource/v2/OperationObjectBasicAuth.py:25-34 | checkov/openapi/checks/resource/v2/OperationObjectConsumesUndefined.py:24-33 | checkov/openapi/checks/resource/v2/OperationObjectImplicitFlow.py:25-34 — before extracting anything, compare `checkov/openapi/checks/resource/v2/Oauth2OperationObjectPasswordFlow.py` and `checkov/openapi/checks/resource/v2/OperationObjectBasicAuth.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 4) checkov/bitbucket/base_bitbucket_configuration_check.py:25 — checkov/bitbucket/base_bitbucket_configuration_check.py:25-34 | checkov/github/base_github_configuration_check.py:18-27 | checkov/gitlab/base_gitlab_configuration_check.py:14-23 | checkov/openapi/checks/base_openapi_check.py:15-24 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Note first that the copies are not typed on the same thing: the declarations holding them bind `supported_entities` to `Iterable[str]` in one and `list[str]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (10 lines × 4) cdk_integration_tests/src/python/RDSEnhancedMonitorEnabled/fail__1__.py:7 — cdk_integration_tests/src/python/RDSEnhancedMonitorEnabled/fail__1__.py:7-16 | cdk_integration_tests/src/python/RDSEnhancedMonitorEnabled/pass.py:7-16 | cdk_integration_tests/src/python/RDSPubliclyAccessible/fail__1__.py:7-16 | cdk_integration_tests/src/python/RDSPubliclyAccessible/pass.py:7-16 — before extracting anything, compare `cdk_integration_tests/src/python/RDSEnhancedMonitorEnabled/fail__1__.py` and `cdk_integration_tests/src/python/RDSEnhancedMonitorEnabled/pass.py` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `cdk_integration_tests/src/python/RDSEnhancedMonitorEnabled/fail__1__.py:7` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D3 · God Classes · TooManyMethods · ×3
  • TooManyMethods: BcPlatformIntegration checkov/common/bridgecrew/platform_integration.py:113 — TooManyMethods — 66 methods. The bar is 30 methods; this is 36 over it, 2.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: TerraformLocalGraph checkov/terraform/graph_builder/local_graph.py:59 — TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: TFParser checkov/terraform/tf_parser.py:39 — TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Edited copy of a member (22 corresponding lines) · ×3
  • Edited copy of a member (22 corresponding lines) checkov/terraform/checks/resource/aws/AbsNACLUnrestrictedIngress.py:64 — checkov/terraform/checks/resource/aws/AbsNACLUnrestrictedIngress.py:64-87 | checkov/terraform/checks/resource/aws/AbsNACLUnrestrictedIngress.py:90-111 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) checkov/arm/graph_builder/local_graph.py:71 — checkov/arm/graph_builder/local_graph.py:71-93 | checkov/arm/graph_builder/local_graph.py:96-117 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) checkov/terraform/checks/resource/panos/NetworkIPsecAlgorithms.py:19 — checkov/terraform/checks/resource/panos/NetworkIPsecAlgorithms.py:19-40 | checkov/terraform/checks/resource/panos/NetworkIPsecAuthAlgorithms.py:19-40 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (25 corresponding lines) · ×3
  • Edited copy of a member (25 corresponding lines) checkov/helm/runner.py:43 — checkov/helm/runner.py:43-67 | checkov/kustomize/runner.py:62-90 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) cdk_integration_tests/src/python/ECSClusterContainerInsights/fail__1__.py:8 — cdk_integration_tests/src/python/ECSClusterContainerInsights/fail__1__.py:8-32 | cdk_integration_tests/src/python/ECSClusterContainerInsights/pass.py:8-36 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) cdk_integration_tests/src/python/APIGatewayCacheEnable/fail__2__.py:26 — cdk_integration_tests/src/python/APIGatewayCacheEnable/fail__2__.py:26-50 | cdk_integration_tests/src/python/APIGatewayCacheEnable/pass.py:28-54 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (20 corresponding lines) · ×3
  • Edited copy of a member (20 corresponding lines) checkov/arm/checks/resource/SQLServerEmailAlertsEnabled.py:20 — checkov/arm/checks/resource/SQLServerEmailAlertsEnabled.py:20-39 | checkov/arm/checks/resource/SQLServerEmailAlertsToAdminsEnabled.py:20-40 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) checkov/terraform/checks/data/aws/AdminPolicyDocument.py:17 — checkov/terraform/checks/data/aws/AdminPolicyDocument.py:17-38 | checkov/terraform/checks/data/aws/StarActionPolicyDocument.py:17-36 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) cdk_integration_tests/src/python/ELBAccessLogs/fail__1__.py:6 — cdk_integration_tests/src/python/ELBAccessLogs/fail__1__.py:6-25 | cdk_integration_tests/src/python/ELBAccessLogs/pass.py:6-25 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 8+ corresponding lines) · ×3
  • Edited copies of one member (3 members, 8+ corresponding lines) checkov/terraform/checks/resource/aws/ECSServiceFargateLatest.py:27 — checkov/terraform/checks/resource/aws/ECSServiceFargateLatest.py:27-34 | checkov/terraform/checks/resource/aws/RDSClusterAuditLogging.py:31-45 | checkov/terraform/checks/resource/gcp/GoogleSubnetworkIPV6PrivateGoogleEnabled.py:19-27 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 8+ corresponding lines) checkov/bitbucket/checks/merge_requests_approvals.py:13 — checkov/bitbucket/checks/merge_requests_approvals.py:13-22 | checkov/github/base_github_branch_security.py:18-25 | checkov/github/checks/disallow_inactive_branch_60days.py:16-25 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 8+ corresponding lines) checkov/kubernetes/checks/resource/k8s/ApiServerEncryptionProviders.py:15 — checkov/kubernetes/checks/resource/k8s/ApiServerEncryptionProviders.py:15-22 | checkov/kubernetes/checks/resource/k8s/ApiServerEtcdCaFile.py:15-22 | checkov/kubernetes/checks/resource/k8s/EtcdPeerFiles.py:16-23 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (7 members, 5+ corresponding lines) · ×3
  • Edited copies of one member (7 members, 5+ corresponding lines) checkov/arm/checks/resource/SQLServerAuditingEnabled.py:18 — checkov/arm/checks/resource/SQLServerAuditingEnabled.py:18-22 | checkov/cloudformation/checks/resource/aws/ElasticsearchDomainAuditLogging.py:7-11 | checkov/cloudformation/checks/resource/aws/ElasticsearchDomainLogging.py:11-15 | checkov/terraform/checks/resource/aws/ElasticsearchDomainAuditLogging.py:11-15 | checkov/terraform/checks/resource/aws/RDSEnhancedMonitorEnabled.py:11-15 | checkov/terraform/checks/resource/aws/RDSInstancePerformanceInsights.py:7-11 | checkov/terraform/checks/resource/aws/WAFHasLogs.py:10-14 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
  • Edited copies of one member (7 members, 5+ corresponding lines) checkov/cloudformation/checks/resource/aws/APIGatewayAccessLogging.py:8 — checkov/cloudformation/checks/resource/aws/APIGatewayAccessLogging.py:8-12 | checkov/cloudformation/checks/resource/aws/APIGatewayV2AccessLogging.py:8-12 | checkov/cloudformation/checks/resource/aws/APIGatewayXray.py:7-11 | checkov/terraform/checks/resource/aws/APIGatewayAccessLogging.py:9-13 | checkov/terraform/checks/resource/aws/ELBv2AccessLogs.py:7-11 | checkov/terraform/checks/resource/aws/ElasticsearchDomainLogging.py:9-13 | checkov/terraform/checks/resource/azure/FunctionAppEnableLogging.py:7-12 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
  • Edited copies of one member (7 members, 5+ corresponding lines) checkov/cloudformation/checks/resource/aws/AbsSecurityGroupUnrestrictedIngress.py:7 — checkov/cloudformation/checks/resource/aws/AbsSecurityGroupUnrestrictedIngress.py:7-11 | checkov/terraform/checks/resource/alicloud/AbsSecurityGroupUnrestrictedIngress.py:9-13 | checkov/terraform/checks/resource/aws/AbsNACLUnrestrictedIngress.py:7-11 | checkov/terraform/checks/resource/gcp/GoogleCloudSqlServerNoPublicIP.py:7-11 | checkov/terraform/checks/resource/oci/AbsSecurityGroupUnrestrictedIngress.py:8-12 | checkov/terraform/checks/resource/oci/AbsSecurityListUnrestrictedIngress.py:8-13 | checkov/terraform/checks/resource/openstack/AbsSecurityGroupUnrestrictedIngress.py:9-13 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 4+ corresponding lines) · ×3
  • Edited copies of one member (3 members, 4+ corresponding lines) checkov/common/runners/graph_builder/local_graph.py:15 — checkov/common/runners/graph_builder/local_graph.py:15-18 | checkov/dockerfile/graph_builder/local_graph.py:23-26 | checkov/serverless/graph_builder/local_graph.py:15-18 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 4+ corresponding lines) checkov/arm/graph_builder/local_graph.py:211 — checkov/arm/graph_builder/local_graph.py:211-214 | checkov/bicep/graph_builder/local_graph.py:254-257 | checkov/terraform/graph_builder/local_graph.py:723-726 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 4+ corresponding lines) checkov/arm/base_resource_negative_value_check.py:27 — checkov/arm/base_resource_negative_value_check.py:27-30 | checkov/arm/base_resource_value_check.py:26-29 | checkov/bicep/checks/resource/base_resource_value_check.py:23-26 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×3
  • Duplicated block (18 lines × 2) checkov/arm/context_parser.py:161 — checkov/arm/context_parser.py:161-178 | checkov/cloudformation/context_parser.py:154-171 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note first that the copies are not typed on the same thing: the declarations holding them bind `path` to `list[str | int]` in one and `list[int | str]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (18 lines × 2) checkov/terraform/checks/data/base_cloudsplaining_data_iam_check.py:36 — checkov/terraform/checks/data/base_cloudsplaining_data_iam_check.py:36-53 | checkov/terraform/checks/resource/base_cloudsplaining_resource_iam_check.py:49-66 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (18 lines × 2) checkov/argo_workflows/checks/base_argo_workflows_check.py:24 — checkov/argo_workflows/checks/base_argo_workflows_check.py:24-41 | checkov/azure_pipelines/checks/base_azure_pipelines_check.py:24-41 — before extracting anything, compare `checkov/argo_workflows/checks/base_argo_workflows_check.py` and `checkov/azure_pipelines/checks/base_azure_pipelines_check.py` as WHOLE FILES: 87% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (11 lines × 8) · ×3
  • Duplicated block (11 lines × 8) checkov/terraform/checks/resource/kubernetes/AllowedCapabilities.py:22 — checkov/terraform/checks/resource/kubernetes/AllowedCapabilities.py:22-32 | checkov/terraform/checks/resource/kubernetes/AllowedCapabilitiesSysAdmin.py:20-30 | checkov/terraform/checks/resource/kubernetes/CPULimits.py:23-33 | checkov/terraform/checks/resource/kubernetes/CPURequests.py:19-29 | checkov/terraform/checks/resource/kubernetes/ContainerSecurityContext.py:21-31 | checkov/terraform/checks/resource/kubernetes/MemoryRequests.py:19-29 | checkov/terraform/checks/resource/kubernetes/MinimiseCapabilities.py:19-29 | checkov/terraform/checks/resource/kubernetes/Secrets.py:22-32 — before extracting anything, compare `checkov/terraform/checks/resource/kubernetes/AllowedCapabilities.py` and `checkov/terraform/checks/resource/kubernetes/AllowedCapabilitiesSysAdmin.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 8) checkov/arm/checks/resource/PostgreSQLEncryptionEnabled.py:7 — checkov/arm/checks/resource/PostgreSQLEncryptionEnabled.py:7-17 | checkov/cloudformation/checks/resource/aws/KinesisStreamEncryptionType.py:7-17 | checkov/cloudformation/checks/resource/aws/SagemakerNotebookInstanceAllowsIMDSv2.py:7-17 | checkov/terraform/checks/resource/aws/DAXEndpointTLS.py:7-17 | checkov/terraform/checks/resource/aws/ECRRepositoryEncrypted.py:7-17 | checkov/terraform/checks/resource/aws/KinesisStreamEncryptionType.py:7-17 | checkov/terraform/checks/resource/aws/SagemakerNotebookInstanceAllowsIMDSv2.py:7-17 | checkov/terraform/checks/resource/gcp/GoogleCloudDNSSECEnabled.py:12-34 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 8 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 8 times. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (11 lines × 8) checkov/cloudformation/checks/resource/aws/RedshiftInEc2ClassicMode.py:8 — checkov/cloudformation/checks/resource/aws/RedshiftInEc2ClassicMode.py:8-18 | checkov/terraform/checks/resource/aws/RedshiftInEc2ClassicMode.py:8-18 | checkov/terraform/checks/resource/azure/APIServicesUseVirtualNetwork.py:8-18 | checkov/terraform/checks/resource/azure/AzureContainerGroupDeployedIntoVirtualNetwork.py:12-22 | checkov/terraform/checks/resource/azure/AzureFirewallDefinesPolicy.py:9-19 | checkov/terraform/checks/resource/azure/AzureFrontDoorEnablesWAF.py:8-18 | checkov/terraform/checks/resource/azure/CognitiveServicesConfigureIdentity.py:8-18 | checkov/terraform/checks/resource/azure/CosmosDBHaveCMK.py:8-18 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 8 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 8 times.
D4 · Code Duplication · Duplicated block (11 lines × 7) · ×3
  • Duplicated block (11 lines × 7) checkov/kubernetes/checks/resource/base_root_container_check.py:33 — checkov/kubernetes/checks/resource/base_root_container_check.py:33-43 | checkov/kubernetes/checks/resource/k8s/DockerSocketVolume.py:33-43 | checkov/kubernetes/checks/resource/k8s/PodSecurityContext.py:33-43 | checkov/kubernetes/checks/resource/k8s/ServiceAccountTokens.py:33-43 | checkov/kubernetes/checks/resource/k8s/ShareHostIPC.py:33-43 | checkov/kubernetes/checks/resource/k8s/ShareHostPID.py:33-43 | checkov/kubernetes/checks/resource/k8s/SharedHostNetworkNamespace.py:33-43 — before extracting anything, compare `checkov/kubernetes/checks/resource/k8s/ShareHostIPC.py` and `checkov/kubernetes/checks/resource/k8s/ShareHostPID.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `conf` to `Dict[str, Any]` in one and `dict[str, Any]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (11 lines × 7) checkov/cloudformation/checks/resource/aws/BackupVaultEncrypted.py:8 — checkov/cloudformation/checks/resource/aws/BackupVaultEncrypted.py:8-18 | checkov/cloudformation/checks/resource/aws/CloudfrontDistributionLogging.py:8-18 | checkov/cloudformation/checks/resource/aws/RedshiftClusterLogging.py:8-18 | checkov/cloudformation/checks/resource/aws/S3AccessLogs.py:10-20 | checkov/terraform/checks/resource/aws/CloudformationStackNotificationArns.py:8-18 | checkov/terraform/checks/resource/aws/CloudfrontDistributionLogging.py:9-19 | checkov/terraform/checks/resource/aws/DBInstanceLogging.py:10-26 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 7 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 7 times.
  • Duplicated block (11 lines × 7) checkov/cloudformation/checks/resource/aws/ECRImmutableTags.py:9 — checkov/cloudformation/checks/resource/aws/ECRImmutableTags.py:9-19 | checkov/terraform/checks/resource/alicloud/RDSInstanceAutoUpgrade.py:8-18 | checkov/terraform/checks/resource/aws/ECRImmutableTags.py:9-19 | checkov/terraform/checks/resource/azure/AKSIsPaidSku.py:9-23 | checkov/terraform/checks/resource/azure/AppConfigSku.py:9-19 | checkov/terraform/checks/resource/gcp/DataflowPrivateJob.py:9-20 | checkov/terraform/checks/resource/ncp/LBListenerUsingHTTPS.py:10-20 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 7 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 7 times. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×3
  • Duplicated block (19 lines × 2) checkov/circleci_pipelines/checks/prevent_development_orbs.py:11 — checkov/circleci_pipelines/checks/prevent_development_orbs.py:11-29 | checkov/circleci_pipelines/checks/prevent_volatile_orbs.py:11-29 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (19 lines × 2) checkov/arm/graph_builder/local_graph.py:270 — checkov/arm/graph_builder/local_graph.py:270-288 | checkov/bicep/graph_builder/local_graph.py:322-340 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (19 lines × 2) cdk_integration_tests/src/python/WorkspaceRootVolumeEncrypted/fail__1__.py:6 — cdk_integration_tests/src/python/WorkspaceRootVolumeEncrypted/fail__1__.py:6-24 | cdk_integration_tests/src/python/WorkspaceUserVolumeEncrypted/fail__1__.py:6-24 — `cdk_integration_tests/src/python/WorkspaceRootVolumeEncrypted/fail__1__.py` and `cdk_integration_tests/src/python/WorkspaceUserVolumeEncrypted/fail__1__.py` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 1 separate duplicated blocks between them, totalling at least 19 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×3
  • Duplicated block (8 lines × 3) checkov/cloudformation/checks/resource/aws/CloudWatchLogGroupRetention.py:8 — checkov/cloudformation/checks/resource/aws/CloudWatchLogGroupRetention.py:8-18 | checkov/terraform/checks/resource/aws/CloudWatchLogGroupRetention.py:8-18 | checkov/terraform/checks/resource/aws/RedshiftClusterLogging.py:7-14 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (8 lines × 3) checkov/terraform/checks/resource/azure/AppServiceHTTPSOnly.py:7 — checkov/terraform/checks/resource/azure/AppServiceHTTPSOnly.py:7-14 | checkov/terraform/checks/resource/azure/AppServiceHttps20Enabled.py:7-14 | checkov/terraform/checks/resource/azure/AppServiceSetHealthCheck.py:14-24 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (8 lines × 3) checkov/terraform/checks/resource/azure/AppServiceSlotHTTPSOnly.py:7 — checkov/terraform/checks/resource/azure/AppServiceSlotHTTPSOnly.py:7-14 | checkov/terraform/checks/resource/gcp/GoogleComputeExternalIP.py:8-29 | checkov/terraform/checks/resource/gcp/GoogleComputeIPForward.py:7-36 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (5 lines × 8) · ×3
  • Duplicated block (5 lines × 8) checkov/arm/checks/parameter/SecureStringParameterNoHardcodedValue.py:11 — checkov/arm/checks/parameter/SecureStringParameterNoHardcodedValue.py:11-15 | checkov/bicep/checks/param/azure/SecureStringParameterNoHardcodedValue.py:9-13 | checkov/serverless/checks/function/aws/AWSCredentials.py:14-18 | checkov/terraform/checks/provider/bridgecrew/credentials.py:11-15 | checkov/terraform/checks/provider/linode/credentials.py:11-15 | checkov/terraform/checks/provider/ncp/credentials.py:11-15 | checkov/terraform/checks/resource/aws/DatasyncLocationExposesSecrets.py:12-16 | checkov/terraform/checks/resource/azure/VMCredsInCustomData.py:10-14 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 8 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 8 times.
  • Duplicated block (5 lines × 8) checkov/arm/checks/resource/SynapseWorkspaceAdministratorLoginPasswordHidden.py:11 — checkov/arm/checks/resource/SynapseWorkspaceAdministratorLoginPasswordHidden.py:11-15 | checkov/cloudformation/checks/resource/aws/EC2Credentials.py:11-15 | checkov/terraform/checks/provider/aws/credentials.py:11-15 | checkov/terraform/checks/provider/oci/credentials.py:9-13 | checkov/terraform/checks/provider/openstack/credentials.py:9-13 | checkov/terraform/checks/provider/panos/credentials.py:11-15 | checkov/terraform/checks/resource/aws/LambdaEnvironmentCredentials.py:11-15 | checkov/terraform/checks/resource/azure/SynapseWorkspaceAdministratorLoginPasswordHidden.py:9-13 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 8 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 8 times.
  • Duplicated block (5 lines × 8) checkov/terraform/checks/resource/aws/ALBDropHttpHeaders.py:7 — checkov/terraform/checks/resource/aws/ALBDropHttpHeaders.py:7-11 | checkov/terraform/checks/resource/aws/ElasticsearchInVPC.py:9-13 | checkov/terraform/checks/resource/aws/LBCrossZone.py:9-13 | checkov/terraform/checks/resource/aws/RDSPubliclyAccessible.py:7-11 | checkov/terraform/checks/resource/azure/NSGRuleUDPAccessRestricted.py:8-12 | checkov/terraform/checks/resource/azure/StorageAccountAzureServicesAccessEnabled.py:7-11 | checkov/terraform/checks/resource/azure/StorageAccountDefaultNetworkAccessDeny.py:7-11 | checkov/terraform/checks/resource/panos/NetworkIPsecProtocols.py:7-11 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 8 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 8 times.
D2 · Cognitive Complexity · Runner.run (cognitive 16) · ×2
  • Runner.run (cognitive 16) checkov/bicep/runner.py:78 — Runner.run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Runner.run (cognitive 16) checkov/sca_image/runner.py:151 — Runner.run has cognitive complexity 16 (threshold 15). Drivers by points: loops 3 (7 pts), if/else 5, boolean chains 3, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (5 members, 50+ identical tokens) checkov/terraform/checks/resource/aws/DLMEventsCrossRegionEncryption.py:14 — checkov/terraform/checks/resource/aws/DLMEventsCrossRegionEncryption.py:14-31 | checkov/terraform/checks/resource/aws/DLMEventsCrossRegionEncryptionWithCMK.py:14-31 | checkov/terraform/checks/resource/kubernetes/AllowedCapabilitiesSysAdmin.py:19-48 | checkov/terraform/checks/resource/kubernetes/PodSecurityContext.py:20-54 | checkov/terraform/checks/resource/kubernetes/ReadonlyRootFilesystem.py:17-38 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) checkov/terraform/checks/resource/gcp/ArtifactRegistryPrivateRepo.py:18 — checkov/terraform/checks/resource/gcp/ArtifactRegistryPrivateRepo.py:18-42 | checkov/terraform/checks/resource/gcp/BigQueryPrivateTable.py:18-42 | checkov/terraform/checks/resource/gcp/DataprocPrivateCluster.py:18-42 | checkov/terraform/checks/resource/gcp/GCPCloudRunPrivateService.py:18-42 | checkov/terraform/checks/resource/gcp/PubSubPrivateTopic.py:18-42 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Edited copy of a member (36 corresponding lines) · ×2
  • Edited copy of a member (36 corresponding lines) checkov/common/output/record.py:197 — checkov/common/output/record.py:197-232 | checkov/sast/record.py:51-94 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (36 corresponding lines) checkov/common/checks_infra/solvers/connections_solvers/connection_exists_solver.py:96 — checkov/common/checks_infra/solvers/connections_solvers/connection_exists_solver.py:96-131 | checkov/common/checks_infra/solvers/connections_solvers/connection_exists_solver.py:140-177 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (30 corresponding lines) · ×2
  • Edited copy of a member (30 corresponding lines) checkov/common/util/secrets.py:160 — checkov/common/util/secrets.py:160-189 | checkov/common/util/secrets.py:200-237 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (30 corresponding lines) checkov/policies_3d/output.py:87 — checkov/policies_3d/output.py:87-120 | checkov/policies_3d/output.py:194-223 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (21 corresponding lines) · ×2
  • Edited copy of a member (21 corresponding lines) checkov/arm/context_parser.py:134 — checkov/arm/context_parser.py:134-154 | checkov/common/util/suppression.py:32-53 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) cdk_integration_tests/src/python/LambdaDLQConfigured/pass.py:33 — cdk_integration_tests/src/python/LambdaDLQConfigured/pass.py:33-53 | cdk_integration_tests/src/python/LambdaInVPC/pass.py:34-57 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 13+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 13+ corresponding lines) checkov/arm/runner.py:52 — checkov/arm/runner.py:52-66 | checkov/bicep/runner.py:64-76 | checkov/serverless/runner.py:68-81 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 13+ corresponding lines) cdk_integration_tests/src/python/LambdaEnvironmentEncryptionSettings/fail__2__.py:6 — cdk_integration_tests/src/python/LambdaEnvironmentEncryptionSettings/fail__2__.py:6-18 | cdk_integration_tests/src/python/LambdaEnvironmentEncryptionSettings/pass.py:6-19 | cdk_integration_tests/src/python/LambdaInVPC/fail__2__.py:9-21 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 16+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 16+ corresponding lines) checkov/bicep/image_referencer/provider/azure.py:35 — checkov/bicep/image_referencer/provider/azure.py:35-52 | checkov/cloudformation/image_referencer/provider/aws.py:35-50 | checkov/terraform/image_referencer/provider/aws.py:98-116 | checkov/terraform/image_referencer/provider/azure.py:30-45 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 16+ corresponding lines) checkov/common/checks_infra/solvers/attribute_solvers/length_greater_than_attribute_solver.py:12 — checkov/common/checks_infra/solvers/attribute_solvers/length_greater_than_attribute_solver.py:12-27 | checkov/common/checks_infra/solvers/attribute_solvers/length_greater_than_or_equal_attribute_solver.py:12-27 | checkov/common/checks_infra/solvers/attribute_solvers/length_less_than_attribute_solver.py:12-27 | checkov/common/checks_infra/solvers/attribute_solvers/length_less_than_or_equal_attribute_solver.py:12-27 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 9+ corresponding lines) · ×2
  • Edited copies of one member (5 members, 9+ corresponding lines) checkov/common/sca/reachability/package_alias_mapping/nodejs/utils.py:38 — checkov/common/sca/reachability/package_alias_mapping/nodejs/utils.py:38-46 | checkov/common/sca/reachability/package_alias_mapping/nodejs/utils.py:50-58 | checkov/common/sca/reachability/package_alias_mapping/nodejs/utils.py:62-73 | checkov/common/sca/reachability/package_alias_mapping/nodejs/utils.py:120-129 | checkov/common/sca/reachability/package_alias_mapping/nodejs/utils.py:133-141 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
  • Edited copies of one member (5 members, 9+ corresponding lines) checkov/common/checks_infra/solvers/attribute_solvers/number_of_words_equals_attribute_solver.py:12 — checkov/common/checks_infra/solvers/attribute_solvers/number_of_words_equals_attribute_solver.py:12-20 | checkov/common/checks_infra/solvers/attribute_solvers/number_of_words_greater_than_attribute_solver.py:12-23 | checkov/common/checks_infra/solvers/attribute_solvers/number_of_words_greater_than_or_equal_attribute_solver.py:12-23 | checkov/common/checks_infra/solvers/attribute_solvers/number_of_words_less_than_attribute_solver.py:12-23 | checkov/common/checks_infra/solvers/attribute_solvers/number_of_words_less_than_or_equal_attribute_solver.py:12-23 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 7+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 7+ corresponding lines) checkov/terraform/checks/resource/aws/DocDBAuditLogs.py:20 — checkov/terraform/checks/resource/aws/DocDBAuditLogs.py:20-28 | checkov/terraform/checks/resource/aws/DocDBTLS.py:14-20 | checkov/terraform/checks/resource/aws/RedShiftSSL.py:19-28 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) checkov/terraform/checks/resource/azure/FunctionAppMinTLSVersion.py:9 — checkov/terraform/checks/resource/azure/FunctionAppMinTLSVersion.py:9-23 | checkov/terraform/checks/resource/azure/FunctionAppsAccessibleOverHttps.py:12-18 | checkov/terraform/checks/resource/kubernetes/SharedHostNetworkNamespace.py:12-18 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 12+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 12+ corresponding lines) checkov/arm/utils.py:31 — checkov/arm/utils.py:31-45 | checkov/bicep/utils.py:56-67 | checkov/kubernetes/kubernetes_utils.py:47-59 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 12+ corresponding lines) cdk_integration_tests/src/python/CodeBuildProjectEncryption/fail__1__.py:6 — cdk_integration_tests/src/python/CodeBuildProjectEncryption/fail__1__.py:6-18 | cdk_integration_tests/src/python/CodeBuildProjectEncryption/pass.py:6-18 | cdk_integration_tests/src/python/CodeBuildProjectEncryption/pass.py:26-37 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 11+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 11+ corresponding lines) checkov/kubernetes/checks/resource/k8s/ApiServerAuthorizationModeNotAlwaysAllow.py:14 — checkov/kubernetes/checks/resource/k8s/ApiServerAuthorizationModeNotAlwaysAllow.py:14-24 | checkov/kubernetes/checks/resource/k8s/ApiServerStrongCryptographicCiphers.py:25-36 | checkov/kubernetes/checks/resource/k8s/KubeletAuthorizationModeNotAlwaysAllow.py:15-25 | checkov/kubernetes/checks/resource/k8s/KubeletCryptographicCiphers.py:26-37 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 11+ corresponding lines) checkov/terraform/checks/resource/aws/LambdaFunctionLevelConcurrentExecutionLimit.py:10 — checkov/terraform/checks/resource/aws/LambdaFunctionLevelConcurrentExecutionLimit.py:10-20 | checkov/terraform/checks/resource/aws/RDSClusterAuroraBacktrack.py:13-27 | checkov/terraform/checks/resource/azure/APIManagementPublicAccess.py:11-21 | checkov/terraform/checks/resource/openstack/FirewallRuleSetDestinationIP.py:9-19 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 6+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 6+ corresponding lines) checkov/common/bridgecrew/platform_integration.py:773 — checkov/common/bridgecrew/platform_integration.py:773-780 | checkov/common/bridgecrew/platform_integration.py:851-858 | checkov/common/bridgecrew/platform_integration.py:861-867 | checkov/common/bridgecrew/platform_integration.py:870-875 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 6+ corresponding lines) checkov/terraform/checks/resource/aws/ALBDesyncMode.py:7 — checkov/terraform/checks/resource/aws/ALBDesyncMode.py:7-15 | checkov/terraform/checks/resource/gcp/GoogleComputeBlockProjectSSH.py:9-14 | checkov/terraform/checks/resource/gcp/GoogleComputeDefaultServiceAccount.py:10-15 | checkov/terraform/checks/resource/gcp/GoogleComputeSerialPorts.py:7-12 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 5+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 5+ corresponding lines) checkov/terraform/checks/resource/aws/RedshiftClusterAutoSnap.py:7 — checkov/terraform/checks/resource/aws/RedshiftClusterAutoSnap.py:7-17 | checkov/terraform/checks/resource/azure/FunctionAppDisallowCORS.py:7-11 | checkov/terraform/checks/resource/digitalocean/SpacesBucketPublicRead.py:8-14 | checkov/terraform/checks/resource/openstack/ComputeInstanceAdminPassword.py:8-13 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 5+ corresponding lines) checkov/terraform/checks/resource/aws/AWSCodeGuruHasCMK.py:10 — checkov/terraform/checks/resource/aws/AWSCodeGuruHasCMK.py:10-20 | checkov/terraform/checks/resource/aws/NeptuneClusterBackupRetention.py:7-11 | checkov/terraform/checks/resource/aws/NeptuneDBClustersCopyTagsToSnapshots.py:7-11 | checkov/terraform/checks/resource/aws/NeptuneDBClustersIAMDatabaseAuthenticationEnabled.py:7-11 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 5+ corresponding lines) · ×2
  • Edited copies of one member (5 members, 5+ corresponding lines) checkov/arm/checks/resource/AppServiceSetHealthCheck.py:14 — checkov/arm/checks/resource/AppServiceSetHealthCheck.py:14-18 | checkov/arm/checks/resource/AppServiceSlotDebugDisabled.py:7-12 | checkov/arm/checks/resource/AppServiceSlotHTTPSOnly.py:7-11 | checkov/arm/checks/resource/MySQLPublicAccessDisabled.py:9-13 | checkov/terraform/checks/resource/azure/MySQLPublicAccessDisabled.py:9-13 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
  • Edited copies of one member (5 members, 5+ corresponding lines) checkov/arm/checks/resource/CosmosDBLocalAuthDisabled.py:9 — checkov/arm/checks/resource/CosmosDBLocalAuthDisabled.py:9-13 | checkov/terraform/checks/data/aws/IAMManagedAdminPolicy.py:16-26 | checkov/terraform/checks/resource/aws/IAMManagedAdminPolicy.py:16-33 | checkov/terraform/checks/resource/aws/LambdaServicePermission.py:11-15 | checkov/terraform/checks/resource/azure/CosmosDBLocalAuthDisabled.py:12-22 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (8 members, 5+ corresponding lines) · ×2
  • Edited copies of one member (8 members, 5+ corresponding lines) checkov/arm/checks/resource/VMEncryptionAtHostEnabled.py:13 — checkov/arm/checks/resource/VMEncryptionAtHostEnabled.py:13-17 | checkov/cloudformation/checks/resource/aws/GlueSecurityConfigurationEnabled.py:10-14 | checkov/cloudformation/checks/resource/aws/LambdaEnvironmentEncryptionSettings.py:11-15 | checkov/terraform/checks/resource/aws/ElasticsearchEncryption.py:7-11 | checkov/terraform/checks/resource/aws/ElasticsearchEncryptionWithCMK.py:8-12 | checkov/terraform/checks/resource/aws/ElasticsearchTLSPolicy.py:9-13 | checkov/terraform/checks/resource/aws/GlueSecurityConfigurationEnabled.py:10-14 | checkov/terraform/checks/resource/aws/LaunchConfigurationEBSEncryption.py:9-16 — These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 8 times and the copies will drift further apart.
  • Edited copies of one member (8 members, 5+ corresponding lines) checkov/arm/checks/resource/AppGatewayWAFACLCVE202144228.py:9 — checkov/arm/checks/resource/AppGatewayWAFACLCVE202144228.py:9-13 | checkov/arm/checks/resource/AppServiceFTPSState.py:9-13 | checkov/dockerfile/checks/RootUser.py:14-18 | checkov/dockerfile/checks/UpdateNotAlone.py:27-31 | checkov/terraform/checks/resource/aws/WAFRuleHasAnyActions.py:11-16 | checkov/terraform/checks/resource/azure/AppGatewayWAFACLCVE202144228.py:10-14 | checkov/terraform/checks/resource/azure/AppServiceFTPSState.py:7-11 | checkov/terraform/checks/resource/gcp/CloudArmorWAFACLCVE202144228.py:11-15 — These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 8 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (4 corresponding lines) · ×2
  • Edited copy of a member (4 corresponding lines) checkov/terraform/checks/data/base_check.py:21 — checkov/terraform/checks/data/base_check.py:21-24 | checkov/terraform/checks/module/base_module_check.py:21-39 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) checkov/common/output/csv.py:108 — checkov/common/output/csv.py:108-111 | REDACTED:413-416 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (33 lines × 2) · ×2
  • Duplicated block (33 lines × 2) checkov/terraform/checks/resource/aws/AbsSecurityGroupUnrestrictedEgress.py:79 — checkov/terraform/checks/resource/aws/AbsSecurityGroupUnrestrictedEgress.py:79-111 | checkov/terraform/checks/resource/aws/AbsSecurityGroupUnrestrictedIngress.py:79-111 — before extracting anything, compare `checkov/terraform/checks/resource/aws/AbsSecurityGroupUnrestrictedEgress.py` and `checkov/terraform/checks/resource/aws/AbsSecurityGroupUnrestrictedIngress.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (33 lines × 2) cdk_integration_tests/src/python/LambdaEnvironmentCredentials/fail__2__.py:7 — cdk_integration_tests/src/python/LambdaEnvironmentCredentials/fail__2__.py:7-39 | cdk_integration_tests/src/python/LambdaEnvironmentCredentials/pass.py:7-39 — before extracting anything, compare `cdk_integration_tests/src/python/LambdaEnvironmentCredentials/fail__2__.py` and `cdk_integration_tests/src/python/LambdaEnvironmentCredentials/pass.py` as WHOLE FILES: 93% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `cdk_integration_tests/src/python/LambdaEnvironmentCredentials/pass.py:7` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12 lines × 5) · ×2
  • Duplicated block (12 lines × 5) checkov/terraform/checks/resource/kubernetes/DangerousGitSync.py:18 — checkov/terraform/checks/resource/kubernetes/DangerousGitSync.py:18-29 | checkov/terraform/checks/resource/kubernetes/DropCapabilities.py:24-35 | checkov/terraform/checks/resource/kubernetes/MemoryLimits.py:19-30 | checkov/terraform/checks/resource/kubernetes/PrivilegedContainer.py:20-31 | checkov/terraform/checks/resource/kubernetes/ReadinessProbe.py:25-36 — before extracting anything, compare `checkov/terraform/checks/resource/kubernetes/DangerousGitSync.py` and `checkov/terraform/checks/resource/kubernetes/DropCapabilities.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `checkov/terraform/checks/resource/kubernetes/ReadinessProbe.py:38` calls `isinstance` and `checkov/terraform/checks/resource/kubernetes/MemoryLimits.py:32` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12 lines × 5) checkov/kubernetes/checks/resource/k8s/ApiServerAnonymousAuth.py:9 — checkov/kubernetes/checks/resource/k8s/ApiServerAnonymousAuth.py:9-20 | checkov/kubernetes/checks/resource/k8s/ApiServerInsecurePort.py:9-20 | checkov/kubernetes/checks/resource/k8s/KubeletMakeIptablesUtilChains.py:10-21 | checkov/kubernetes/checks/resource/k8s/KubeletProtectKernelDefaults.py:10-21 | checkov/kubernetes/checks/resource/k8s/SchedulerProfiling.py:9-20 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 5 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (10–11 lines × 3) · ×2
  • Duplicated block (10–11 lines × 3) checkov/serverless/runner.py:170 — checkov/serverless/runner.py:170-180 | checkov/serverless/runner.py:285-294 | checkov/serverless/runner.py:345-354 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `checkov/serverless/runner.py:170` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10–11 lines × 3) checkov/terraform/checks/resource/kubernetes/ImagePullPolicyAlways.py:23 — checkov/terraform/checks/resource/kubernetes/ImagePullPolicyAlways.py:23-32 | checkov/terraform/checks/resource/kubernetes/ImageTagFixed.py:21-30 | checkov/terraform/checks/resource/kubernetes/LivenessProbe.py:22-32 — before extracting anything, compare `checkov/terraform/checks/resource/kubernetes/ImagePullPolicyAlways.py` and `checkov/terraform/checks/resource/kubernetes/ImageTagFixed.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×2
  • Duplicated block (10 lines × 3) checkov/terraform/image_referencer/provider/azure.py:49 — checkov/terraform/image_referencer/provider/azure.py:49-58 | checkov/terraform/image_referencer/provider/azure.py:62-71 | checkov/terraform/image_referencer/provider/azure.py:85-94 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (10 lines × 3) checkov/terraform/checks/resource/aws/EKSPlatformVersion.py:11 — checkov/terraform/checks/resource/aws/EKSPlatformVersion.py:11-21 | checkov/terraform/checks/resource/aws/RedshiftClusterDatabaseName.py:9-18 | checkov/terraform/checks/resource/azure/AppConfigLocalAuth.py:8-19 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×2
  • Duplicated block (9–10 lines × 2) checkov/openapi/checks/resource/v2/Oauth2OperationObjectPasswordFlow.py:39 — checkov/openapi/checks/resource/v2/Oauth2OperationObjectPasswordFlow.py:39-47 | checkov/openapi/checks/resource/v2/SecurityDefinitionBasicAuth.py:25-34 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `checkov/openapi/checks/resource/v2/Oauth2OperationObjectPasswordFlow.py:48` calls `get` and `checkov/openapi/checks/resource/v2/SecurityDefinitionBasicAuth.py:35` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9–10 lines × 2) checkov/serverless/runner.py:204 — checkov/serverless/runner.py:204-213 | checkov/serverless/runner.py:267-275 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `checkov/serverless/runner.py:204` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9 lines × 8) · ×2
  • Duplicated block (9 lines × 8) checkov/kubernetes/checks/resource/k8s/ApiServerAdmissionControlAlwaysAdmit.py:14 — checkov/kubernetes/checks/resource/k8s/ApiServerAdmissionControlAlwaysAdmit.py:14-22 | checkov/kubernetes/checks/resource/k8s/ApiServerAlwaysPullImagesPlugin.py:14-22 | checkov/kubernetes/checks/resource/k8s/ApiServerNamespaceLifecyclePlugin.py:14-22 | checkov/kubernetes/checks/resource/k8s/ApiServerNodeRestrictionPlugin.py:14-22 | checkov/kubernetes/checks/resource/k8s/ApiServerPodSecurityPolicyPlugin.py:14-22 | checkov/kubernetes/checks/resource/k8s/ApiServerSecurityContextDenyPlugin.py:14-22 | checkov/kubernetes/checks/resource/k8s/ApiServerServiceAccountKeyFile.py:17-25 | checkov/kubernetes/checks/resource/k8s/ApiServerServiceAccountPlugin.py:14-22 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 8 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 8) checkov/serverless/checks/complete/base_complete_check.py:23 — checkov/serverless/checks/complete/base_complete_check.py:23-31 | checkov/serverless/checks/custom/base_custom_check.py:23-31 | checkov/serverless/checks/function/base_function_check.py:23-31 | checkov/serverless/checks/layer/base_layer_check.py:23-31 | checkov/serverless/checks/package/base_package_check.py:22-30 | checkov/serverless/checks/plugin/base_plugin_check.py:22-30 | checkov/serverless/checks/provider/base_provider_check.py:22-30 | checkov/serverless/checks/service/base_service_check.py:23-31 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 8 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 8 times.
D4 · Code Duplication · Duplicated block (9 lines × 5) · ×2
  • Duplicated block (9 lines × 5) checkov/terraform/checks/resource/kubernetes/AllowPrivilegeEscalation.py:28 — checkov/terraform/checks/resource/kubernetes/AllowPrivilegeEscalation.py:28-36 | checkov/terraform/checks/resource/kubernetes/ImageDigest.py:26-34 | checkov/terraform/checks/resource/kubernetes/ImagePullPolicyAlways.py:25-33 | checkov/terraform/checks/resource/kubernetes/ImageTagFixed.py:23-31 | checkov/terraform/checks/resource/kubernetes/LivenessProbe.py:25-33 — before extracting anything, compare `checkov/terraform/checks/resource/kubernetes/ImageDigest.py` and `checkov/terraform/checks/resource/kubernetes/ImagePullPolicyAlways.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 5) checkov/terraform/checks/resource/kubernetes/DangerousGitSync.py:21 — checkov/terraform/checks/resource/kubernetes/DangerousGitSync.py:21-29 | checkov/terraform/checks/resource/kubernetes/DropCapabilities.py:27-35 | checkov/terraform/checks/resource/kubernetes/ImageTagFixed.py:23-31 | checkov/terraform/checks/resource/kubernetes/PrivilegedContainer.py:23-31 | checkov/terraform/checks/resource/kubernetes/ReadinessProbe.py:28-36 — before extracting anything, compare `checkov/terraform/checks/resource/kubernetes/DangerousGitSync.py` and `checkov/terraform/checks/resource/kubernetes/DropCapabilities.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (9 lines × 4) · ×2
  • Duplicated block (9 lines × 4) checkov/helm/base_registry.py:59 — checkov/helm/base_registry.py:59-67 | checkov/helm/base_registry.py:72-80 | checkov/helm/base_registry.py:88-96 | checkov/kubernetes/checks/resource/base_registry.py:81-89 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `checkov/helm/base_registry.py:58` calls `any` and `checkov/helm/base_registry.py:87` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 4) checkov/terraform/checks/resource/alicloud/RDSRetention.py:11 — checkov/terraform/checks/resource/alicloud/RDSRetention.py:11-19 | checkov/terraform/checks/resource/aws/CodebuildHasLogs.py:8-19 | checkov/terraform/checks/resource/aws/RDSClusterAuditLogging.py:17-28 | checkov/terraform/checks/resource/aws/RDSClusterLogging.py:10-21 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times.
D4 · Code Duplication · Duplicated block (6–9 lines × 2) · ×2
  • Duplicated block (6–9 lines × 2) checkov/common/checks/base_check_registry.py:136 — checkov/common/checks/base_check_registry.py:136-144 | checkov/serverless/base_registry.py:33-38 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `checkov/common/checks/base_check_registry.py:136` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (6–9 lines × 2) checkov/main.py:642 — checkov/main.py:642-647 | checkov/main.py:698-706 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `checkov/main.py:698` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (7 lines × 5) · ×2
  • Duplicated block (7 lines × 5) checkov/terraform/checks/resource/kubernetes/AllowedCapabilities.py:26 — checkov/terraform/checks/resource/kubernetes/AllowedCapabilities.py:26-32 | checkov/terraform/checks/resource/kubernetes/AllowedCapabilitiesSysAdmin.py:24-30 | checkov/terraform/checks/resource/kubernetes/ContainerSecurityContext.py:25-31 | checkov/terraform/checks/resource/kubernetes/MinimiseCapabilities.py:23-29 | checkov/terraform/checks/resource/kubernetes/ReadinessProbe.py:30-36 — before extracting anything, compare `checkov/terraform/checks/resource/kubernetes/AllowedCapabilities.py` and `checkov/terraform/checks/resource/kubernetes/AllowedCapabilitiesSysAdmin.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 5) checkov/cloudformation/image_referencer/provider/aws.py:92 — checkov/cloudformation/image_referencer/provider/aws.py:92-98 | checkov/terraform/image_referencer/provider/aws.py:88-94 | checkov/terraform/image_referencer/provider/gcp.py:32-38 | checkov/terraform/image_referencer/provider/gcp.py:42-48 | checkov/terraform/image_referencer/provider/gcp.py:52-58 — there are 5 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (11 lines × 6) · ×2
  • Duplicated block (11 lines × 6) checkov/arm/checks/resource/EventgridTopicIdentityProviderEnabled.py:10 — checkov/arm/checks/resource/EventgridTopicIdentityProviderEnabled.py:10-20 | checkov/terraform/checks/resource/azure/AzureServicebusIdentityProviderEnabled.py:10-20 | checkov/terraform/checks/resource/azure/DataExplorerServiceIdentity.py:10-20 | checkov/terraform/checks/resource/azure/EventgridDomainIdentityProviderEnabled.py:10-20 | checkov/terraform/checks/resource/azure/EventgridTopicIdentityProviderEnabled.py:10-20 | checkov/terraform/checks/resource/azure/PubsubSpecifyIdentity.py:10-20 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 6 times.
  • Duplicated block (11 lines × 6) checkov/cloudformation/checks/resource/aws/RedshiftClusterPubliclyAccessible.py:7 — checkov/cloudformation/checks/resource/aws/RedshiftClusterPubliclyAccessible.py:7-17 | checkov/terraform/checks/resource/aws/RedshitClusterPubliclyAvailable.py:7-17 | checkov/terraform/checks/resource/azure/ACRPublicNetworkAccessDisabled.py:7-17 | checkov/terraform/checks/resource/azure/AzureSearchPublicNetworkAccessDisabled.py:7-17 | checkov/terraform/checks/resource/azure/CognitiveServicesDisablesPublicNetwork.py:7-17 | checkov/terraform/checks/resource/azure/CosmosDBDisablesPublicNetwork.py:7-17 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 6 times.
D4 · Code Duplication · Duplicated block (11 lines × 4) · ×2
  • Duplicated block (11 lines × 4) checkov/cloudformation/checks/resource/aws/AppSyncLogging.py:10 — checkov/cloudformation/checks/resource/aws/AppSyncLogging.py:10-20 | checkov/cloudformation/checks/resource/aws/CloudtrailEncryption.py:10-20 | checkov/terraform/checks/resource/alicloud/OSSBucketAccessLogs.py:10-20 | checkov/terraform/checks/resource/aws/AppSyncLogging.py:10-20 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times.
  • Duplicated block (11 lines × 4) checkov/terraform/checks/resource/kubernetes/HostPort.py:9 — checkov/terraform/checks/resource/kubernetes/HostPort.py:9-22 | checkov/terraform/checks/resource/kubernetes/ImageDigest.py:9-21 | checkov/terraform/checks/resource/kubernetes/ImagePullPolicyAlways.py:8-20 | checkov/terraform/checks/resource/kubernetes/ImageTagFixed.py:8-18 — before extracting anything, compare `checkov/terraform/checks/resource/kubernetes/HostPort.py` and `checkov/terraform/checks/resource/kubernetes/ImageDigest.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×2
  • Duplicated block (5 lines × 3) checkov/cloudformation/checks/resource/aws/IAMAdminPolicyDocument.py:8 — checkov/cloudformation/checks/resource/aws/IAMAdminPolicyDocument.py:8-12 | checkov/cloudformation/checks/resource/aws/IAMStarActionPolicyDocument.py:9-13 | checkov/terraform/checks/resource/kubernetes/WildcardRoles.py:10-16 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (5 lines × 3) checkov/terraform/checks/resource/azure/AppServiceAuthentication.py:7 — checkov/terraform/checks/resource/azure/AppServiceAuthentication.py:7-11 | checkov/terraform/checks/resource/azure/AppServiceIdentityProviderEnabled.py:8-12 | checkov/terraform/checks/resource/azure/AppServiceUsedAzureFiles.py:7-11 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
D1 · Cyclomatic Complexity · Checkov.run (cyclomatic 103) · ×1
  • Checkov.run (cyclomatic 103) checkov/main.py:255 — Checkov.run has cyclomatic complexity 103 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RunnerRegistry.print_reports (cyclomatic 66) · ×1
  • RunnerRegistry.print_reports (cyclomatic 66) checkov/common/runners/runner_registry.py:384 — RunnerRegistry.print_reports has cyclomatic complexity 66 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Runner.get_report (cyclomatic 48) · ×1
  • Runner.get_report (cyclomatic 48) checkov/secrets/runner.py:425 — Runner.get_report has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · parser_utils.find_var_blocks (cyclomatic 44) · ×1
  • parser_utils.find_var_blocks (cyclomatic 44) checkov/common/util/parser_utils.py:86 — parser_utils.find_var_blocks has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Seccomp.scan_spec_conf (cyclomatic 42) · ×1
  • Seccomp.scan_spec_conf (cyclomatic 42) checkov/kubernetes/checks/resource/k8s/Seccomp.py:25 — Seccomp.scan_spec_conf has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · S3SecureDataTransport.scan_resource_conf (cyclomatic 35) · ×1
  • S3SecureDataTransport.scan_resource_conf (cyclomatic 35) checkov/terraform/checks/resource/aws/S3SecureDataTransport.py:55 — S3SecureDataTransport.scan_resource_conf has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Report.get_exit_code (cyclomatic 34) · ×1
  • Report.get_exit_code (cyclomatic 34) checkov/common/output/report.py:143 — Report.get_exit_code has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RunnerFilter.__init__ (cyclomatic 33) · ×1
  • RunnerFilter.__init__ (cyclomatic 33) checkov/runner_filter.py:32 — RunnerFilter.__init__ has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GithubActionsOIDCTrustPolicy.scan_data_conf (cyclomatic 33) · ×1
  • GithubActionsOIDCTrustPolicy.scan_data_conf (cyclomatic 33) checkov/terraform/checks/data/aws/GithubActionsOIDCTrustPolicy.py:16 — GithubActionsOIDCTrustPolicy.scan_data_conf has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Registry._should_run_scan (cyclomatic 32) · ×1
  • Registry._should_run_scan (cyclomatic 32) checkov/helm/base_registry.py:49 — Registry._should_run_scan has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · APIGatewayMethodWOAuth._is_policy_secure (cyclomatic 32) · ×1
  • APIGatewayMethodWOAuth._is_policy_secure (cyclomatic 32) checkov/terraform/checks/resource/aws/APIGatewayMethodWOAuth.py:16 — APIGatewayMethodWOAuth._is_policy_secure has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RDSPostgreSQLLogFDWExtension.scan_resource_conf (cyclomatic 32) · ×1
  • RDSPostgreSQLLogFDWExtension.scan_resource_conf (cyclomatic 32) checkov/terraform/checks/resource/aws/RDSPostgreSQLLogFDWExtension.py:19 — RDSPostgreSQLLogFDWExtension.scan_resource_conf has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TFParser.handle_variables (cyclomatic 30) · ×1
  • TFParser.handle_variables (cyclomatic 30) checkov/terraform/tf_parser.py:552 — TFParser.handle_variables has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GraphCheckParser._parse_raw_check (cyclomatic 29) · ×1
  • GraphCheckParser._parse_raw_check (cyclomatic 29) checkov/common/checks_infra/checks_parser.py:231 — GraphCheckParser._parse_raw_check has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TFParser._load_modules (cyclomatic 29) · ×1
  • TFParser._load_modules (cyclomatic 29) checkov/terraform/tf_parser.py:205 — TFParser._load_modules has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · docs_generator.get_checks (cyclomatic 28) · ×1
  • docs_generator.get_checks (cyclomatic 28) checkov/docs_generator.py:87 — docs_generator.get_checks has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ClearTestAPIKey.scan_entity_conf (cyclomatic 28) · ×1
  • ClearTestAPIKey.scan_entity_conf (cyclomatic 28) checkov/openapi/checks/resource/generic/ClearTextAPIKey.py:19 — ClearTestAPIKey.scan_entity_conf has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · parser.parse (cyclomatic 27) · ×1
  • parser.parse (cyclomatic 27) checkov/cloudformation/parser/__init__.py:18 — parser.parse has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CustomRegexDetector._find_potential_secret (cyclomatic 27) · ×1
  • CustomRegexDetector._find_potential_secret (cyclomatic 27) checkov/secrets/plugins/custom_regex_detector.py:120 — CustomRegexDetector._find_potential_secret has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Decoder.json_object (cyclomatic 26) · ×1
  • Decoder.json_object (cyclomatic 26) checkov/common/parsers/json/decoder.py:278 — Decoder.json_object has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RunnerRegistry.run (cyclomatic 26) · ×1
  • RunnerRegistry.run (cyclomatic 26) checkov/common/runners/runner_registry.py:109 — RunnerRegistry.run has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Registry._should_run_scan (cyclomatic 26) · ×1
  • Registry._should_run_scan (cyclomatic 26) checkov/kubernetes/checks/resource/base_registry.py:48 — Registry._should_run_scan has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · output.create_cli_output (cyclomatic 26) · ×1
  • output.create_cli_output (cyclomatic 26) checkov/sca_package_2/output.py:81 — output.create_cli_output has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CloudArmorWAFACLCVE202144228.scan_resource_conf (cyclomatic 26) · ×1
  • CloudArmorWAFACLCVE202144228.scan_resource_conf (cyclomatic 26) checkov/terraform/checks/resource/gcp/CloudArmorWAFACLCVE202144228.py:17 — CloudArmorWAFACLCVE202144228.scan_resource_conf has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TerraformVariableRenderer._process_dynamic_blocks (cyclomatic 26) · ×1
  • TerraformVariableRenderer._process_dynamic_blocks (cyclomatic 26) checkov/terraform/graph_builder/variable_rendering/renderer.py:358 — TerraformVariableRenderer._process_dynamic_blocks has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Tiller.scan_resource_conf (cyclomatic 25) · ×1
  • Tiller.scan_resource_conf (cyclomatic 25) checkov/terraform/checks/resource/kubernetes/Tiller.py:18 — Tiller.scan_resource_conf has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ForeachAbstractHandler._update_attributes (cyclomatic 25) · ×1
  • ForeachAbstractHandler._update_attributes (cyclomatic 25) checkov/terraform/graph_builder/foreach/abstract_handler.py:121 — ForeachAbstractHandler._update_attributes has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ModuleLoaderRegistry.load (cyclomatic 25) · ×1
  • ModuleLoaderRegistry.load (cyclomatic 25) REDACTED:35 — ModuleLoaderRegistry.load has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Runner.add_python_check_results (cyclomatic 24) · ×1
  • Runner.add_python_check_results (cyclomatic 24) checkov/arm/runner.py:132 — Runner.add_python_check_results has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · output.create_package_overview_table_part (cyclomatic 24) · ×1
  • output.create_package_overview_table_part (cyclomatic 24) checkov/sca_package_2/output.py:359 — output.create_package_overview_table_part has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TerraformLocalGraph._build_edges_for_vertex (cyclomatic 24) · ×1
  • TerraformLocalGraph._build_edges_for_vertex (cyclomatic 24) checkov/terraform/graph_builder/local_graph.py:312 — TerraformLocalGraph._build_edges_for_vertex has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Registry._scan_yaml_array (cyclomatic 24) · ×1
  • Registry._scan_yaml_array (cyclomatic 24) checkov/yaml_doc/base_registry.py:27 — Registry._scan_yaml_array has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Report.print_console (cyclomatic 23) · ×1
  • Report.print_console (cyclomatic 23) checkov/common/output/report.py:282 — Report.print_console has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DictNode.items_safe (cyclomatic 23) · ×1
  • DictNode.items_safe (cyclomatic 23) checkov/common/parsers/node.py:119 — DictNode.items_safe has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BaseResourceValueCheck.scan_resource_conf (cyclomatic 23) · ×1
  • BaseResourceValueCheck.scan_resource_conf (cyclomatic 23) checkov/terraform/checks/resource/base_resource_value_check.py:57 — BaseResourceValueCheck.scan_resource_conf has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SuppressionsIntegration._check_suppression (cyclomatic 22) · ×1
  • SuppressionsIntegration._check_suppression (cyclomatic 22) checkov/common/bridgecrew/integration_features/features/suppressions_integration.py:193 — SuppressionsIntegration._check_suppression has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · resource_id_utils._generate_resource_key_recursive (cyclomatic 22) · ×1
  • resource_id_utils._generate_resource_key_recursive (cyclomatic 22) checkov/gitlab_ci/common/resource_id_utils.py:15 — resource_id_utils._generate_resource_key_recursive has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OperationObjectSecurityScopeUndefined.scan_openapi_conf (cyclomatic 22) · ×1
  • OperationObjectSecurityScopeUndefined.scan_openapi_conf (cyclomatic 22) checkov/openapi/checks/resource/v2/OperationObjectSecurityScopeUndefined.py:23 — OperationObjectSecurityScopeUndefined.scan_openapi_conf has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RunnerFilter.should_run_check (cyclomatic 22) · ×1
  • RunnerFilter.should_run_check (cyclomatic 22) checkov/runner_filter.py:194 — RunnerFilter.should_run_check has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TerraformVariableRenderer.evaluate_vertex_attribute_from_edge (cyclomatic 22) · ×1
  • TerraformVariableRenderer.evaluate_vertex_attribute_from_edge (cyclomatic 22) checkov/terraform/graph_builder/variable_rendering/renderer.py:95 — TerraformVariableRenderer.evaluate_vertex_attribute_from_edge has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NSGRulePortAccessRestricted.scan_resource_conf (cyclomatic 21) · ×1
  • NSGRulePortAccessRestricted.scan_resource_conf (cyclomatic 21) checkov/arm/checks/resource/NSGRulePortAccessRestricted.py:34 — NSGRulePortAccessRestricted.scan_resource_conf has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RepoConfigIntegration._set_enforcement_rules (cyclomatic 21) · ×1
  • RepoConfigIntegration._set_enforcement_rules (cyclomatic 21) checkov/common/bridgecrew/integration_features/features/repo_config_integration.py:69 — RepoConfigIntegration._set_enforcement_rules has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CycloneDX.create_bom (cyclomatic 21) · ×1
  • CycloneDX.create_bom (cyclomatic 21) REDACTED:66 — CycloneDX.create_bom has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · S3AbortIncompleteUploads.scan_resource_conf (cyclomatic 21) · ×1
  • S3AbortIncompleteUploads.scan_resource_conf (cyclomatic 21) checkov/terraform/checks/resource/aws/S3AbortIncompleteUploads.py:21 — S3AbortIncompleteUploads.scan_resource_conf has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SQSOverlyPermissive.scan_resource_conf (cyclomatic 21) · ×1
  • SQSOverlyPermissive.scan_resource_conf (cyclomatic 21) checkov/terraform/checks/resource/aws/SQSOverlyPermissive.py:14 — SQSOverlyPermissive.scan_resource_conf has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plan_parser._hclify (cyclomatic 21) · ×1
  • plan_parser._hclify (cyclomatic 21) checkov/terraform/plan_parser.py:108 — plan_parser._hclify has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BcPlatformIntegration.persist_repository (cyclomatic 20) · ×1
  • BcPlatformIntegration.persist_repository (cyclomatic 20) checkov/common/bridgecrew/platform_integration.py:560 — BcPlatformIntegration.persist_repository has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BaseAttributeSolver.get_operation (cyclomatic 20) · ×1
  • BaseAttributeSolver.get_operation (cyclomatic 20) checkov/common/checks_infra/solvers/attribute_solvers/base_attribute_solver.py:70 — BaseAttributeSolver.get_operation has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RootContainersHighUID.scan_spec_conf (cyclomatic 20) · ×1
  • RootContainersHighUID.scan_spec_conf (cyclomatic 20) checkov/kubernetes/checks/resource/k8s/RootContainersHighUID.py:19 — RootContainersHighUID.scan_spec_conf has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · KMSKeyWildcardPrincipal.scan_resource_conf (cyclomatic 20) · ×1
  • KMSKeyWildcardPrincipal.scan_resource_conf (cyclomatic 20) checkov/terraform/checks/resource/aws/KMSKeyWildcardPrincipal.py:14 — KMSKeyWildcardPrincipal.scan_resource_conf has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · S3AllowsAnyPrincipal.scan_resource_conf (cyclomatic 20) · ×1
  • S3AllowsAnyPrincipal.scan_resource_conf (cyclomatic 20) checkov/terraform/checks/resource/aws/S3AllowsAnyPrincipal.py:71 — S3AllowsAnyPrincipal.scan_resource_conf has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DockerSocketVolume.scan_resource_conf (cyclomatic 20) · ×1
  • DockerSocketVolume.scan_resource_conf (cyclomatic 20) checkov/terraform/checks/resource/kubernetes/DockerSocketVolume.py:24 — DockerSocketVolume.scan_resource_conf has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Secrets.scan_resource_conf (cyclomatic 20) · ×1
  • Secrets.scan_resource_conf (cyclomatic 20) checkov/terraform/checks/resource/kubernetes/Secrets.py:17 — Secrets.scan_resource_conf has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AbsSecurityGroupUnrestrictedIngress.scan_resource_conf (cyclomatic 19) · ×1
  • AbsSecurityGroupUnrestrictedIngress.scan_resource_conf (cyclomatic 19) checkov/cloudformation/checks/resource/aws/AbsSecurityGroupUnrestrictedIngress.py:13 — AbsSecurityGroupUnrestrictedIngress.scan_resource_conf has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Runner.run (cyclomatic 19) · ×1
  • Runner.run (cyclomatic 19) checkov/common/runners/object_runner.py:96 — Runner.run has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Runner.search_for_suppression (cyclomatic 19) · ×1
  • Runner.search_for_suppression (cyclomatic 19) checkov/secrets/runner.py:703 — Runner.search_for_suppression has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · S3SecureDataTransport._is_policy_secure (cyclomatic 19) · ×1
  • S3SecureDataTransport._is_policy_secure (cyclomatic 19) checkov/terraform/checks/resource/aws/S3SecureDataTransport.py:18 — S3SecureDataTransport._is_policy_secure has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WAFRuleHasAnyActions.scan_resource_conf (cyclomatic 19) · ×1
  • WAFRuleHasAnyActions.scan_resource_conf (cyclomatic 19) checkov/terraform/checks/resource/aws/WAFRuleHasAnyActions.py:18 — WAFRuleHasAnyActions.scan_resource_conf has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GoogleKMSKeyIsPublic.scan_resource_conf (cyclomatic 19) · ×1
  • GoogleKMSKeyIsPublic.scan_resource_conf (cyclomatic 19) checkov/terraform/checks/resource/gcp/GoogleKMSKeyIsPublic.py:25 — GoogleKMSKeyIsPublic.scan_resource_conf has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DropCapabilities.scan_resource_conf (cyclomatic 19) · ×1
  • DropCapabilities.scan_resource_conf (cyclomatic 19) checkov/terraform/checks/resource/kubernetes/DropCapabilities.py:19 — DropCapabilities.scan_resource_conf has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TerraformLocalGraph._get_the_default_provider (cyclomatic 19) · ×1
  • TerraformLocalGraph._get_the_default_provider (cyclomatic 19) checkov/terraform/graph_builder/local_graph.py:210 — TerraformLocalGraph._get_the_default_provider has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · VMDisablePasswordAuthentication.scan_resource_conf (cyclomatic 18) · ×1
  • VMDisablePasswordAuthentication.scan_resource_conf (cyclomatic 18) checkov/arm/checks/resource/VMDisablePasswordAuthentication.py:20 — VMDisablePasswordAuthentication.scan_resource_conf has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · VnetLocalDNS.scan_resource_conf (cyclomatic 18) · ×1
  • VnetLocalDNS.scan_resource_conf (cyclomatic 18) checkov/arm/checks/resource/VnetLocalDNS.py:21 — VnetLocalDNS.scan_resource_conf has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RunnerRegistry.get_fail_thresholds (cyclomatic 18) · ×1
  • RunnerRegistry.get_fail_thresholds (cyclomatic 18) checkov/common/runners/runner_registry.py:301 — RunnerRegistry.get_fail_thresholds has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BaseK8sContainerCheck.scan_spec_conf (cyclomatic 18) · ×1
  • BaseK8sContainerCheck.scan_spec_conf (cyclomatic 18) checkov/kubernetes/checks/resource/base_container_check.py:54 — BaseK8sContainerCheck.scan_spec_conf has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · RootContainers.scan_spec_conf (cyclomatic 18) · ×1
  • RootContainers.scan_spec_conf (cyclomatic 18) checkov/kubernetes/checks/resource/k8s/RootContainers.py:21 — RootContainers.scan_spec_conf has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AbsNACLUnrestrictedIngress.scan_resource_conf (cyclomatic 18) · ×1
  • AbsNACLUnrestrictedIngress.scan_resource_conf (cyclomatic 18) checkov/terraform/checks/resource/aws/AbsNACLUnrestrictedIngress.py:13 — AbsNACLUnrestrictedIngress.scan_resource_conf has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AbsNACLUnrestrictedIngress.check_rule (cyclomatic 18) · ×1
  • AbsNACLUnrestrictedIngress.check_rule (cyclomatic 18) checkov/terraform/checks/resource/aws/AbsNACLUnrestrictedIngress.py:63 — AbsNACLUnrestrictedIngress.check_rule has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AbsSecurityGroupUnrestrictedEgress.contains_violation (cyclomatic 18) · ×1
  • AbsSecurityGroupUnrestrictedEgress.contains_violation (cyclomatic 18) checkov/terraform/checks/resource/aws/AbsSecurityGroupUnrestrictedEgress.py:78 — AbsSecurityGroupUnrestrictedEgress.contains_violation has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AbsSecurityGroupUnrestrictedIngress.contains_violation (cyclomatic 18) · ×1
  • AbsSecurityGroupUnrestrictedIngress.contains_violation (cyclomatic 18) checkov/terraform/checks/resource/aws/AbsSecurityGroupUnrestrictedIngress.py:78 — AbsSecurityGroupUnrestrictedIngress.contains_violation has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BaseResourceNegativeValueCheck.scan_resource_conf (cyclomatic 18) · ×1
  • BaseResourceNegativeValueCheck.scan_resource_conf (cyclomatic 18) checkov/terraform/checks/resource/base_resource_negative_value_check.py:34 — BaseResourceNegativeValueCheck.scan_resource_conf has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plan_utils.create_definitions (cyclomatic 18) · ×1
  • plan_utils.create_definitions (cyclomatic 18) checkov/terraform/plan_utils.py:16 — plan_utils.create_definitions has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Runner.run (cyclomatic 18) · ×1
  • Runner.run (cyclomatic 18) checkov/terraform/runner.py:62 — Runner.run has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Runner.run_block (cyclomatic 18) · ×1
  • Runner.run_block (cyclomatic 18) checkov/terraform/runner.py:325 — Runner.run_block has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ECRPolicy.scan_resource_conf (cyclomatic 17) · ×1
  • ECRPolicy.scan_resource_conf (cyclomatic 17) checkov/cloudformation/checks/resource/aws/ECRPolicy.py:21 — ECRPolicy.scan_resource_conf has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SecurityGroupRuleDescription.scan_resource_conf (cyclomatic 17) · ×1
  • SecurityGroupRuleDescription.scan_resource_conf (cyclomatic 17) checkov/cloudformation/checks/resource/aws/SecurityGroupRuleDescription.py:17 — SecurityGroupRuleDescription.scan_resource_conf has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CloudformationVariableRenderer._evaluate_condition (cyclomatic 17) · ×1
  • CloudformationVariableRenderer._evaluate_condition (cyclomatic 17) checkov/cloudformation/graph_builder/variable_rendering/renderer.py:212 — CloudformationVariableRenderer._evaluate_condition has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Block.update_attribute (cyclomatic 17) · ×1
  • Block.update_attribute (cyclomatic 17) checkov/common/graph/graph_builder/graph_components/blocks.py:135 — Block.update_attribute has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · parser.parse (cyclomatic 17) · ×1
  • parser.parse (cyclomatic 17) checkov/common/parsers/yaml/parser.py:15 — parser.parse has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Runner.run (cyclomatic 17) · ×1
  • Runner.run (cyclomatic 17) checkov/dockerfile/runner.py:77 — Runner.run has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CosignSignPresent.scan_conf (cyclomatic 17) · ×1
  • CosignSignPresent.scan_conf (cyclomatic 17) checkov/github_actions/checks/job/CosignArtifacts.py:24 — CosignSignPresent.scan_conf has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CleartextCredsOverUnencryptedChannel.scan_openapi_conf (cyclomatic 17) · ×1
  • CleartextCredsOverUnencryptedChannel.scan_openapi_conf (cyclomatic 17) checkov/openapi/checks/resource/v3/CleartextOverUnencryptedChannel.py:19 — CleartextCredsOverUnencryptedChannel.scan_openapi_conf has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Policy3dParser._create_module_predicament (cyclomatic 17) · ×1
  • Policy3dParser._create_module_predicament (cyclomatic 17) checkov/policies_3d/checks_parser.py:96 — Policy3dParser._create_module_predicament has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · APIGatewayMethodWOAuth.scan_resource_conf (cyclomatic 17) · ×1
  • APIGatewayMethodWOAuth.scan_resource_conf (cyclomatic 17) checkov/terraform/checks/resource/aws/APIGatewayMethodWOAuth.py:66 — APIGatewayMethodWOAuth.scan_resource_conf has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · S3ProtectAgainstPolicyLockout.scan_resource_conf (cyclomatic 17) · ×1
  • S3ProtectAgainstPolicyLockout.scan_resource_conf (cyclomatic 17) checkov/terraform/checks/resource/aws/S3ProtectAgainstPolicyLockout.py:19 — S3ProtectAgainstPolicyLockout.scan_resource_conf has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SNSCrossAccountAccess.scan_resource_conf (cyclomatic 17) · ×1
  • SNSCrossAccountAccess.scan_resource_conf (cyclomatic 17) checkov/terraform/checks/resource/aws/SNSCrossAccountAccess.py:19 — SNSCrossAccountAccess.scan_resource_conf has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GithubActionsOIDCTrustPolicy.scan_resource_conf (cyclomatic 17) · ×1
  • GithubActionsOIDCTrustPolicy.scan_resource_conf (cyclomatic 17) checkov/terraform/checks/resource/gcp/GithubActionsOIDCTrustPolicy.py:28 — GithubActionsOIDCTrustPolicy.scan_resource_conf has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AllowedCapabilitiesSysAdmin.scan_resource_conf (cyclomatic 17) · ×1
  • AllowedCapabilitiesSysAdmin.scan_resource_conf (cyclomatic 17) checkov/terraform/checks/resource/kubernetes/AllowedCapabilitiesSysAdmin.py:18 — AllowedCapabilitiesSysAdmin.scan_resource_conf has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RegistryLoader._load_module (cyclomatic 17) · ×1
  • RegistryLoader._load_module (cyclomatic 17) checkov/terraform/module_loading/loaders/registry_loader.py:76 — RegistryLoader._load_module has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · parser.handle_block_type (cyclomatic 17) · ×1
  • parser.handle_block_type (cyclomatic 17) checkov/terraform_json/parser.py:96 — parser.handle_block_type has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PostgreSQLServerConnectionThrottlingEnabled.scan_resource_conf (cyclomatic 16) · ×1
  • PostgreSQLServerConnectionThrottlingEnabled.scan_resource_conf (cyclomatic 16) checkov/arm/checks/resource/PostgreSQLServerConnectionThrottlingEnabled.py:19 — PostgreSQLServerConnectionThrottlingEnabled.scan_resource_conf has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PostgreSQLServerLogCheckpointsEnabled.scan_resource_conf (cyclomatic 16) · ×1
  • PostgreSQLServerLogCheckpointsEnabled.scan_resource_conf (cyclomatic 16) checkov/arm/checks/resource/PostgreSQLServerLogCheckpointsEnabled.py:20 — PostgreSQLServerLogCheckpointsEnabled.scan_resource_conf has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PostgreSQLServerLogConnectionsEnabled.scan_resource_conf (cyclomatic 16) · ×1
  • PostgreSQLServerLogConnectionsEnabled.scan_resource_conf (cyclomatic 16) checkov/arm/checks/resource/PostgreSQLServerLogConnectionsEnabled.py:20 — PostgreSQLServerLogConnectionsEnabled.scan_resource_conf has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · IAMRoleAllowAssumeFromAccount.scan_resource_conf (cyclomatic 16) · ×1
  • IAMRoleAllowAssumeFromAccount.scan_resource_conf (cyclomatic 16) checkov/cloudformation/checks/resource/aws/IAMRoleAllowAssumeFromAccount.py:21 — IAMRoleAllowAssumeFromAccount.scan_resource_conf has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · KMSKeyWildCardPrincipal.scan_resource_conf (cyclomatic 16) · ×1
  • KMSKeyWildCardPrincipal.scan_resource_conf (cyclomatic 16) checkov/cloudformation/checks/resource/aws/KMSKeyWildCardPrincipal.py:20 — KMSKeyWildCardPrincipal.scan_resource_conf has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BaseResourceValueCheck.scan_resource_conf (cyclomatic 16) · ×1
  • BaseResourceValueCheck.scan_resource_conf (cyclomatic 16) checkov/cloudformation/checks/resource/base_resource_value_check.py:54 — BaseResourceValueCheck.scan_resource_conf has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CustomPoliciesIntegration.pre_scan (cyclomatic 16) · ×1
  • CustomPoliciesIntegration.pre_scan (cyclomatic 16) checkov/common/bridgecrew/integration_features/features/custom_policies_integration.py:47 — CustomPoliciesIntegration.pre_scan has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CosignSignSBOM.scan_conf (cyclomatic 16) · ×1
  • CosignSignSBOM.scan_conf (cyclomatic 16) checkov/github_actions/checks/job/CosignSBOM.py:24 — CosignSignSBOM.scan_conf has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Runner.run (cyclomatic 16) · ×1
  • Runner.run (cyclomatic 16) checkov/kubernetes/runner.py:83 — Runner.run has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Oauth2OperationObjectPasswordFlow.scan_openapi_conf (cyclomatic 16) · ×1
  • Oauth2OperationObjectPasswordFlow.scan_openapi_conf (cyclomatic 16) checkov/openapi/checks/resource/v2/Oauth2OperationObjectPasswordFlow.py:23 — Oauth2OperationObjectPasswordFlow.scan_openapi_conf has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Policy3dRunner.create_record (cyclomatic 16) · ×1
  • Policy3dRunner.create_record (cyclomatic 16) checkov/policies_3d/runner.py:100 — Policy3dRunner.create_record has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Runner.verify_secrets (cyclomatic 16) · ×1
  • Runner.verify_secrets (cyclomatic 16) checkov/secrets/runner.py:792 — Runner.verify_secrets has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AbsNACLUnrestrictedIngress.check_deny_rule (cyclomatic 16) · ×1
  • AbsNACLUnrestrictedIngress.check_deny_rule (cyclomatic 16) checkov/terraform/checks/resource/aws/AbsNACLUnrestrictedIngress.py:89 — AbsNACLUnrestrictedIngress.check_deny_rule has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GoogleComputeDefaultServiceAccountFullAccess.scan_resource_conf (cyclomatic 16) · ×1
  • GoogleComputeDefaultServiceAccountFullAccess.scan_resource_conf (cyclomatic 16) checkov/terraform/checks/resource/gcp/GoogleComputeDefaultServiceAccountFullAccess.py:20 — GoogleComputeDefaultServiceAccountFullAccess.scan_resource_conf has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · IAMPassportAccountUsage.scan_resource_conf (cyclomatic 16) · ×1
  • IAMPassportAccountUsage.scan_resource_conf (cyclomatic 16) checkov/terraform/checks/resource/yandexcloud/IAMPassportAccountUsage.py:29 — IAMPassportAccountUsage.scan_resource_conf has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · evaluate_terraform.find_conditional_expression_groups (cyclomatic 16) · ×1
  • evaluate_terraform.find_conditional_expression_groups (cyclomatic 16) checkov/terraform/graph_builder/variable_rendering/evaluate_terraform.py:580 — evaluate_terraform.find_conditional_expression_groups has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TerraformVariableRenderer.extract_value_from_vertex (cyclomatic 16) · ×1
  • TerraformVariableRenderer.extract_value_from_vertex (cyclomatic 16) checkov/terraform/graph_builder/variable_rendering/renderer.py:180 — TerraformVariableRenderer.extract_value_from_vertex has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · module_finder.find_modules (cyclomatic 16) · ×1
  • module_finder.find_modules (cyclomatic 16) checkov/terraform/module_loading/module_finder.py:55 — module_finder.find_modules has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · parser.hclify (cyclomatic 16) · ×1
  • parser.hclify (cyclomatic 16) checkov/terraform_json/parser.py:143 — parser.hclify has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dangerfile.failIfLoggingLineContainsSensitiveData (cyclomatic 16) · ×1
  • dangerfile.failIfLoggingLineContainsSensitiveData (cyclomatic 16) dangerfile.ts:44 — dangerfile.failIfLoggingLineContainsSensitiveData has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 2 function items inside it that branch (processFile, shouldProcessFile). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D12 · Dependency Hygiene · No Gemfile.lock committed by an application · ×1
  • No Gemfile.lock committed by an application — This repository declares 8 gem(s) across 1 Bundler manifest(s) and ships no application `.gemspec`, so it is an APPLICATION — but no `Gemfile.lock` is committed. Nothing records the versions a working build resolved to, so `bundle install` re-resolves against whatever rubygems.org serves today and two deploys of this commit are not guaranteed to be the same deploy. Run `bundle install` and commit the resulting `Gemfile.lock`. (A published GEM correctly omits its lock, which is why this is asked only of a repository that ships no .gemspec.)
D15 · Churn × Complexity Hotspots · Hotspot · ×1
  • Hotspot: checkov/common/bridgecrew/integration_features/features/suppressions_integration.py checkov/common/bridgecrew/integration_features/features/suppressions_integration.py:193 — checkov/common/bridgecrew/integration_features/features/suppressions_integration.py changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in SuppressionsIntegration._check_suppression at line 193. 2 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 23:01:47 +00:00' --until='2026-11-12 23:01:47 +00:00' --full-history --no-merges -- checkov/common/bridgecrew/integration_features/features/suppressions_integration.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D15 · Churn × Complexity Hotspots · Repeated repair · ×1
  • Repeated repair: checkov/terraform/module_loading/loaders/git_loader.py checkov/terraform/module_loading/loaders/git_loader.py:243 — checkov/terraform/module_loading/loaders/git_loader.py changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is GenericGitLoader._parse_module_source at line 243), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(terraform): add optional allowlist for external module download sources (#7758)”; “fix(general): harden network and credential handling defaults (#7701)”; “fix(terraform): external module ref keeps inside directory (#7721)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 23:01:47 +00:00' --until='2026-11-12 23:01:47 +00:00' --full-history --no-merges -- checkov/terraform/module_loading/loaders/git_loader.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D2 · Cognitive Complexity · Checkov.run (cognitive 184) · ×1
  • Checkov.run (cognitive 184) checkov/main.py:255 — Checkov.run has cognitive complexity 184 (threshold 15). Drivers by points: if/else 67 (120 pts), error handling 14 (28 pts), loops 5 (16 pts), boolean chains 15, ternaries 3 (5 pts) (nesting depth added 80). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GithubActionsOIDCTrustPolicy.scan_data_conf (cognitive 141) · ×1
  • GithubActionsOIDCTrustPolicy.scan_data_conf (cognitive 141) checkov/terraform/checks/data/aws/GithubActionsOIDCTrustPolicy.py:16 — GithubActionsOIDCTrustPolicy.scan_data_conf has cognitive complexity 141 (threshold 15). Drivers by points: if/else 18 (101 pts), loops 7 (33 pts), boolean chains 7 (nesting depth added 109). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · RunnerRegistry.print_reports (cognitive 129) · ×1
  • RunnerRegistry.print_reports (cognitive 129) checkov/common/runners/runner_registry.py:384 — RunnerRegistry.print_reports has cognitive complexity 129 (threshold 15). Drivers by points: if/else 47 (101 pts), loops 8 (17 pts), boolean chains 9, error handling 1, ternaries 1 (nesting depth added 63). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Seccomp.scan_spec_conf (cognitive 129) · ×1
  • Seccomp.scan_spec_conf (cognitive 129) checkov/kubernetes/checks/resource/k8s/Seccomp.py:25 — Seccomp.scan_spec_conf has cognitive complexity 129 (threshold 15). Drivers by points: if/else 30 (99 pts), loops 4 (17 pts), ternaries 3 (8 pts), boolean chains 5 (nesting depth added 87). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · VnetLocalDNS.scan_resource_conf (cognitive 102) · ×1
  • VnetLocalDNS.scan_resource_conf (cognitive 102) checkov/arm/checks/resource/VnetLocalDNS.py:21 — VnetLocalDNS.scan_resource_conf has cognitive complexity 102 (threshold 15). Drivers by points: if/else 10 (62 pts), loops 2 (15 pts), error handling 1 (11 pts), ternaries 1 (11 pts), boolean chains 3 (nesting depth added 85). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Runner.add_python_check_results (cognitive 100) · ×1
  • Runner.add_python_check_results (cognitive 100) checkov/arm/runner.py:132 — Runner.add_python_check_results has cognitive complexity 100 (threshold 15). Drivers by points: if/else 12 (56 pts), loops 8 (40 pts), boolean chains 4 (nesting depth added 76). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · NSGRulePortAccessRestricted.scan_resource_conf (cognitive 93) · ×1
  • NSGRulePortAccessRestricted.scan_resource_conf (cognitive 93) checkov/arm/checks/resource/NSGRulePortAccessRestricted.py:34 — NSGRulePortAccessRestricted.scan_resource_conf has cognitive complexity 93 (threshold 15). Drivers by points: if/else 14 (72 pts), loops 3 (18 pts), boolean chains 3 (nesting depth added 73). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · output.create_cli_output (cognitive 87) · ×1
  • output.create_cli_output (cognitive 87) checkov/sca_package_2/output.py:81 — output.create_cli_output has cognitive complexity 87 (threshold 15). Drivers by points: if/else 19 (68 pts), ternaries 2 (10 pts), loops 4 (7 pts), boolean chains 2 (nesting depth added 60). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TFParser._load_modules (cognitive 86) · ×1
  • TFParser._load_modules (cognitive 86) checkov/terraform/tf_parser.py:205 — TFParser._load_modules has cognitive complexity 86 (threshold 15). Drivers by points: if/else 19 (64 pts), loops 4 (10 pts), boolean chains 4, error handling 1 (4 pts), ternaries 1 (4 pts) (nesting depth added 57). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Runner.get_report (cognitive 82) · ×1
  • Runner.get_report (cognitive 82) checkov/secrets/runner.py:425 — Runner.get_report has cognitive complexity 82 (threshold 15). Drivers by points: if/else 21 (43 pts), boolean chains 15, ternaries 4 (10 pts), loops 6 (8 pts), error handling 2 (6 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OperationObjectSecurityScopeUndefined.scan_openapi_conf (cognitive 73) · ×1
  • OperationObjectSecurityScopeUndefined.scan_openapi_conf (cognitive 73) checkov/openapi/checks/resource/v2/OperationObjectSecurityScopeUndefined.py:23 — OperationObjectSecurityScopeUndefined.scan_openapi_conf has cognitive complexity 73 (threshold 15). Drivers by points: if/else 14 (56 pts), loops 5 (15 pts), boolean chains 2 (nesting depth added 52). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · parser_utils.find_var_blocks (cognitive 72) · ×1
  • parser_utils.find_var_blocks (cognitive 72) checkov/common/util/parser_utils.py:86 — parser_utils.find_var_blocks has cognitive complexity 72 (threshold 15). Drivers by points: if/else 22 (58 pts), boolean chains 8, loops 2 (4 pts), ternaries 1 (2 pts) (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · S3AbortIncompleteUploads.scan_resource_conf (cognitive 69) · ×1
  • S3AbortIncompleteUploads.scan_resource_conf (cognitive 69) checkov/terraform/checks/resource/aws/S3AbortIncompleteUploads.py:21 — S3AbortIncompleteUploads.scan_resource_conf has cognitive complexity 69 (threshold 15). Drivers by points: if/else 10 (54 pts), boolean chains 8, loops 2 (7 pts) (nesting depth added 49). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · CustomRegexDetector._find_potential_secret (cognitive 67) · ×1
  • CustomRegexDetector._find_potential_secret (cognitive 67) checkov/secrets/plugins/custom_regex_detector.py:120 — CustomRegexDetector._find_potential_secret has cognitive complexity 67 (threshold 15). Drivers by points: if/else 16 (42 pts), ternaries 4 (10 pts), error handling 2 (6 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CloudArmorWAFACLCVE202144228.scan_resource_conf (cognitive 67) · ×1
  • CloudArmorWAFACLCVE202144228.scan_resource_conf (cognitive 67) checkov/terraform/checks/resource/gcp/CloudArmorWAFACLCVE202144228.py:17 — CloudArmorWAFACLCVE202144228.scan_resource_conf has cognitive complexity 67 (threshold 15). Drivers by points: if/else 15 (59 pts), boolean chains 6, loops 2 (nesting depth added 44). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Registry._scan_yaml_array (cognitive 66) · ×1
  • Registry._scan_yaml_array (cognitive 66) checkov/yaml_doc/base_registry.py:27 — Registry._scan_yaml_array has cognitive complexity 66 (threshold 15). Drivers by points: if/else 15 (49 pts), loops 4 (12 pts), boolean chains 5 (nesting depth added 42). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · TerraformLocalGraph._build_edges_for_vertex (cognitive 65) · ×1
  • TerraformLocalGraph._build_edges_for_vertex (cognitive 65) checkov/terraform/graph_builder/local_graph.py:312 — TerraformLocalGraph._build_edges_for_vertex has cognitive complexity 65 (threshold 15). Drivers by points: if/else 15 (46 pts), loops 6 (16 pts), boolean chains 3 (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DictNode.items_safe (cognitive 64) · ×1
  • DictNode.items_safe (cognitive 64) checkov/common/parsers/node.py:119 — DictNode.items_safe has cognitive complexity 64 (threshold 15). Drivers by points: if/else 8 (41 pts), loops 3 (16 pts), boolean chains 7 (nesting depth added 46). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · S3SecureDataTransport.scan_resource_conf (cognitive 64) · ×1
  • S3SecureDataTransport.scan_resource_conf (cognitive 64) checkov/terraform/checks/resource/aws/S3SecureDataTransport.py:55 — S3SecureDataTransport.scan_resource_conf has cognitive complexity 64 (threshold 15). Drivers by points: if/else 21 (48 pts), boolean chains 11, error handling 1 (3 pts), loops 1 (2 pts) (nesting depth added 30). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · SQSOverlyPermissive.scan_resource_conf (cognitive 63) · ×1
  • SQSOverlyPermissive.scan_resource_conf (cognitive 63) checkov/terraform/checks/resource/aws/SQSOverlyPermissive.py:14 — SQSOverlyPermissive.scan_resource_conf has cognitive complexity 63 (threshold 15). Drivers by points: if/else 12 (54 pts), boolean chains 6, loops 1 (3 pts) (nesting depth added 44). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · output.create_package_overview_table_part (cognitive 61) · ×1
  • output.create_package_overview_table_part (cognitive 61) checkov/sca_package_2/output.py:359 — output.create_package_overview_table_part has cognitive complexity 61 (threshold 15). Drivers by points: if/else 13 (37 pts), ternaries 6 (17 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RunnerRegistry.run (cognitive 60) · ×1
  • RunnerRegistry.run (cognitive 60) checkov/common/runners/runner_registry.py:109 — RunnerRegistry.run has cognitive complexity 60 (threshold 15). Drivers by points: if/else 21 (51 pts), loops 4 (8 pts), boolean chains 1 (nesting depth added 34). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ForeachAbstractHandler._update_attributes (cognitive 60) · ×1
  • ForeachAbstractHandler._update_attributes (cognitive 60) checkov/terraform/graph_builder/foreach/abstract_handler.py:121 — ForeachAbstractHandler._update_attributes has cognitive complexity 60 (threshold 15). Drivers by points: if/else 11 (42 pts), loops 4 (12 pts), boolean chains 6 (nesting depth added 39). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · TerraformLocalGraph._get_the_default_provider (cognitive 60) · ×1
  • TerraformLocalGraph._get_the_default_provider (cognitive 60) checkov/terraform/graph_builder/local_graph.py:210 — TerraformLocalGraph._get_the_default_provider has cognitive complexity 60 (threshold 15). Drivers by points: if/else 12 (37 pts), loops 6 (21 pts), boolean chains 2 (nesting depth added 40). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · IAMRoleAllowsPublicAssume.scan_resource_conf (cognitive 58) · ×1
  • IAMRoleAllowsPublicAssume.scan_resource_conf (cognitive 58) checkov/cloudformation/checks/resource/aws/IAMRoleAllowsPublicAssume.py:16 — IAMRoleAllowsPublicAssume.scan_resource_conf has cognitive complexity 58 (threshold 15). Drivers by points: if/else 10 (43 pts), loops 2 (11 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 44). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · APIGatewayMethodWOAuth._is_policy_secure (cognitive 57) · ×1
  • APIGatewayMethodWOAuth._is_policy_secure (cognitive 57) checkov/terraform/checks/resource/aws/APIGatewayMethodWOAuth.py:16 — APIGatewayMethodWOAuth._is_policy_secure has cognitive complexity 57 (threshold 15). Drivers by points: if/else 14 (37 pts), boolean chains 16, loops 2 (4 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TerraformVariableRenderer._process_dynamic_blocks (cognitive 57) · ×1
  • TerraformVariableRenderer._process_dynamic_blocks (cognitive 57) checkov/terraform/graph_builder/variable_rendering/renderer.py:358 — TerraformVariableRenderer._process_dynamic_blocks has cognitive complexity 57 (threshold 15). Drivers by points: if/else 11 (26 pts), loops 5 (15 pts), boolean chains 7, error handling 2 (6 pts), ternaries 1 (3 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SNSCrossAccountAccess.scan_resource_conf (cognitive 56) · ×1
  • SNSCrossAccountAccess.scan_resource_conf (cognitive 56) checkov/terraform/checks/resource/aws/SNSCrossAccountAccess.py:19 — SNSCrossAccountAccess.scan_resource_conf has cognitive complexity 56 (threshold 15). Drivers by points: if/else 10 (38 pts), loops 3 (12 pts), error handling 1 (4 pts), boolean chains 2 (nesting depth added 40). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · BcPlatformIntegration.persist_repository (cognitive 55) · ×1
  • BcPlatformIntegration.persist_repository (cognitive 55) checkov/common/bridgecrew/platform_integration.py:560 — BcPlatformIntegration.persist_repository has cognitive complexity 55 (threshold 15). Drivers by points: if/else 11 (35 pts), loops 5 (16 pts), boolean chains 3, ternaries 1 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Registry._should_run_scan (cognitive 55) · ×1
  • Registry._should_run_scan (cognitive 55) checkov/helm/base_registry.py:49 — Registry._should_run_scan has cognitive complexity 55 (threshold 15). Drivers by points: if/else 17 (47 pts), boolean chains 8 (nesting depth added 30). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · BaseResourceValueCheck.scan_resource_conf (cognitive 55) · ×1
  • BaseResourceValueCheck.scan_resource_conf (cognitive 55) checkov/terraform/checks/resource/base_resource_value_check.py:57 — BaseResourceValueCheck.scan_resource_conf has cognitive complexity 55 (threshold 15). Drivers by points: if/else 14 (43 pts), boolean chains 7, loops 2 (5 pts) (nesting depth added 32). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Decoder.json_object (cognitive 53) · ×1
  • Decoder.json_object (cognitive 53) checkov/common/parsers/json/decoder.py:278 — Decoder.json_object has cognitive complexity 53 (threshold 15). Drivers by points: if/else 17 (34 pts), error handling 7 (18 pts), loops 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RDSPostgreSQLLogFDWExtension.scan_resource_conf (cognitive 53) · ×1
  • RDSPostgreSQLLogFDWExtension.scan_resource_conf (cognitive 53) checkov/terraform/checks/resource/aws/RDSPostgreSQLLogFDWExtension.py:19 — RDSPostgreSQLLogFDWExtension.scan_resource_conf has cognitive complexity 53 (threshold 15). Drivers by points: if/else 12 (42 pts), boolean chains 11 (nesting depth added 30). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · VnetLocalDNS.scan_resource_conf (cognitive 52) · ×1
  • VnetLocalDNS.scan_resource_conf (cognitive 52) checkov/terraform/checks/resource/azure/VnetLocalDNS.py:22 — VnetLocalDNS.scan_resource_conf has cognitive complexity 52 (threshold 15). Drivers by points: if/else 6 (26 pts), loops 2 (9 pts), error handling 1 (7 pts), ternaries 1 (7 pts), boolean chains 3 (nesting depth added 39). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Secrets.scan_resource_conf (cognitive 52) · ×1
  • Secrets.scan_resource_conf (cognitive 52) checkov/terraform/checks/resource/kubernetes/Secrets.py:17 — Secrets.scan_resource_conf has cognitive complexity 52 (threshold 15). Drivers by points: if/else 12 (38 pts), loops 3 (10 pts), boolean chains 4 (nesting depth added 33). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · cfn_utils.build_definitions_context (cognitive 51) · ×1
  • cfn_utils.build_definitions_context (cognitive 51) checkov/cloudformation/cfn_utils.py:118 — cfn_utils.build_definitions_context has cognitive complexity 51 (threshold 15). Drivers by points: loops 6 (27 pts), if/else 5 (21 pts), boolean chains 3 (nesting depth added 37). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · EC2PublicIP.scan_resource_conf (cognitive 50) · ×1
  • EC2PublicIP.scan_resource_conf (cognitive 50) checkov/cloudformation/checks/resource/aws/EC2PublicIP.py:17 — EC2PublicIP.scan_resource_conf has cognitive complexity 50 (threshold 15). Drivers by points: if/else 12 (41 pts), loops 2 (9 pts) (nesting depth added 36). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · DockerSocketVolume.scan_resource_conf (cognitive 50) · ×1
  • DockerSocketVolume.scan_resource_conf (cognitive 50) checkov/terraform/checks/resource/kubernetes/DockerSocketVolume.py:24 — DockerSocketVolume.scan_resource_conf has cognitive complexity 50 (threshold 15). Drivers by points: if/else 12 (39 pts), loops 2 (6 pts), boolean chains 5 (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · DropCapabilities.scan_resource_conf (cognitive 50) · ×1
  • DropCapabilities.scan_resource_conf (cognitive 50) checkov/terraform/checks/resource/kubernetes/DropCapabilities.py:19 — DropCapabilities.scan_resource_conf has cognitive complexity 50 (threshold 15). Drivers by points: if/else 14 (37 pts), loops 2 (8 pts), boolean chains 5 (nesting depth added 29). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ModuleLoaderRegistry.load (cognitive 49) · ×1
  • ModuleLoaderRegistry.load (cognitive 49) REDACTED:35 — ModuleLoaderRegistry.load has cognitive complexity 49 (threshold 15). Drivers by points: if/else 19 (40 pts), boolean chains 3, error handling 1 (3 pts), loops 2 (3 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Runner.check_definitions (cognitive 48) · ×1
  • Runner.check_definitions (cognitive 48) checkov/cloudformation/runner.py:146 — Runner.check_definitions has cognitive complexity 48 (threshold 15). Drivers by points: if/else 7 (35 pts), loops 3 (11 pts), boolean chains 2 (nesting depth added 36). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · TFParser.handle_variables (cognitive 48) · ×1
  • TFParser.handle_variables (cognitive 48) checkov/terraform/tf_parser.py:552 — TFParser.handle_variables has cognitive complexity 48 (threshold 15). Drivers by points: if/else 14 (24 pts), loops 9 (20 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GlueSecurityConfiguration.scan_resource_conf (cognitive 47) · ×1
  • GlueSecurityConfiguration.scan_resource_conf (cognitive 47) checkov/cloudformation/checks/resource/aws/GlueSecurityConfiguration.py:18 — GlueSecurityConfiguration.scan_resource_conf has cognitive complexity 47 (threshold 15). Drivers by points: if/else 12 (42 pts), loops 1 (4 pts), boolean chains 1 (nesting depth added 33). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · GraphCheckParser._parse_raw_check (cognitive 47) · ×1
  • GraphCheckParser._parse_raw_check (cognitive 47) checkov/common/checks_infra/checks_parser.py:231 — GraphCheckParser._parse_raw_check has cognitive complexity 47 (threshold 15). Drivers by points: if/else 15 (25 pts), boolean chains 13, loops 3 (9 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RootContainers.scan_spec_conf (cognitive 47) · ×1
  • RootContainers.scan_spec_conf (cognitive 47) checkov/kubernetes/checks/resource/k8s/RootContainers.py:21 — RootContainers.scan_spec_conf has cognitive complexity 47 (threshold 15). Drivers by points: if/else 11 (33 pts), loops 4 (11 pts), boolean chains 3 (nesting depth added 29). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Oauth2OperationObjectPasswordFlow.scan_openapi_conf (cognitive 47) · ×1
  • Oauth2OperationObjectPasswordFlow.scan_openapi_conf (cognitive 47) checkov/openapi/checks/resource/v2/Oauth2OperationObjectPasswordFlow.py:23 — Oauth2OperationObjectPasswordFlow.scan_openapi_conf has cognitive complexity 47 (threshold 15). Drivers by points: if/else 9 (35 pts), loops 4 (10 pts), boolean chains 2 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RunnerFilter.__init__ (cognitive 47) · ×1
  • RunnerFilter.__init__ (cognitive 47) checkov/runner_filter.py:32 — RunnerFilter.__init__ has cognitive complexity 47 (threshold 15). Drivers by points: if/else 18 (30 pts), boolean chains 13, loops 3, ternaries 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KMSKeyWildcardPrincipal.scan_resource_conf (cognitive 47) · ×1
  • KMSKeyWildcardPrincipal.scan_resource_conf (cognitive 47) checkov/terraform/checks/resource/aws/KMSKeyWildcardPrincipal.py:14 — KMSKeyWildcardPrincipal.scan_resource_conf has cognitive complexity 47 (threshold 15). Drivers by points: if/else 8 (26 pts), ternaries 2 (11 pts), boolean chains 7, loops 1 (2 pts), error handling 1 (nesting depth added 28). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · TerraformLocalGraph._add_provider_attr_to_resources (cognitive 47) · ×1
  • TerraformLocalGraph._add_provider_attr_to_resources (cognitive 47) checkov/terraform/graph_builder/local_graph.py:150 — TerraformLocalGraph._add_provider_attr_to_resources has cognitive complexity 47 (threshold 15). Drivers by points: if/else 10 (39 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 32). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Report.get_exit_code (cognitive 46) · ×1
  • Report.get_exit_code (cognitive 46) checkov/common/output/report.py:143 — Report.get_exit_code has cognitive complexity 46 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 18, ternaries 3 (8 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · resource_id_utils._generate_resource_key_recursive (cognitive 46) · ×1
  • resource_id_utils._generate_resource_key_recursive (cognitive 46) checkov/gitlab_ci/common/resource_id_utils.py:15 — resource_id_utils._generate_resource_key_recursive has cognitive complexity 46 (threshold 15). Drivers by points: if/else 13 (29 pts), ternaries 2 (7 pts), boolean chains 5, loops 2 (5 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ClearTestAPIKey.scan_entity_conf (cognitive 46) · ×1
  • ClearTestAPIKey.scan_entity_conf (cognitive 46) checkov/openapi/checks/resource/generic/ClearTextAPIKey.py:19 — ClearTestAPIKey.scan_entity_conf has cognitive complexity 46 (threshold 15). Drivers by points: if/else 15 (29 pts), loops 4 (9 pts), boolean chains 8 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PostgreSQLServerConnectionThrottlingEnabled.scan_resource_conf (cognitive 45) · ×1
  • PostgreSQLServerConnectionThrottlingEnabled.scan_resource_conf (cognitive 45) checkov/arm/checks/resource/PostgreSQLServerConnectionThrottlingEnabled.py:19 — PostgreSQLServerConnectionThrottlingEnabled.scan_resource_conf has cognitive complexity 45 (threshold 15). Drivers by points: if/else 11 (41 pts), boolean chains 4 (nesting depth added 30). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · PostgreSQLServerLogCheckpointsEnabled.scan_resource_conf (cognitive 45) · ×1
  • PostgreSQLServerLogCheckpointsEnabled.scan_resource_conf (cognitive 45) checkov/arm/checks/resource/PostgreSQLServerLogCheckpointsEnabled.py:20 — PostgreSQLServerLogCheckpointsEnabled.scan_resource_conf has cognitive complexity 45 (threshold 15). Drivers by points: if/else 11 (41 pts), boolean chains 4 (nesting depth added 30). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · PostgreSQLServerLogConnectionsEnabled.scan_resource_conf (cognitive 45) · ×1
  • PostgreSQLServerLogConnectionsEnabled.scan_resource_conf (cognitive 45) checkov/arm/checks/resource/PostgreSQLServerLogConnectionsEnabled.py:20 — PostgreSQLServerLogConnectionsEnabled.scan_resource_conf has cognitive complexity 45 (threshold 15). Drivers by points: if/else 11 (41 pts), boolean chains 4 (nesting depth added 30). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · parser.parse (cognitive 45) · ×1
  • parser.parse (cognitive 45) checkov/cloudformation/parser/__init__.py:18 — parser.parse has cognitive complexity 45 (threshold 15). Drivers by points: if/else 14 (28 pts), error handling 10 (14 pts), boolean chains 3 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CycloneDX.create_bom (cognitive 45) · ×1
  • CycloneDX.create_bom (cognitive 45) REDACTED:66 — CycloneDX.create_bom has cognitive complexity 45 (threshold 15). Drivers by points: if/else 11 (30 pts), loops 5 (10 pts), boolean chains 4, error handling 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DictNode.is_function_returning_object (cognitive 45) · ×1
  • DictNode.is_function_returning_object (cognitive 45) checkov/common/parsers/node.py:72 — DictNode.is_function_returning_object has cognitive complexity 45 (threshold 15). Drivers by points: if/else 7 (35 pts), loops 2 (10 pts) (nesting depth added 36). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Runner._parse_output (cognitive 45) · ×1
  • Runner._parse_output (cognitive 45) checkov/helm/runner.py:268 — Runner._parse_output has cognitive complexity 45 (threshold 15). Drivers by points: if/else 15 (40 pts), ternaries 1 (4 pts), loops 1 (nesting depth added 28). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · GoogleKMSKeyIsPublic.scan_resource_conf (cognitive 45) · ×1
  • GoogleKMSKeyIsPublic.scan_resource_conf (cognitive 45) checkov/terraform/checks/resource/gcp/GoogleKMSKeyIsPublic.py:25 — GoogleKMSKeyIsPublic.scan_resource_conf has cognitive complexity 45 (threshold 15). Drivers by points: if/else 9 (26 pts), loops 4 (14 pts), boolean chains 5 (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · BaseCloudsplainingIAMCheck.cloudsplaining_enrich_evaluated_keys (cognitive 44) · ×1
  • BaseCloudsplainingIAMCheck.cloudsplaining_enrich_evaluated_keys (cognitive 44) checkov/cloudformation/checks/resource/BaseCloudsplainingIAMCheck.py:85 — BaseCloudsplainingIAMCheck.cloudsplaining_enrich_evaluated_keys has cognitive complexity 44 (threshold 15). Drivers by points: if/else 6 (25 pts), loops 4 (18 pts), error handling 1 (nesting depth added 33). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · parser.handle_block_type (cognitive 44) · ×1
  • parser.handle_block_type (cognitive 44) checkov/terraform_json/parser.py:96 — parser.handle_block_type has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (30 pts), loops 5 (13 pts), boolean chains 1 (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · plan_utils.create_definitions (cognitive 43) · ×1
  • plan_utils.create_definitions (cognitive 43) checkov/terraform/plan_utils.py:16 — plan_utils.create_definitions has cognitive complexity 43 (threshold 15). Drivers by points: if/else 7 (19 pts), error handling 2 (10 pts), loops 3 (7 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FrontDoorWAFACLCVE202144228.scan_resource_conf (cognitive 42) · ×1
  • FrontDoorWAFACLCVE202144228.scan_resource_conf (cognitive 42) checkov/arm/checks/resource/FrontDoorWAFACLCVE202144228.py:16 — FrontDoorWAFACLCVE202144228.scan_resource_conf has cognitive complexity 42 (threshold 15). Drivers by points: if/else 8 (31 pts), loops 3 (9 pts), boolean chains 2 (nesting depth added 29). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · BaseResourceValueCheck.scan_resource_conf (cognitive 42) · ×1
  • BaseResourceValueCheck.scan_resource_conf (cognitive 42) checkov/cloudformation/checks/resource/base_resource_value_check.py:54 — BaseResourceValueCheck.scan_resource_conf has cognitive complexity 42 (threshold 15). Drivers by points: if/else 9 (33 pts), loops 2 (5 pts), boolean chains 4 (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · KeywordEdgeBuilder.find_connections (cognitive 42) · ×1
  • KeywordEdgeBuilder.find_connections (cognitive 42) checkov/kubernetes/graph_builder/graph_components/edge_builders/KeywordEdgeBuilder.py:17 — KeywordEdgeBuilder.find_connections has cognitive complexity 42 (threshold 15). Drivers by points: loops 6 (22 pts), if/else 5 (20 pts) (nesting depth added 31). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · plan_parser._hclify (cognitive 42) · ×1
  • plan_parser._hclify (cognitive 42) checkov/terraform/plan_parser.py:108 — plan_parser._hclify has cognitive complexity 42 (threshold 15). Drivers by points: if/else 16 (31 pts), boolean chains 4, loops 2 (4 pts), ternaries 1 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KMSKeyWildCardPrincipal.scan_resource_conf (cognitive 41) · ×1
  • KMSKeyWildCardPrincipal.scan_resource_conf (cognitive 41) checkov/cloudformation/checks/resource/aws/KMSKeyWildCardPrincipal.py:20 — KMSKeyWildCardPrincipal.scan_resource_conf has cognitive complexity 41 (threshold 15). Drivers by points: if/else 8 (31 pts), boolean chains 6, loops 1 (4 pts) (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Registry._load_checks_from_dir (cognitive 41) · ×1
  • Registry._load_checks_from_dir (cognitive 41) checkov/common/checks_infra/registry.py:47 — Registry._load_checks_from_dir has cognitive complexity 41 (threshold 15). Drivers by points: if/else 10 (34 pts), error handling 1 (4 pts), loops 2 (3 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Registry._should_run_scan (cognitive 41) · ×1
  • Registry._should_run_scan (cognitive 41) checkov/kubernetes/checks/resource/base_registry.py:48 — Registry._should_run_scan has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (33 pts), boolean chains 8 (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · OperationObjectImplicitFlow.scan_openapi_conf (cognitive 41) · ×1
  • OperationObjectImplicitFlow.scan_openapi_conf (cognitive 41) checkov/openapi/checks/resource/v2/OperationObjectImplicitFlow.py:23 — OperationObjectImplicitFlow.scan_openapi_conf has cognitive complexity 41 (threshold 15). Drivers by points: if/else 8 (29 pts), loops 4 (10 pts), boolean chains 2 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Runner.run_block (cognitive 41) · ×1
  • Runner.run_block (cognitive 41) checkov/terraform/runner.py:325 — Runner.run_block has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (27 pts), loops 3 (7 pts), error handling 2 (6 pts), boolean chains 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppServiceAuthentication.scan_resource_conf (cognitive 40) · ×1
  • AppServiceAuthentication.scan_resource_conf (cognitive 40) checkov/arm/checks/resource/AppServiceAuthentication.py:19 — AppServiceAuthentication.scan_resource_conf has cognitive complexity 40 (threshold 15). Drivers by points: if/else 10 (37 pts), boolean chains 3 (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · RepoConfigIntegration._set_enforcement_rules (cognitive 40) · ×1
  • RepoConfigIntegration._set_enforcement_rules (cognitive 40) checkov/common/bridgecrew/integration_features/features/repo_config_integration.py:69 — RepoConfigIntegration._set_enforcement_rules has cognitive complexity 40 (threshold 15). Drivers by points: if/else 14 (30 pts), loops 4 (7 pts), boolean chains 3 (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · RootContainersHighUID.scan_spec_conf (cognitive 40) · ×1
  • RootContainersHighUID.scan_spec_conf (cognitive 40) checkov/kubernetes/checks/resource/k8s/RootContainersHighUID.py:19 — RootContainersHighUID.scan_spec_conf has cognitive complexity 40 (threshold 15). Drivers by points: if/else 10 (26 pts), loops 4 (11 pts), boolean chains 3 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Policy3dRunner.solve_check_cve (cognitive 40) · ×1
  • Policy3dRunner.solve_check_cve (cognitive 40) checkov/policies_3d/runner.py:269 — Policy3dRunner.solve_check_cve has cognitive complexity 40 (threshold 15). Drivers by points: if/else 7 (26 pts), loops 3 (13 pts), boolean chains 1 (nesting depth added 29). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · S3AllowsAnyPrincipal.scan_resource_conf (cognitive 40) · ×1
  • S3AllowsAnyPrincipal.scan_resource_conf (cognitive 40) checkov/terraform/checks/resource/aws/S3AllowsAnyPrincipal.py:71 — S3AllowsAnyPrincipal.scan_resource_conf has cognitive complexity 40 (threshold 15). Drivers by points: if/else 12 (31 pts), boolean chains 5, error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · GoogleCloudSqlDatabasePubliclyAccessible.scan_resource_conf (cognitive 40) · ×1
  • GoogleCloudSqlDatabasePubliclyAccessible.scan_resource_conf (cognitive 40) checkov/terraform/checks/resource/gcp/GoogleCloudSqlDatabasePubliclyAccessible.py:13 — GoogleCloudSqlDatabasePubliclyAccessible.scan_resource_conf has cognitive complexity 40 (threshold 15). Drivers by points: if/else 9 (31 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · module_finder.find_modules (cognitive 40) · ×1
  • module_finder.find_modules (cognitive 40) checkov/terraform/module_loading/module_finder.py:55 — module_finder.find_modules has cognitive complexity 40 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 4 (10 pts), ternaries 2 (7 pts), boolean chains 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ECRPolicy.scan_resource_conf (cognitive 39) · ×1
  • ECRPolicy.scan_resource_conf (cognitive 39) checkov/cloudformation/checks/resource/aws/ECRPolicy.py:21 — ECRPolicy.scan_resource_conf has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (27 pts), loops 2 (6 pts), boolean chains 4, error handling 1 (2 pts) (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · AbsNACLUnrestrictedIngress.scan_resource_conf (cognitive 39) · ×1
  • AbsNACLUnrestrictedIngress.scan_resource_conf (cognitive 39) checkov/terraform/checks/resource/aws/AbsNACLUnrestrictedIngress.py:13 — AbsNACLUnrestrictedIngress.scan_resource_conf has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (31 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 23). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · S3GlobalViewACL.scan_resource_conf (cognitive 39) · ×1
  • S3GlobalViewACL.scan_resource_conf (cognitive 39) checkov/terraform/checks/resource/aws/S3GlobalViewACL.py:17 — S3GlobalViewACL.scan_resource_conf has cognitive complexity 39 (threshold 15). Drivers by points: if/else 5 (23 pts), loops 3 (13 pts), boolean chains 3 (nesting depth added 28). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · FrontDoorWAFACLCVE202144228.scan_resource_conf (cognitive 39) · ×1
  • FrontDoorWAFACLCVE202144228.scan_resource_conf (cognitive 39) checkov/terraform/checks/resource/azure/FrontDoorWAFACLCVE202144228.py:16 — FrontDoorWAFACLCVE202144228.scan_resource_conf has cognitive complexity 39 (threshold 15). Drivers by points: if/else 5 (26 pts), loops 3 (9 pts), boolean chains 4 (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · TerraformLocalGraph._connect_module_provider (cognitive 39) · ×1
  • TerraformLocalGraph._connect_module_provider (cognitive 39) checkov/terraform/graph_builder/local_graph.py:423 — TerraformLocalGraph._connect_module_provider has cognitive complexity 39 (threshold 15). Drivers by points: if/else 7 (22 pts), loops 3 (13 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · WAFACLCVE202144228.scan_resource_conf (cognitive 38) · ×1
  • WAFACLCVE202144228.scan_resource_conf (cognitive 38) checkov/cloudformation/checks/resource/aws/WAFACLCVE202144228.py:15 — WAFACLCVE202144228.scan_resource_conf has cognitive complexity 38 (threshold 15). Drivers by points: if/else 6 (26 pts), loops 2 (8 pts), boolean chains 4 (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · CosignSignPresent.scan_conf (cognitive 38) · ×1
  • CosignSignPresent.scan_conf (cognitive 38) checkov/github_actions/checks/job/CosignArtifacts.py:24 — CosignSignPresent.scan_conf has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (30 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ImageTagFixed.scan_resource_conf (cognitive 38) · ×1
  • ImageTagFixed.scan_resource_conf (cognitive 38) checkov/terraform/checks/resource/kubernetes/ImageTagFixed.py:20 — ImageTagFixed.scan_resource_conf has cognitive complexity 38 (threshold 15). Drivers by points: if/else 9 (32 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 25). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · PolicyNoSrcAnyDstAny.scan_resource_conf (cognitive 38) · ×1
  • PolicyNoSrcAnyDstAny.scan_resource_conf (cognitive 38) checkov/terraform/checks/resource/panos/PolicyNoSrcAnyDstAny.py:17 — PolicyNoSrcAnyDstAny.scan_resource_conf has cognitive complexity 38 (threshold 15). Drivers by points: if/else 7 (25 pts), loops 3 (13 pts) (nesting depth added 28). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · NetworkWatcherFlowLogPeriod.scan_resource_conf (cognitive 37) · ×1
  • NetworkWatcherFlowLogPeriod.scan_resource_conf (cognitive 37) checkov/arm/checks/resource/NetworkWatcherFlowLogPeriod.py:24 — NetworkWatcherFlowLogPeriod.scan_resource_conf has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (36 pts), boolean chains 1 (nesting depth added 28). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · CloudfrontDistributionEncryption.scan_resource_conf (cognitive 37) · ×1
  • CloudfrontDistributionEncryption.scan_resource_conf (cognitive 37) checkov/cloudformation/checks/resource/aws/CloudfrontDistributionEncryption.py:13 — CloudfrontDistributionEncryption.scan_resource_conf has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (33 pts), loops 1 (4 pts) (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · CosignSignSBOM.scan_conf (cognitive 37) · ×1
  • CosignSignSBOM.scan_conf (cognitive 37) checkov/github_actions/checks/job/CosignSBOM.py:24 — CosignSignSBOM.scan_conf has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (30 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OperationObjectBasicAuth.scan_openapi_conf (cognitive 37) · ×1
  • OperationObjectBasicAuth.scan_openapi_conf (cognitive 37) checkov/openapi/checks/resource/v2/OperationObjectBasicAuth.py:23 — OperationObjectBasicAuth.scan_openapi_conf has cognitive complexity 37 (threshold 15). Drivers by points: if/else 7 (25 pts), loops 4 (10 pts), boolean chains 2 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Runner.run (cognitive 37) · ×1
  • Runner.run (cognitive 37) checkov/terraform/runner.py:62 — Runner.run has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (23 pts), loops 3 (11 pts), boolean chains 3 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Runner.generate_resource_name (cognitive 36) · ×1
  • Runner.generate_resource_name (cognitive 36) checkov/ansible/runner.py:72 — Runner.generate_resource_name has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (29 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ELBv2AccessLogs.scan_resource_conf (cognitive 36) · ×1
  • ELBv2AccessLogs.scan_resource_conf (cognitive 36) checkov/cloudformation/checks/resource/aws/ELBv2AccessLogs.py:13 — ELBv2AccessLogs.scan_resource_conf has cognitive complexity 36 (threshold 15). Drivers by points: if/else 7 (31 pts), loops 1 (4 pts), boolean chains 1 (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · BcPlatformIntegration.adjust_sast_match_location_path (cognitive 36) · ×1
  • BcPlatformIntegration.adjust_sast_match_location_path (cognitive 36) checkov/common/bridgecrew/platform_integration.py:638 — BcPlatformIntegration.adjust_sast_match_location_path has cognitive complexity 36 (threshold 15). Drivers by points: loops 6 (18 pts), if/else 6 (16 pts), boolean chains 2 (nesting depth added 22). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · utils.build_gha_definitions_context (cognitive 36) · ×1
  • utils.build_gha_definitions_context (cognitive 36) checkov/github_actions/utils.py:110 — utils.build_gha_definitions_context has cognitive complexity 36 (threshold 15). Drivers by points: if/else 5 (20 pts), loops 4 (13 pts), boolean chains 3 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SecurityOperations.scan_entity_conf (cognitive 36) · ×1
  • SecurityOperations.scan_entity_conf (cognitive 36) checkov/openapi/checks/resource/generic/SecurityOperations.py:18 — SecurityOperations.scan_entity_conf has cognitive complexity 36 (threshold 15). Drivers by points: if/else 7 (27 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AbsSecurityGroupUnrestrictedEgress.scan_resource_conf (cognitive 36) · ×1
  • AbsSecurityGroupUnrestrictedEgress.scan_resource_conf (cognitive 36) checkov/terraform/checks/resource/aws/AbsSecurityGroupUnrestrictedEgress.py:19 — AbsSecurityGroupUnrestrictedEgress.scan_resource_conf has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (30 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AbsSecurityGroupUnrestrictedIngress.scan_resource_conf (cognitive 36) · ×1
  • AbsSecurityGroupUnrestrictedIngress.scan_resource_conf (cognitive 36) checkov/terraform/checks/resource/aws/AbsSecurityGroupUnrestrictedIngress.py:19 — AbsSecurityGroupUnrestrictedIngress.scan_resource_conf has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (30 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · S3ProtectAgainstPolicyLockout.scan_resource_conf (cognitive 36) · ×1
  • S3ProtectAgainstPolicyLockout.scan_resource_conf (cognitive 36) checkov/terraform/checks/resource/aws/S3ProtectAgainstPolicyLockout.py:19 — S3ProtectAgainstPolicyLockout.scan_resource_conf has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (24 pts), loops 2 (6 pts), boolean chains 5, error handling 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WAFRuleHasAnyActions.scan_resource_conf (cognitive 36) · ×1
  • WAFRuleHasAnyActions.scan_resource_conf (cognitive 36) checkov/terraform/checks/resource/aws/WAFRuleHasAnyActions.py:18 — WAFRuleHasAnyActions.scan_resource_conf has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (24 pts), boolean chains 6, loops 2 (6 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Tiller.scan_resource_conf (cognitive 36) · ×1
  • Tiller.scan_resource_conf (cognitive 36) checkov/terraform/checks/resource/kubernetes/Tiller.py:18 — Tiller.scan_resource_conf has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (28 pts), boolean chains 7, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppGatewayWAFACLCVE202144228.scan_resource_conf (cognitive 35) · ×1
  • AppGatewayWAFACLCVE202144228.scan_resource_conf (cognitive 35) checkov/arm/checks/resource/AppGatewayWAFACLCVE202144228.py:15 — AppGatewayWAFACLCVE202144228.scan_resource_conf has cognitive complexity 35 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 3 (12 pts), boolean chains 6 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · AbsSecurityGroupUnrestrictedIngress.scan_resource_conf (cognitive 35) · ×1
  • AbsSecurityGroupUnrestrictedIngress.scan_resource_conf (cognitive 35) checkov/cloudformation/checks/resource/aws/AbsSecurityGroupUnrestrictedIngress.py:13 — AbsSecurityGroupUnrestrictedIngress.scan_resource_conf has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (29 pts), boolean chains 5, loops 1 (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · LambdaEnvironmentCredentials.scan_resource_conf (cognitive 35) · ×1
  • LambdaEnvironmentCredentials.scan_resource_conf (cognitive 35) checkov/cloudformation/checks/resource/aws/LambdaEnvironmentCredentials.py:18 — LambdaEnvironmentCredentials.scan_resource_conf has cognitive complexity 35 (threshold 15). Drivers by points: if/else 6 (21 pts), loops 2 (10 pts), boolean chains 4 (nesting depth added 23). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · SecurityGroupRuleDescription.scan_resource_conf (cognitive 35) · ×1
  • SecurityGroupRuleDescription.scan_resource_conf (cognitive 35) checkov/cloudformation/checks/resource/aws/SecurityGroupRuleDescription.py:17 — SecurityGroupRuleDescription.scan_resource_conf has cognitive complexity 35 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 2 (8 pts), boolean chains 6 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Block.update_attribute (cognitive 35) · ×1
  • Block.update_attribute (cognitive 35) checkov/common/graph/graph_builder/graph_components/blocks.py:135 — Block.update_attribute has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 2 (6 pts), boolean chains 4, error handling 1 (4 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Report.print_console (cognitive 35) · ×1
  • Report.print_console (cognitive 35) checkov/common/output/report.py:282 — Report.print_console has cognitive complexity 35 (threshold 15). Drivers by points: if/else 15 (22 pts), loops 4 (10 pts), boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · docs_generator.get_checks (cognitive 35) · ×1
  • docs_generator.get_checks (cognitive 35) checkov/docs_generator.py:87 — docs_generator.get_checks has cognitive complexity 35 (threshold 15). Drivers by points: if/else 22 (29 pts), boolean chains 3, loops 1 (2 pts), ternaries 1 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · Runner.search_for_suppression (cognitive 35) · ×1
  • Runner.search_for_suppression (cognitive 35) checkov/secrets/runner.py:703 — Runner.search_for_suppression has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 5, error handling 2 (5 pts), ternaries 2 (5 pts), loops 2 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BaseTerraformCloudsplainingDataIAMCheck.cloudsplaining_enrich_evaluated_keys (cognitive 35) · ×1
  • BaseTerraformCloudsplainingDataIAMCheck.cloudsplaining_enrich_evaluated_keys (cognitive 35) checkov/terraform/checks/data/base_cloudsplaining_data_iam_check.py:34 — BaseTerraformCloudsplainingDataIAMCheck.cloudsplaining_enrich_evaluated_keys has cognitive complexity 35 (threshold 15). Drivers by points: if/else 5 (19 pts), loops 4 (14 pts), boolean chains 1, error handling 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AbsNACLUnrestrictedIngress.check_rule (cognitive 35) · ×1
  • AbsNACLUnrestrictedIngress.check_rule (cognitive 35) checkov/terraform/checks/resource/aws/AbsNACLUnrestrictedIngress.py:63 — AbsNACLUnrestrictedIngress.check_rule has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (28 pts), boolean chains 6, error handling 1 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · WAFACLCVE202144228.scan_resource_conf (cognitive 35) · ×1
  • WAFACLCVE202144228.scan_resource_conf (cognitive 35) checkov/terraform/checks/resource/aws/WAFACLCVE202144228.py:16 — WAFACLCVE202144228.scan_resource_conf has cognitive complexity 35 (threshold 15). Drivers by points: if/else 6 (23 pts), boolean chains 6, loops 2 (6 pts) (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · BaseTerraformCloudsplainingResourceIAMCheck.cloudsplaining_enrich_evaluated_keys (cognitive 35) · ×1
  • BaseTerraformCloudsplainingResourceIAMCheck.cloudsplaining_enrich_evaluated_keys (cognitive 35) checkov/terraform/checks/resource/base_cloudsplaining_resource_iam_check.py:47 — BaseTerraformCloudsplainingResourceIAMCheck.cloudsplaining_enrich_evaluated_keys has cognitive complexity 35 (threshold 15). Drivers by points: if/else 5 (19 pts), loops 4 (14 pts), boolean chains 1, error handling 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · iam_terraform_document_to_policy_converter.convert_terraform_conf_to_iam_policy (cognitive 35) · ×1
  • iam_terraform_document_to_policy_converter.convert_terraform_conf_to_iam_policy (cognitive 35) checkov/terraform/checks/utils/iam_terraform_document_to_policy_converter.py:8 — iam_terraform_document_to_policy_converter.convert_terraform_conf_to_iam_policy has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (26 pts), loops 2 (7 pts), boolean chains 2 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Policy3dParser._create_module_predicament (cognitive 34) · ×1
  • Policy3dParser._create_module_predicament (cognitive 34) checkov/policies_3d/checks_parser.py:96 — Policy3dParser._create_module_predicament has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (25 pts), loops 5 (9 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KeyVaultDisablesPublicNetworkAccess.scan_resource_conf (cognitive 34) · ×1
  • KeyVaultDisablesPublicNetworkAccess.scan_resource_conf (cognitive 34) checkov/terraform/checks/resource/azure/KeyVaultDisablesPublicNetworkAccess.py:19 — KeyVaultDisablesPublicNetworkAccess.scan_resource_conf has cognitive complexity 34 (threshold 15). Drivers by points: if/else 6 (18 pts), ternaries 3 (11 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · AllowedCapabilitiesSysAdmin.scan_resource_conf (cognitive 34) · ×1
  • AllowedCapabilitiesSysAdmin.scan_resource_conf (cognitive 34) checkov/terraform/checks/resource/kubernetes/AllowedCapabilitiesSysAdmin.py:18 — AllowedCapabilitiesSysAdmin.scan_resource_conf has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (26 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · TerraformVariableRenderer.evaluate_vertex_attribute_from_edge (cognitive 34) · ×1
  • TerraformVariableRenderer.evaluate_vertex_attribute_from_edge (cognitive 34) checkov/terraform/graph_builder/variable_rendering/renderer.py:95 — TerraformVariableRenderer.evaluate_vertex_attribute_from_edge has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 7, loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Runner.push_skipped_checks_down (cognitive 34) · ×1
  • Runner.push_skipped_checks_down (cognitive 34) checkov/terraform/runner.py:257 — Runner.push_skipped_checks_down has cognitive complexity 34 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 5 (16 pts), boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StorageAccountLoggingQueueServiceEnabled.scan_resource_conf (cognitive 33) · ×1
  • StorageAccountLoggingQueueServiceEnabled.scan_resource_conf (cognitive 33) checkov/arm/checks/resource/StorageAccountLoggingQueueServiceEnabled.py:24 — StorageAccountLoggingQueueServiceEnabled.scan_resource_conf has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (26 pts), loops 1 (4 pts), boolean chains 3 (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ALBListenerTLS12.scan_resource_conf (cognitive 33) · ×1
  • ALBListenerTLS12.scan_resource_conf (cognitive 33) checkov/cloudformation/checks/resource/aws/ALBListenerTLS12.py:28 — ALBListenerTLS12.scan_resource_conf has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (24 pts), loops 2 (7 pts), boolean chains 2 (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · BaseAttributeSolver.get_operation (cognitive 33) · ×1
  • BaseAttributeSolver.get_operation (cognitive 33) checkov/common/checks_infra/solvers/attribute_solvers/base_attribute_solver.py:70 — BaseAttributeSolver.get_operation has cognitive complexity 33 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 8, ternaries 3 (7 pts), loops 2 (4 pts) (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Runner.cfn_resources_checks (cognitive 33) · ×1
  • Runner.cfn_resources_checks (cognitive 33) checkov/serverless/runner.py:299 — Runner.cfn_resources_checks has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 2 (9 pts), boolean chains 3 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · BaseTerraformRunner.get_graph_checks_report (cognitive 33) · ×1
  • BaseTerraformRunner.get_graph_checks_report (cognitive 33) checkov/terraform/base_runner.py:166 — BaseTerraformRunner.get_graph_checks_report has cognitive complexity 33 (threshold 15). Drivers by points: if/else 6 (24 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · K8sEnableNetworkPolicies.scan_resource_conf (cognitive 33) · ×1
  • K8sEnableNetworkPolicies.scan_resource_conf (cognitive 33) checkov/terraform/checks/resource/alicloud/K8sEnableNetworkPolicies.py:23 — K8sEnableNetworkPolicies.scan_resource_conf has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (29 pts), boolean chains 4 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · BaseResourceNegativeValueCheck.scan_resource_conf (cognitive 33) · ×1
  • BaseResourceNegativeValueCheck.scan_resource_conf (cognitive 33) checkov/terraform/checks/resource/base_resource_negative_value_check.py:34 — BaseResourceNegativeValueCheck.scan_resource_conf has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (25 pts), boolean chains 5, loops 1 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MinimiseCapabilities.scan_resource_conf (cognitive 33) · ×1
  • MinimiseCapabilities.scan_resource_conf (cognitive 33) checkov/terraform/checks/resource/kubernetes/MinimiseCapabilities.py:17 — MinimiseCapabilities.scan_resource_conf has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (27 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · PodSecurityContext.scan_resource_conf (cognitive 33) · ×1
  • PodSecurityContext.scan_resource_conf (cognitive 33) checkov/terraform/checks/resource/kubernetes/PodSecurityContext.py:19 — PodSecurityContext.scan_resource_conf has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (25 pts), loops 2 (6 pts), boolean chains 2 (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · parser_functions.process_dynamic_values (cognitive 33) · ×1
  • parser_functions.process_dynamic_values (cognitive 33) checkov/terraform/parser_functions.py:197 — parser_functions.process_dynamic_values has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (23 pts), ternaries 1 (4 pts), error handling 1 (3 pts), loops 2 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IAMRoleAllowAssumeFromAccount.scan_resource_conf (cognitive 32) · ×1
  • IAMRoleAllowAssumeFromAccount.scan_resource_conf (cognitive 32) checkov/cloudformation/checks/resource/aws/IAMRoleAllowAssumeFromAccount.py:21 — IAMRoleAllowAssumeFromAccount.scan_resource_conf has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (24 pts), boolean chains 5, error handling 1 (3 pts) (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · BaseResourceNegativeValueCheck.scan_resource_conf (cognitive 32) · ×1
  • BaseResourceNegativeValueCheck.scan_resource_conf (cognitive 32) checkov/cloudformation/checks/resource/base_resource_negative_value_check.py:23 — BaseResourceNegativeValueCheck.scan_resource_conf has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (25 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · CloudformationLocalGraph._add_fn_sub_connections (cognitive 32) · ×1
  • CloudformationLocalGraph._add_fn_sub_connections (cognitive 32) checkov/cloudformation/graph_builder/local_graph.py:311 — CloudformationLocalGraph._add_fn_sub_connections has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (25 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Policy3dRunner.create_failed_checks_by_resource_mapping (cognitive 32) · ×1
  • Policy3dRunner.create_failed_checks_by_resource_mapping (cognitive 32) checkov/policies_3d/runner.py:161 — Policy3dRunner.create_failed_checks_by_resource_mapping has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 4 (11 pts), ternaries 1 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · APIGatewayMethodWOAuth.scan_resource_conf (cognitive 32) · ×1
  • APIGatewayMethodWOAuth.scan_resource_conf (cognitive 32) checkov/terraform/checks/resource/aws/APIGatewayMethodWOAuth.py:66 — APIGatewayMethodWOAuth.scan_resource_conf has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (27 pts), boolean chains 5 (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · AllowedCapabilities.scan_resource_conf (cognitive 32) · ×1
  • AllowedCapabilities.scan_resource_conf (cognitive 32) checkov/terraform/checks/resource/kubernetes/AllowedCapabilities.py:20 — AllowedCapabilities.scan_resource_conf has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (26 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · evaluate_terraform._handle_for_loop_in_list_of_dicts (cognitive 32) · ×1
  • evaluate_terraform._handle_for_loop_in_list_of_dicts (cognitive 32) checkov/terraform/graph_builder/variable_rendering/evaluate_terraform.py:386 — evaluate_terraform._handle_for_loop_in_list_of_dicts has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (22 pts), loops 2 (6 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · VMDisablePasswordAuthentication.scan_resource_conf (cognitive 31) · ×1
  • VMDisablePasswordAuthentication.scan_resource_conf (cognitive 31) checkov/arm/checks/resource/VMDisablePasswordAuthentication.py:20 — VMDisablePasswordAuthentication.scan_resource_conf has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 7, ternaries 1 (4 pts) (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · iam_cloudformation_document_to_policy_converter.convert_cloudformation_conf_to_iam_policy (cognitive 31) · ×1
  • iam_cloudformation_document_to_policy_converter.convert_cloudformation_conf_to_iam_policy (cognitive 31) checkov/cloudformation/checks/utils/iam_cloudformation_document_to_policy_converter.py:8 — iam_cloudformation_document_to_policy_converter.convert_cloudformation_conf_to_iam_policy has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (29 pts), loops 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · secrets.omit_secret_value_from_graph_checks (cognitive 31) · ×1
  • secrets.omit_secret_value_from_graph_checks (cognitive 31) checkov/common/util/secrets.py:192 — secrets.omit_secret_value_from_graph_checks has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (23 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · SecretsOmitter.omit (cognitive 31) · ×1
  • SecretsOmitter.omit (cognitive 31) checkov/common/util/secrets_omitter.py:75 — SecretsOmitter.omit has cognitive complexity 31 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 4 (10 pts), boolean chains 4 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · kubernetes_utils.build_definitions_context (cognitive 31) · ×1
  • kubernetes_utils.build_definitions_context (cognitive 31) checkov/kubernetes/kubernetes_utils.py:134 — kubernetes_utils.build_definitions_context has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (25 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Runner.run (cognitive 31) · ×1
  • Runner.run (cognitive 31) checkov/kubernetes/runner.py:83 — Runner.run has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Policy3dRunner.solve_check_iac (cognitive 31) · ×1
  • Policy3dRunner.solve_check_iac (cognitive 31) checkov/policies_3d/runner.py:247 — Policy3dRunner.solve_check_iac has cognitive complexity 31 (threshold 15). Drivers by points: if/else 6 (21 pts), loops 3 (10 pts) (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · PrismaEngine.create_report (cognitive 31) · ×1
  • PrismaEngine.create_report (cognitive 31) checkov/sast/engines/prisma_engine.py:347 — PrismaEngine.create_report has cognitive complexity 31 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 7 (12 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DLMEventsCrossRegionEncryptionWithCMK.scan_resource_conf (cognitive 31) · ×1
  • DLMEventsCrossRegionEncryptionWithCMK.scan_resource_conf (cognitive 31) checkov/terraform/checks/resource/aws/DLMEventsCrossRegionEncryptionWithCMK.py:13 — DLMEventsCrossRegionEncryptionWithCMK.scan_resource_conf has cognitive complexity 31 (threshold 15). Drivers by points: if/else 6 (22 pts), boolean chains 6, loops 1 (3 pts) (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ImagePullPolicyAlways.scan_resource_conf (cognitive 31) · ×1
  • ImagePullPolicyAlways.scan_resource_conf (cognitive 31) checkov/terraform/checks/resource/kubernetes/ImagePullPolicyAlways.py:22 — ImagePullPolicyAlways.scan_resource_conf has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (26 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CustomRoleDefinitionSubscriptionOwner.scan_resource_conf (cognitive 30) · ×1
  • CustomRoleDefinitionSubscriptionOwner.scan_resource_conf (cognitive 30) checkov/arm/checks/resource/CustomRoleDefinitionSubscriptionOwner.py:24 — CustomRoleDefinitionSubscriptionOwner.scan_resource_conf has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (22 pts), loops 1 (6 pts), boolean chains 2 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · BaseCloudsplainingIAMCheck.scan_resource_conf (cognitive 30) · ×1
  • BaseCloudsplainingIAMCheck.scan_resource_conf (cognitive 30) checkov/cloudformation/checks/resource/BaseCloudsplainingIAMCheck.py:38 — BaseCloudsplainingIAMCheck.scan_resource_conf has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (24 pts), error handling 1 (3 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CloudformationLocalGraph._add_sam_globals (cognitive 30) · ×1
  • CloudformationLocalGraph._add_sam_globals (cognitive 30) checkov/cloudformation/graph_builder/local_graph.py:130 — CloudformationLocalGraph._add_sam_globals has cognitive complexity 30 (threshold 15). Drivers by points: if/else 5 (18 pts), loops 4 (11 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · kubernetes_utils.get_skipped_checks (cognitive 30) · ×1
  • kubernetes_utils.get_skipped_checks (cognitive 30) checkov/kubernetes/kubernetes_utils.py:83 — kubernetes_utils.get_skipped_checks has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DLMEventsCrossRegionEncryption.scan_resource_conf (cognitive 30) · ×1
  • DLMEventsCrossRegionEncryption.scan_resource_conf (cognitive 30) checkov/terraform/checks/resource/aws/DLMEventsCrossRegionEncryption.py:13 — DLMEventsCrossRegionEncryption.scan_resource_conf has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (22 pts), boolean chains 5, loops 1 (3 pts) (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · parser.hclify (cognitive 30) · ×1
  • parser.hclify (cognitive 30) checkov/terraform_json/parser.py:143 — parser.hclify has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 2 (4 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Registry._scan_yaml (cognitive 30) · ×1
  • Registry._scan_yaml (cognitive 30) checkov/yaml_doc/base_registry.py:144 — Registry._scan_yaml has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 2 (5 pts), boolean chains 4 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SQLServerThreatDetectionTypes.scan_resource_conf (cognitive 29) · ×1
  • SQLServerThreatDetectionTypes.scan_resource_conf (cognitive 29) checkov/arm/checks/resource/SQLServerThreatDetectionTypes.py:19 — SQLServerThreatDetectionTypes.scan_resource_conf has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (26 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ContextParser.evaluate_default_parameters (cognitive 29) · ×1
  • ContextParser.evaluate_default_parameters (cognitive 29) checkov/arm/context_parser.py:32 — ContextParser.evaluate_default_parameters has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 4 (6 pts), error handling 2 (4 pts), ternaries 1 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Runner.add_python_check_results (cognitive 29) · ×1
  • Runner.add_python_check_results (cognitive 29) checkov/bicep/runner.py:149 — Runner.add_python_check_results has cognitive complexity 29 (threshold 15). Drivers by points: if/else 3 (15 pts), loops 4 (13 pts), boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GlueDataCatalogEncryption.scan_resource_conf (cognitive 29) · ×1
  • GlueDataCatalogEncryption.scan_resource_conf (cognitive 29) checkov/cloudformation/checks/resource/aws/GlueDataCatalogEncryption.py:13 — GlueDataCatalogEncryption.scan_resource_conf has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (28 pts), boolean chains 1 (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · IAMAdminPolicyDocument.scan_resource_conf (cognitive 29) · ×1
  • IAMAdminPolicyDocument.scan_resource_conf (cognitive 29) checkov/cloudformation/checks/resource/aws/IAMAdminPolicyDocument.py:14 — IAMAdminPolicyDocument.scan_resource_conf has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (23 pts), loops 1 (4 pts), boolean chains 2 (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · IAMStarActionPolicyDocument.scan_resource_conf (cognitive 29) · ×1
  • IAMStarActionPolicyDocument.scan_resource_conf (cognitive 29) checkov/cloudformation/checks/resource/aws/IAMStarActionPolicyDocument.py:15 — IAMStarActionPolicyDocument.scan_resource_conf has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (23 pts), loops 1 (4 pts), boolean chains 2 (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Runner._get_jobs (cognitive 29) · ×1
  • Runner._get_jobs (cognitive 29) checkov/common/runners/object_runner.py:391 — Runner._get_jobs has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (20 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Runner.run (cognitive 29) · ×1
  • Runner.run (cognitive 29) checkov/dockerfile/runner.py:77 — Runner.run has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IAMPublicActionsPolicy.scan_data_conf (cognitive 29) · ×1
  • IAMPublicActionsPolicy.scan_data_conf (cognitive 29) checkov/terraform/checks/data/aws/IAMPublicActionsPolicy.py:16 — IAMPublicActionsPolicy.scan_data_conf has cognitive complexity 29 (threshold 15). Drivers by points: if/else 5 (22 pts), loops 2 (6 pts), boolean chains 1 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ElasticBeanstalkUseEnhancedHealthChecks.scan_resource_conf (cognitive 29) · ×1
  • ElasticBeanstalkUseEnhancedHealthChecks.scan_resource_conf (cognitive 29) checkov/terraform/checks/resource/aws/ElasticBeanstalkUseEnhancedHealthChecks.py:18 — ElasticBeanstalkUseEnhancedHealthChecks.scan_resource_conf has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (21 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ElasticBeanstalkUseManagedUpdates.scan_resource_conf (cognitive 29) · ×1
  • ElasticBeanstalkUseManagedUpdates.scan_resource_conf (cognitive 29) checkov/terraform/checks/resource/aws/ElasticBeanstalkUseManagedUpdates.py:17 — ElasticBeanstalkUseManagedUpdates.scan_resource_conf has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (21 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · IAMRoleAllowAssumeFromAccount.scan_resource_conf (cognitive 29) · ×1
  • IAMRoleAllowAssumeFromAccount.scan_resource_conf (cognitive 29) checkov/terraform/checks/resource/aws/IAMRoleAllowAssumeFromAccount.py:21 — IAMRoleAllowAssumeFromAccount.scan_resource_conf has cognitive complexity 29 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 2 (7 pts), boolean chains 4, error handling 1 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · SeccompPSP.scan_resource_conf (cognitive 29) · ×1
  • SeccompPSP.scan_resource_conf (cognitive 29) checkov/terraform/checks/resource/kubernetes/SeccompPSP.py:15 — SeccompPSP.scan_resource_conf has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (23 pts), loops 1 (5 pts), boolean chains 1 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · decoder.py_scanstring (cognitive 28) · ×1
  • decoder.py_scanstring (cognitive 28) checkov/common/parsers/json/decoder.py:52 — decoder.py_scanstring has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (21 pts), error handling 2 (5 pts), boolean chains 1, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RunnerRegistry.get_fail_thresholds (cognitive 28) · ×1
  • RunnerRegistry.get_fail_thresholds (cognitive 28) checkov/common/runners/runner_registry.py:301 — RunnerRegistry.get_fail_thresholds has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 3, loops 2, ternaries 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Registry.scan (cognitive 28) · ×1
  • Registry.scan (cognitive 28) checkov/dockerfile/base_registry.py:24 — Registry.scan has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (23 pts), loops 3 (5 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RootContainersPSP.scan_spec_conf (cognitive 28) · ×1
  • RootContainersPSP.scan_spec_conf (cognitive 28) checkov/kubernetes/checks/resource/k8s/RootContainersPSP.py:20 — RootContainersPSP.scan_spec_conf has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (22 pts), loops 1 (6 pts) (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · NoMaximumNumberItems.check_array_max_items (cognitive 28) · ×1
  • NoMaximumNumberItems.check_array_max_items (cognitive 28) checkov/openapi/checks/resource/generic/NoMaximumNumberItems.py:25 — NoMaximumNumberItems.check_array_max_items has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 2 (6 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EntropyKeywordCombinator.analyze_line (cognitive 28) · ×1
  • EntropyKeywordCombinator.analyze_line (cognitive 28) checkov/secrets/plugins/entropy_keyword_combinator.py:149 — EntropyKeywordCombinator.analyze_line has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (19 pts), ternaries 2 (6 pts), loops 1 (3 pts) (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · S3SecureDataTransport._is_policy_secure (cognitive 28) · ×1
  • S3SecureDataTransport._is_policy_secure (cognitive 28) checkov/terraform/checks/resource/aws/S3SecureDataTransport.py:18 — S3SecureDataTransport._is_policy_secure has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (17 pts), boolean chains 7, loops 2 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GoogleCloudPostgreSqlLogCheckpoints.scan_resource_conf (cognitive 28) · ×1
  • GoogleCloudPostgreSqlLogCheckpoints.scan_resource_conf (cognitive 28) checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogCheckpoints.py:17 — GoogleCloudPostgreSqlLogCheckpoints.scan_resource_conf has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 1 (4 pts), boolean chains 3 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · GoogleCloudPostgreSqlLogConnection.scan_resource_conf (cognitive 28) · ×1
  • GoogleCloudPostgreSqlLogConnection.scan_resource_conf (cognitive 28) checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogConnection.py:13 — GoogleCloudPostgreSqlLogConnection.scan_resource_conf has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 1 (4 pts), boolean chains 3 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · GoogleCloudPostgreSqlLogDisconnection.scan_resource_conf (cognitive 28) · ×1
  • GoogleCloudPostgreSqlLogDisconnection.scan_resource_conf (cognitive 28) checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogDisconnection.py:13 — GoogleCloudPostgreSqlLogDisconnection.scan_resource_conf has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 1 (4 pts), boolean chains 3 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · GoogleCloudPostgreSqlLogTemp.scan_resource_conf (cognitive 28) · ×1
  • GoogleCloudPostgreSqlLogTemp.scan_resource_conf (cognitive 28) checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogTemp.py:13 — GoogleCloudPostgreSqlLogTemp.scan_resource_conf has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 1 (4 pts), boolean chains 3 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · AllowPrivilegeEscalation.scan_resource_conf (cognitive 28) · ×1
  • AllowPrivilegeEscalation.scan_resource_conf (cognitive 28) checkov/terraform/checks/resource/kubernetes/AllowPrivilegeEscalation.py:22 — AllowPrivilegeEscalation.scan_resource_conf has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (24 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · HostPort.scan_resource_conf (cognitive 28) · ×1
  • HostPort.scan_resource_conf (cognitive 28) checkov/terraform/checks/resource/kubernetes/HostPort.py:24 — HostPort.scan_resource_conf has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 2 (6 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RootContainersPSP.scan_resource_conf (cognitive 28) · ×1
  • RootContainersPSP.scan_resource_conf (cognitive 28) checkov/terraform/checks/resource/kubernetes/RootContainerPSP.py:16 — RootContainersPSP.scan_resource_conf has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (22 pts), loops 1 (6 pts) (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · WildcardRoles.scan_resource_conf (cognitive 28) · ×1
  • WildcardRoles.scan_resource_conf (cognitive 28) checkov/terraform/checks/resource/kubernetes/WildcardRoles.py:18 — WildcardRoles.scan_resource_conf has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (22 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · evaluate_terraform.evaluate_map (cognitive 28) · ×1
  • evaluate_terraform.evaluate_map (cognitive 28) checkov/terraform/graph_builder/variable_rendering/evaluate_terraform.py:492 — evaluate_terraform.evaluate_map has cognitive complexity 28 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 4 (8 pts), boolean chains 4 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TerraformVariableRenderer.evaluate_non_rendered_values (cognitive 28) · ×1
  • TerraformVariableRenderer.evaluate_non_rendered_values (cognitive 28) checkov/terraform/graph_builder/variable_rendering/renderer.py:504 — TerraformVariableRenderer.evaluate_non_rendered_values has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 3 (6 pts), boolean chains 4 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Registry.get_result_key (cognitive 28) · ×1
  • Registry.get_result_key (cognitive 28) checkov/yaml_doc/base_registry.py:286 — Registry.get_result_key has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (23 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · definition_context.build_definitions_context (cognitive 27) · ×1
  • definition_context.build_definitions_context (cognitive 27) checkov/arm/graph_builder/definition_context.py:13 — definition_context.build_definitions_context has cognitive complexity 27 (threshold 15). Drivers by points: if/else 4 (16 pts), loops 4 (11 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · resource_id_utils.generate_resource_key_recursive (cognitive 27) · ×1
  • resource_id_utils.generate_resource_key_recursive (cognitive 27) checkov/azure_pipelines/common/resource_id_utils.py:22 — resource_id_utils.generate_resource_key_recursive has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (15 pts), ternaries 2 (8 pts), loops 2 (4 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CloudformationLocalGraph._add_resource_attr_connections (cognitive 27) · ×1
  • CloudformationLocalGraph._add_resource_attr_connections (cognitive 27) checkov/cloudformation/graph_builder/local_graph.py:190 — CloudformationLocalGraph._add_resource_attr_connections has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 2 (5 pts), ternaries 1 (3 pts) (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · base_runner.filter_ignored_paths (cognitive 27) · ×1
  • base_runner.filter_ignored_paths (cognitive 27) checkov/common/runners/base_runner.py:201 — base_runner.filter_ignored_paths has cognitive complexity 27 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 3 (8 pts), loops 3 (5 pts), boolean chains 3, error handling 1 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Runner.run (cognitive 27) · ×1
  • Runner.run (cognitive 27) checkov/common/runners/object_runner.py:96 — Runner.run has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 5, loops 2 (5 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ExtArgumentParser.format_values (cognitive 27) · ×1
  • ExtArgumentParser.format_values (cognitive 27) checkov/common/util/ext_argument_parser.py:40 — ExtArgumentParser.format_values has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (18 pts), loops 3 (8 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · json_utils.object_hook (cognitive 27) · ×1
  • json_utils.object_hook (cognitive 27) checkov/common/util/json_utils.py:78 — json_utils.object_hook has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 2 (6 pts), boolean chains 3, error handling 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ServerlessLocalGraph._create_vertex (cognitive 27) · ×1
  • ServerlessLocalGraph._create_vertex (cognitive 27) checkov/serverless/graph_builder/local_graph.py:42 — ServerlessLocalGraph._create_vertex has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Runner.multi_item_sections_checks (cognitive 27) · ×1
  • Runner.multi_item_sections_checks (cognitive 27) checkov/serverless/runner.py:243 — Runner.multi_item_sections_checks has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 3 (8 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ECSClusterLoggingEncryptedWithCMK.scan_resource_conf (cognitive 27) · ×1
  • ECSClusterLoggingEncryptedWithCMK.scan_resource_conf (cognitive 27) checkov/terraform/checks/resource/aws/ECSClusterLoggingEncryptedWithCMK.py:17 — ECSClusterLoggingEncryptedWithCMK.scan_resource_conf has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (21 pts), boolean chains 6 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · S3AllowsAnyPrincipal.check_conditions (cognitive 27) · ×1
  • S3AllowsAnyPrincipal.check_conditions (cognitive 27) checkov/terraform/checks/resource/aws/S3AllowsAnyPrincipal.py:11 — S3AllowsAnyPrincipal.check_conditions has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 3 (6 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppGatewayWAFACLCVE202144228.scan_resource_conf (cognitive 27) · ×1
  • AppGatewayWAFACLCVE202144228.scan_resource_conf (cognitive 27) checkov/terraform/checks/resource/azure/AppGatewayWAFACLCVE202144228.py:16 — AppGatewayWAFACLCVE202144228.scan_resource_conf has cognitive complexity 27 (threshold 15). Drivers by points: if/else 4 (15 pts), boolean chains 6, loops 2 (6 pts) (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · AbsGooglePostgresqlDatabaseFlags.scan_resource_conf (cognitive 27) · ×1
  • AbsGooglePostgresqlDatabaseFlags.scan_resource_conf (cognitive 27) checkov/terraform/checks/resource/gcp/AbsGooglePostgresqlDatabaseFlags.py:11 — AbsGooglePostgresqlDatabaseFlags.scan_resource_conf has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 1 (4 pts), boolean chains 2 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · GKEPodSecurityPolicyEnabled.scan_resource_conf (cognitive 27) · ×1
  • GKEPodSecurityPolicyEnabled.scan_resource_conf (cognitive 27) checkov/terraform/checks/resource/gcp/GKEPodSecurityPolicyEnabled.py:22 — GKEPodSecurityPolicyEnabled.scan_resource_conf has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (21 pts), boolean chains 3, error handling 1 (3 pts) (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · GoogleCloudPostgreSqlLogMinMessage.scan_resource_conf (cognitive 27) · ×1
  • GoogleCloudPostgreSqlLogMinMessage.scan_resource_conf (cognitive 27) checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogMinMessage.py:13 — GoogleCloudPostgreSqlLogMinMessage.scan_resource_conf has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 1 (4 pts), boolean chains 2 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · IAMPassportAccountUsage.scan_resource_conf (cognitive 27) · ×1
  • IAMPassportAccountUsage.scan_resource_conf (cognitive 27) checkov/terraform/checks/resource/yandexcloud/IAMPassportAccountUsage.py:29 — IAMPassportAccountUsage.scan_resource_conf has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (21 pts), loops 3 (6 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plan_parser._find_child_modules (cognitive 27) · ×1
  • plan_parser._find_child_modules (cognitive 27) checkov/terraform/plan_parser.py:333 — plan_parser._find_child_modules has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 3 (6 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Registry._collect_inline_suppression_in_array (cognitive 27) · ×1
  • Registry._collect_inline_suppression_in_array (cognitive 27) checkov/yaml_doc/base_registry.py:348 — Registry._collect_inline_suppression_in_array has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (23 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Runner.get_images (cognitive 26) · ×1
  • Runner.get_images (cognitive 26) checkov/argo_workflows/runner.py:66 — Runner.get_images has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (23 pts), loops 1 (3 pts) (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · AKSApiServerAuthorizedIpRanges.scan_resource_conf (cognitive 26) · ×1
  • AKSApiServerAuthorizedIpRanges.scan_resource_conf (cognitive 26) checkov/arm/checks/resource/AKSApiServerAuthorizedIpRanges.py:20 — AKSApiServerAuthorizedIpRanges.scan_resource_conf has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (25 pts), boolean chains 1 (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · SuppressionsIntegration._check_suppression (cognitive 26) · ×1
  • SuppressionsIntegration._check_suppression (cognitive 26) checkov/common/bridgecrew/integration_features/features/suppressions_integration.py:193 — SuppressionsIntegration._check_suppression has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 5, loops 2 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WebhookHttpsOrg.scan_entity_conf (cognitive 26) · ×1
  • WebhookHttpsOrg.scan_entity_conf (cognitive 26) checkov/github/checks/webhooks_https_orgs.py:24 — WebhookHttpsOrg.scan_entity_conf has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (22 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ApiServerSecurityContextDenyPlugin.scan_container_conf (cognitive 26) · ×1
  • ApiServerSecurityContextDenyPlugin.scan_container_conf (cognitive 26) checkov/kubernetes/checks/resource/k8s/ApiServerSecurityContextDenyPlugin.py:13 — ApiServerSecurityContextDenyPlugin.scan_container_conf has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (22 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ApiServerTlsCertAndKey.scan_container_conf (cognitive 26) · ×1
  • ApiServerTlsCertAndKey.scan_container_conf (cognitive 26) checkov/kubernetes/checks/resource/k8s/ApiServerTlsCertAndKey.py:13 — ApiServerTlsCertAndKey.scan_container_conf has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (17 pts), boolean chains 3, loops 1 (3 pts), ternaries 1 (3 pts) (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · CloudFrontResponseHeaderStrictTransportSecurity.scan_resource_conf (cognitive 26) · ×1
  • CloudFrontResponseHeaderStrictTransportSecurity.scan_resource_conf (cognitive 26) checkov/terraform/checks/resource/aws/CloudFrontResponseHeaderStrictTransportSecurity.py:18 — CloudFrontResponseHeaderStrictTransportSecurity.scan_resource_conf has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 6 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · DLMScheduleCrossRegionEncryptionWithCMK.scan_resource_conf (cognitive 26) · ×1
  • DLMScheduleCrossRegionEncryptionWithCMK.scan_resource_conf (cognitive 26) checkov/terraform/checks/resource/aws/DLMScheduleCrossRegionEncryptionWithCMK.py:13 — DLMScheduleCrossRegionEncryptionWithCMK.scan_resource_conf has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 2 (8 pts), boolean chains 5 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · APIManagementMinTLS12.scan_resource_conf (cognitive 26) · ×1
  • APIManagementMinTLS12.scan_resource_conf (cognitive 26) checkov/terraform/checks/resource/azure/APIManagementMinTLS12.py:17 — APIManagementMinTLS12.scan_resource_conf has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (26 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GoogleComputeDefaultServiceAccountFullAccess.scan_resource_conf (cognitive 26) · ×1
  • GoogleComputeDefaultServiceAccountFullAccess.scan_resource_conf (cognitive 26) checkov/terraform/checks/resource/gcp/GoogleComputeDefaultServiceAccountFullAccess.py:20 — GoogleComputeDefaultServiceAccountFullAccess.scan_resource_conf has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 5 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · module_utils.get_module_dependency_map (cognitive 26) · ×1
  • module_utils.get_module_dependency_map (cognitive 26) checkov/terraform/modules/module_utils.py:82 — module_utils.get_module_dependency_map has cognitive complexity 26 (threshold 15). Drivers by points: loops 7 (14 pts), if/else 4 (12 pts) (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · plan_parser._get_provisioner (cognitive 26) · ×1
  • plan_parser._get_provisioner (cognitive 26) checkov/terraform/plan_parser.py:563 — plan_parser._get_provisioner has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (20 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · WebhookHttpsRepo.scan_entity_conf (cognitive 25) · ×1
  • WebhookHttpsRepo.scan_entity_conf (cognitive 25) checkov/github/checks/webhooks_https_repos.py:24 — WebhookHttpsRepo.scan_entity_conf has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (22 pts), loops 1 (3 pts) (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ApiServerAdmissionControlAlwaysAdmit.scan_container_conf (cognitive 25) · ×1
  • ApiServerAdmissionControlAlwaysAdmit.scan_container_conf (cognitive 25) checkov/kubernetes/checks/resource/k8s/ApiServerAdmissionControlAlwaysAdmit.py:13 — ApiServerAdmissionControlAlwaysAdmit.scan_container_conf has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (22 pts), loops 1 (3 pts) (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ApiServerAlwaysPullImagesPlugin.scan_container_conf (cognitive 25) · ×1
  • ApiServerAlwaysPullImagesPlugin.scan_container_conf (cognitive 25) checkov/kubernetes/checks/resource/k8s/ApiServerAlwaysPullImagesPlugin.py:13 — ApiServerAlwaysPullImagesPlugin.scan_container_conf has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (22 pts), loops 1 (3 pts) (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ApiServerNamespaceLifecyclePlugin.scan_container_conf (cognitive 25) · ×1
  • ApiServerNamespaceLifecyclePlugin.scan_container_conf (cognitive 25) checkov/kubernetes/checks/resource/k8s/ApiServerNamespaceLifecyclePlugin.py:13 — ApiServerNamespaceLifecyclePlugin.scan_container_conf has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (22 pts), loops 1 (3 pts) (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ApiServerNodeRestrictionPlugin.scan_container_conf (cognitive 25) · ×1
  • ApiServerNodeRestrictionPlugin.scan_container_conf (cognitive 25) checkov/kubernetes/checks/resource/k8s/ApiServerNodeRestrictionPlugin.py:13 — ApiServerNodeRestrictionPlugin.scan_container_conf has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (22 pts), loops 1 (3 pts) (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ApiServerPodSecurityPolicyPlugin.scan_container_conf (cognitive 25) · ×1
  • ApiServerPodSecurityPolicyPlugin.scan_container_conf (cognitive 25) checkov/kubernetes/checks/resource/k8s/ApiServerPodSecurityPolicyPlugin.py:13 — ApiServerPodSecurityPolicyPlugin.scan_container_conf has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (22 pts), loops 1 (3 pts) (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ApiServerRequestTimeout.scan_container_conf (cognitive 25) · ×1
  • ApiServerRequestTimeout.scan_container_conf (cognitive 25) checkov/kubernetes/checks/resource/k8s/ApiServerRequestTimeout.py:16 — ApiServerRequestTimeout.scan_container_conf has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (22 pts), loops 1 (3 pts) (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ApiServerServiceAccountKeyFile.scan_container_conf (cognitive 25) · ×1
  • ApiServerServiceAccountKeyFile.scan_container_conf (cognitive 25) checkov/kubernetes/checks/resource/k8s/ApiServerServiceAccountKeyFile.py:16 — ApiServerServiceAccountKeyFile.scan_container_conf has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (22 pts), loops 1 (3 pts) (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ApiServerServiceAccountPlugin.scan_container_conf (cognitive 25) · ×1
  • ApiServerServiceAccountPlugin.scan_container_conf (cognitive 25) checkov/kubernetes/checks/resource/k8s/ApiServerServiceAccountPlugin.py:13 — ApiServerServiceAccountPlugin.scan_container_conf has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (22 pts), loops 1 (3 pts) (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · TillerService.scan_spec_conf (cognitive 25) · ×1
  • TillerService.scan_spec_conf (cognitive 25) checkov/kubernetes/checks/resource/k8s/TillerService.py:18 — TillerService.scan_spec_conf has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CleartextCredsOverUnencryptedChannel.scan_openapi_conf (cognitive 25) · ×1
  • CleartextCredsOverUnencryptedChannel.scan_openapi_conf (cognitive 25) checkov/openapi/checks/resource/v3/CleartextOverUnencryptedChannel.py:19 — CleartextCredsOverUnencryptedChannel.scan_openapi_conf has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 5, loops 3 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RunnerFilter.should_run_check (cognitive 25) · ×1
  • RunnerFilter.should_run_check (cognitive 25) checkov/runner_filter.py:194 — RunnerFilter.should_run_check has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 12 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AbsNACLUnrestrictedIngress.check_deny_rule (cognitive 25) · ×1
  • AbsNACLUnrestrictedIngress.check_deny_rule (cognitive 25) checkov/terraform/checks/resource/aws/AbsNACLUnrestrictedIngress.py:89 — AbsNACLUnrestrictedIngress.check_deny_rule has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 6, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AbsSecurityGroupUnrestrictedEgress.contains_violation (cognitive 25) · ×1
  • AbsSecurityGroupUnrestrictedEgress.contains_violation (cognitive 25) checkov/terraform/checks/resource/aws/AbsSecurityGroupUnrestrictedEgress.py:78 — AbsSecurityGroupUnrestrictedEgress.contains_violation has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 8 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AbsSecurityGroupUnrestrictedIngress.contains_violation (cognitive 25) · ×1
  • AbsSecurityGroupUnrestrictedIngress.contains_violation (cognitive 25) checkov/terraform/checks/resource/aws/AbsSecurityGroupUnrestrictedIngress.py:78 — AbsSecurityGroupUnrestrictedIngress.contains_violation has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 8 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DLMScheduleCrossRegionEncryption.scan_resource_conf (cognitive 25) · ×1
  • DLMScheduleCrossRegionEncryption.scan_resource_conf (cognitive 25) checkov/terraform/checks/resource/aws/DLMScheduleCrossRegionEncryption.py:13 — DLMScheduleCrossRegionEncryption.scan_resource_conf has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 2 (8 pts), boolean chains 4 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · AbsGoogleComputeFirewallUnrestrictedIngress.scan_resource_conf (cognitive 25) · ×1
  • AbsGoogleComputeFirewallUnrestrictedIngress.scan_resource_conf (cognitive 25) checkov/terraform/checks/resource/gcp/AbsGoogleComputeFirewallUnrestrictedIngress.py:12 — AbsGoogleComputeFirewallUnrestrictedIngress.scan_resource_conf has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (22 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · VPCSecurityGroupAllowAll.scan_resource_conf (cognitive 25) · ×1
  • VPCSecurityGroupAllowAll.scan_resource_conf (cognitive 25) checkov/terraform/checks/resource/yandexcloud/VPCSecurityGroupAllowAll.py:22 — VPCSecurityGroupAllowAll.scan_resource_conf has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (21 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · VPCSecurityGroupRuleAllowAll.scan_resource_conf (cognitive 25) · ×1
  • VPCSecurityGroupRuleAllowAll.scan_resource_conf (cognitive 25) checkov/terraform/checks/resource/yandexcloud/VPCSecurityGroupRuleAllowAll.py:22 — VPCSecurityGroupRuleAllowAll.scan_resource_conf has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (21 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ContextParser.search_deep_values (cognitive 24) · ×1
  • ContextParser.search_deep_values (cognitive 24) checkov/arm/context_parser.py:186 — ContextParser.search_deep_values has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 5 (11 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParameterStoreCredentials.scan_resource_conf (cognitive 24) · ×1
  • ParameterStoreCredentials.scan_resource_conf (cognitive 24) checkov/cloudformation/checks/resource/aws/ParameterStoreCredentials.py:29 — ParameterStoreCredentials.scan_resource_conf has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (22 pts), boolean chains 2 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · CustomPoliciesIntegration.pre_scan (cognitive 24) · ×1
  • CustomPoliciesIntegration.pre_scan (cognitive 24) checkov/common/bridgecrew/integration_features/features/custom_policies_integration.py:47 — CustomPoliciesIntegration.pre_scan has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3 (7 pts), error handling 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BcPlatformIntegration.persist_cdk_scan_results (cognitive 24) · ×1
  • BcPlatformIntegration.persist_cdk_scan_results (cognitive 24) checkov/common/bridgecrew/platform_integration.py:723 — BcPlatformIntegration.persist_cdk_scan_results has cognitive complexity 24 (threshold 15). Drivers by points: loops 6 (13 pts), if/else 5 (11 pts) (nesting depth added 13). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · Sarif._create_results (cognitive 24) · ×1
  • Sarif._create_results (cognitive 24) checkov/common/output/sarif.py:198 — Sarif._create_results has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (13 pts), boolean chains 4, ternaries 1 (4 pts), loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · parser.parse (cognitive 24) · ×1
  • parser.parse (cognitive 24) checkov/common/parsers/yaml/parser.py:15 — parser.parse has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 4, error handling 3, loops 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Runner.add_graph_check_results (cognitive 24) · ×1
  • Runner.add_graph_check_results (cognitive 24) checkov/common/runners/object_runner.py:230 — Runner.add_graph_check_results has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (14 pts), loops 3 (8 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · http_utils.request_wrapper (cognitive 24) · ×1
  • http_utils.request_wrapper (cognitive 24) checkov/common/util/http_utils.py:213 — http_utils.request_wrapper has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (11 pts), ternaries 2 (6 pts), error handling 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Runner.add_python_check_results (cognitive 24) · ×1
  • Runner.add_python_check_results (cognitive 24) checkov/dockerfile/runner.py:147 — Runner.add_python_check_results has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (10 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GlobalSecurityScopeUndefined.scan_openapi_conf (cognitive 24) · ×1
  • GlobalSecurityScopeUndefined.scan_openapi_conf (cognitive 24) checkov/openapi/checks/resource/v2/GlobalSecurityScopeUndefined.py:23 — GlobalSecurityScopeUndefined.scan_openapi_conf has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WhoAMI.scan_data_conf (cognitive 24) · ×1
  • WhoAMI.scan_data_conf (cognitive 24) checkov/terraform/checks/data/aws/WhoAMI.py:15 — WhoAMI.scan_data_conf has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 2 (7 pts), boolean chains 1 (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · LambdaEnvironmentCredentials.scan_resource_conf (cognitive 24) · ×1
  • LambdaEnvironmentCredentials.scan_resource_conf (cognitive 24) checkov/terraform/checks/resource/aws/LambdaEnvironmentCredentials.py:17 — LambdaEnvironmentCredentials.scan_resource_conf has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 2 (7 pts), boolean chains 2 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · GoogleCloudSqlDatabaseRequireSsl.scan_resource_conf (cognitive 24) · ×1
  • GoogleCloudSqlDatabaseRequireSsl.scan_resource_conf (cognitive 24) checkov/terraform/checks/resource/gcp/GoogleCloudSqlDatabaseRequireSsl.py:16 — GoogleCloudSqlDatabaseRequireSsl.scan_resource_conf has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (16 pts), ternaries 2 (6 pts), boolean chains 2 (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · DangerousGitSync.scan_resource_conf (cognitive 24) · ×1
  • DangerousGitSync.scan_resource_conf (cognitive 24) checkov/terraform/checks/resource/kubernetes/DangerousGitSync.py:16 — DangerousGitSync.scan_resource_conf has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (6 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TerraformVariableRenderer.extract_value_from_vertex (cognitive 24) · ×1
  • TerraformVariableRenderer.extract_value_from_vertex (cognitive 24) checkov/terraform/graph_builder/variable_rendering/renderer.py:180 — TerraformVariableRenderer.extract_value_from_vertex has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (15 pts), error handling 1 (3 pts), boolean chains 2, loops 2, ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plan_parser._get_providers (cognitive 24) · ×1
  • plan_parser._get_providers (cognitive 24) checkov/terraform/plan_parser.py:403 — plan_parser._get_providers has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · context_definitions.build_definitions_context (cognitive 23) · ×1
  • context_definitions.build_definitions_context (cognitive 23) checkov/bicep/graph_builder/context_definitions.py:15 — context_definitions.build_definitions_context has cognitive complexity 23 (threshold 15). Drivers by points: loops 5 (14 pts), if/else 2 (7 pts), boolean chains 2 (nesting depth added 14). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · ALBListenerHTTPS.scan_resource_conf (cognitive 23) · ×1
  • ALBListenerHTTPS.scan_resource_conf (cognitive 23) checkov/cloudformation/checks/resource/aws/ALBListenerHTTPS.py:18 — ALBListenerHTTPS.scan_resource_conf has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (20 pts), boolean chains 3 (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Runner.run (cognitive 23) · ×1
  • Runner.run (cognitive 23) checkov/cloudformation/runner.py:69 — Runner.run has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Block.update_inner_attribute (cognitive 23) · ×1
  • Block.update_inner_attribute (cognitive 23) checkov/common/graph/graph_builder/graph_components/blocks.py:224 — Block.update_inner_attribute has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils.update_dictionary_attribute (cognitive 23) · ×1
  • utils.update_dictionary_attribute (cognitive 23) checkov/common/graph/graph_builder/utils.py:100 — utils.update_dictionary_attribute has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 1 (4 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Report.get_test_suite (cognitive 23) · ×1
  • Report.get_test_suite (cognitive 23) checkov/common/output/report.py:412 — Report.get_test_suite has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (19 pts), ternaries 1 (3 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Sarif._create_rules (cognitive 23) · ×1
  • Sarif._create_rules (cognitive 23) checkov/common/output/sarif.py:70 — Sarif._create_rules has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BaseRbacK8sCheck.resource_or_wildcard (cognitive 23) · ×1
  • BaseRbacK8sCheck.resource_or_wildcard (cognitive 23) checkov/kubernetes/checks/resource/base_rbac_check.py:65 — BaseRbacK8sCheck.resource_or_wildcard has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SeccompPSP.scan_spec_conf (cognitive 23) · ×1
  • SeccompPSP.scan_spec_conf (cognitive 23) checkov/kubernetes/checks/resource/k8s/SeccompPSP.py:19 — SeccompPSP.scan_spec_conf has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (14 pts), loops 2 (7 pts), boolean chains 2 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · parser.parse (cognitive 23) · ×1
  • parser.parse (cognitive 23) checkov/kubernetes/parser/parser.py:17 — parser.parse has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (16 pts), error handling 3, loops 1 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OperationObjectProducesUndefined.scan_openapi_conf (cognitive 23) · ×1
  • OperationObjectProducesUndefined.scan_openapi_conf (cognitive 23) checkov/openapi/checks/resource/v2/OperationObjectProducesUndefined.py:23 — OperationObjectProducesUndefined.scan_openapi_conf has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · runner._find_files_from_root_folder (cognitive 23) · ×1
  • runner._find_files_from_root_folder (cognitive 23) checkov/secrets/runner.py:244 — runner._find_files_from_root_folder has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (15 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GitHistoryScanner._get_commits_diff (cognitive 23) · ×1
  • GitHistoryScanner._get_commits_diff (cognitive 23) REDACTED:129 — GitHistoryScanner._get_commits_diff has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 2 (4 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ECSTaskDefinitionEFSVolumeEncryption.scan_resource_conf (cognitive 23) · ×1
  • ECSTaskDefinitionEFSVolumeEncryption.scan_resource_conf (cognitive 23) checkov/terraform/checks/resource/aws/ECSTaskDefinitionEFSVolumeEncryption.py:13 — ECSTaskDefinitionEFSVolumeEncryption.scan_resource_conf has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (15 pts), loops 2 (6 pts), boolean chains 2 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · AppGWDefinesSecureProtocols.scan_resource_conf (cognitive 23) · ×1
  • AppGWDefinesSecureProtocols.scan_resource_conf (cognitive 23) checkov/terraform/checks/resource/azure/AppGWDefinesSecureProtocols.py:49 — AppGWDefinesSecureProtocols.scan_resource_conf has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (18 pts), boolean chains 5 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · GoogleCloudPostgreSqlLogLockWaits.scan_resource_conf (cognitive 23) · ×1
  • GoogleCloudPostgreSqlLogLockWaits.scan_resource_conf (cognitive 23) checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogLockWaits.py:13 — GoogleCloudPostgreSqlLogLockWaits.scan_resource_conf has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 1 (4 pts), boolean chains 3 (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · GoogleCloudPostgreSqlLogMinDuration.scan_resource_conf (cognitive 23) · ×1
  • GoogleCloudPostgreSqlLogMinDuration.scan_resource_conf (cognitive 23) checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogMinDuration.py:13 — GoogleCloudPostgreSqlLogMinDuration.scan_resource_conf has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 1 (4 pts), boolean chains 3 (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · GoogleCloudSqlServerContainedDBAuthentication.scan_resource_conf (cognitive 23) · ×1
  • GoogleCloudSqlServerContainedDBAuthentication.scan_resource_conf (cognitive 23) checkov/terraform/checks/resource/gcp/GoogleCloudSqlServerContainedDBAuthentication.py:13 — GoogleCloudSqlServerContainedDBAuthentication.scan_resource_conf has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 1 (4 pts), boolean chains 3 (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · GoogleCloudSqlServerCrossDBOwnershipChaining.scan_resource_conf (cognitive 23) · ×1
  • GoogleCloudSqlServerCrossDBOwnershipChaining.scan_resource_conf (cognitive 23) checkov/terraform/checks/resource/gcp/GoogleCloudSqlServerCrossDBOwnershipChaining.py:13 — GoogleCloudSqlServerCrossDBOwnershipChaining.scan_resource_conf has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 1 (4 pts), boolean chains 3 (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ImageDigest.scan_resource_conf (cognitive 23) · ×1
  • ImageDigest.scan_resource_conf (cognitive 23) checkov/terraform/checks/resource/kubernetes/ImageDigest.py:23 — ImageDigest.scan_resource_conf has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (18 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BaseContextParser._collect_skip_comments (cognitive 23) · ×1
  • BaseContextParser._collect_skip_comments (cognitive 23) checkov/terraform/context_parsers/base_parser.py:90 — BaseContextParser._collect_skip_comments has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (5 pts), boolean chains 2, ternaries 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TerraformLocalGraph._build_s3_name_reference_edges (cognitive 23) · ×1
  • TerraformLocalGraph._build_s3_name_reference_edges (cognitive 23) checkov/terraform/graph_builder/local_graph.py:459 — TerraformLocalGraph._build_s3_name_reference_edges has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 4 (7 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · evaluate_terraform.evaluate_directives (cognitive 23) · ×1
  • evaluate_terraform.evaluate_directives (cognitive 23) checkov/terraform/graph_builder/variable_rendering/evaluate_terraform.py:451 — evaluate_terraform.evaluate_directives has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 2 (4 pts), boolean chains 1, ternaries 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RegistryLoader._load_module (cognitive 23) · ×1
  • RegistryLoader._load_module (cognitive 23) checkov/terraform/module_loading/loaders/registry_loader.py:76 — RegistryLoader._load_module has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (17 pts), error handling 2 (3 pts), boolean chains 2, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plan_parser._update_after_unknown_in_complex_types (cognitive 23) · ×1
  • plan_parser._update_after_unknown_in_complex_types (cognitive 23) checkov/terraform/plan_parser.py:282 — plan_parser._update_after_unknown_in_complex_types has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · azure.extract_images_from_azurerm_container_group (cognitive 22) · ×1
  • azure.extract_images_from_azurerm_container_group (cognitive 22) checkov/bicep/image_referencer/provider/azure.py:34 — azure.extract_images_from_azurerm_container_group has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ALBDropHttpHeaders.scan_resource_conf (cognitive 22) · ×1
  • ALBDropHttpHeaders.scan_resource_conf (cognitive 22) checkov/cloudformation/checks/resource/aws/ALBDropHttpHeaders.py:14 — ALBDropHttpHeaders.scan_resource_conf has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ContextParser.collect_skip_comments (cognitive 22) · ×1
  • ContextParser.collect_skip_comments (cognitive 22) checkov/cloudformation/context_parser.py:117 — ContextParser.collect_skip_comments has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 1 (4 pts), boolean chains 2 (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Runner.get_graph_checks_report (cognitive 22) · ×1
  • Runner.get_graph_checks_report (cognitive 22) checkov/cloudformation/runner.py:208 — Runner.get_graph_checks_report has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SuppressionsIntegration._apply_suppressions_to_report (cognitive 22) · ×1
  • SuppressionsIntegration._apply_suppressions_to_report (cognitive 22) checkov/common/bridgecrew/integration_features/features/suppressions_integration.py:110 — SuppressionsIntegration._apply_suppressions_to_report has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 2 (5 pts), boolean chains 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BcPlatformIntegration.commit_repository (cognitive 22) · ×1
  • BcPlatformIntegration.commit_repository (cognitive 22) checkov/common/bridgecrew/platform_integration.py:877 — BcPlatformIntegration.commit_repository has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), error handling 2 (4 pts), boolean chains 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · runner.get_skipped_checks (cognitive 22) · ×1
  • runner.get_skipped_checks (cognitive 22) checkov/helm/runner.py:569 — runner.get_skipped_checks has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · NetworkPolicyEdgeBuilder.find_connections (cognitive 22) · ×1
  • NetworkPolicyEdgeBuilder.find_connections (cognitive 22) checkov/kubernetes/graph_builder/graph_components/edge_builders/NetworkPolicyEdgeBuilder.py:15 — NetworkPolicyEdgeBuilder.find_connections has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 3, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · K8sKustomizeRunner.mutate_kubernetes_graph_results (cognitive 22) · ×1
  • K8sKustomizeRunner.mutate_kubernetes_graph_results (cognitive 22) checkov/kustomize/runner.py:330 — K8sKustomizeRunner.mutate_kubernetes_graph_results has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OperationObjectConsumesUndefined.scan_openapi_conf (cognitive 22) · ×1
  • OperationObjectConsumesUndefined.scan_openapi_conf (cognitive 22) checkov/openapi/checks/resource/v2/OperationObjectConsumesUndefined.py:23 — OperationObjectConsumesUndefined.scan_openapi_conf has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ECSContainerReadOnlyRoot.scan_resource_conf (cognitive 22) · ×1
  • ECSContainerReadOnlyRoot.scan_resource_conf (cognitive 22) checkov/terraform/checks/resource/aws/ECSContainerReadOnlyRoot.py:20 — ECSContainerReadOnlyRoot.scan_resource_conf has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GKEUseCosImage.scan_resource_conf (cognitive 22) · ×1
  • GKEUseCosImage.scan_resource_conf (cognitive 22) checkov/terraform/checks/resource/gcp/GKEUseCosImage.py:13 — GKEUseCosImage.scan_resource_conf has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (18 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GoogleCloudMySqlLocalInfileOff.scan_resource_conf (cognitive 22) · ×1
  • GoogleCloudMySqlLocalInfileOff.scan_resource_conf (cognitive 22) checkov/terraform/checks/resource/gcp/GoogleCloudMySqlLocalInfileOff.py:13 — GoogleCloudMySqlLocalInfileOff.scan_resource_conf has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 1 (4 pts), boolean chains 2 (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · TillerService.scan_resource_conf (cognitive 22) · ×1
  • TillerService.scan_resource_conf (cognitive 22) checkov/terraform/checks/resource/kubernetes/TillerService.py:17 — TillerService.scan_resource_conf has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 4, loops 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AccessControlGroupInboundRule.contains_violation (cognitive 22) · ×1
  • AccessControlGroupInboundRule.contains_violation (cognitive 22) checkov/terraform/checks/resource/ncp/AccessControlGroupInboundRule.py:36 — AccessControlGroupInboundRule.contains_violation has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (17 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · TKEPublicIpAssigned.scan_resource_conf (cognitive 22) · ×1
  • TKEPublicIpAssigned.scan_resource_conf (cognitive 22) checkov/terraform/checks/resource/tencentcloud/TKEPublicIpAssigned.py:14 — TKEPublicIpAssigned.scan_resource_conf has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · aws.extract_images_from_aws_sagemaker_model (cognitive 22) · ×1
  • aws.extract_images_from_aws_sagemaker_model (cognitive 22) checkov/terraform/image_referencer/provider/aws.py:97 — aws.extract_images_from_aws_sagemaker_model has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ContextParser.collect_skip_comments (cognitive 21) · ×1
  • ContextParser.collect_skip_comments (cognitive 21) checkov/arm/context_parser.py:133 — ContextParser.collect_skip_comments has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (12 pts), ternaries 1 (5 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Runner.run (cognitive 21) · ×1
  • Runner.run (cognitive 21) checkov/arm/runner.py:68 — Runner.run has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PolicyMetadataIntegration.pre_scan (cognitive 21) · ×1
  • PolicyMetadataIntegration.pre_scan (cognitive 21) checkov/common/bridgecrew/integration_features/features/policy_metadata_integration.py:39 — PolicyMetadataIntegration.pre_scan has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 3, loops 2, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ApiServerStrongCryptographicCiphers.scan_container_conf (cognitive 21) · ×1
  • ApiServerStrongCryptographicCiphers.scan_container_conf (cognitive 21) checkov/kubernetes/checks/resource/k8s/ApiServerStrongCryptographicCiphers.py:24 — ApiServerStrongCryptographicCiphers.scan_container_conf has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 2 (8 pts) (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · KubeletClientCa.scan_container_conf (cognitive 21) · ×1
  • KubeletClientCa.scan_container_conf (cognitive 21) checkov/kubernetes/checks/resource/k8s/KubeletClientCa.py:14 — KubeletClientCa.scan_container_conf has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (18 pts), loops 1 (3 pts) (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · KubeletCryptographicCiphers.scan_container_conf (cognitive 21) · ×1
  • KubeletCryptographicCiphers.scan_container_conf (cognitive 21) checkov/kubernetes/checks/resource/k8s/KubeletCryptographicCiphers.py:25 — KubeletCryptographicCiphers.scan_container_conf has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 2 (8 pts) (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · KubletEventCapture.scan_container_conf (cognitive 21) · ×1
  • KubletEventCapture.scan_container_conf (cognitive 21) checkov/kubernetes/checks/resource/k8s/KubletEventCapture.py:14 — KubletEventCapture.scan_container_conf has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (18 pts), loops 1 (3 pts) (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · KubernetesLocalGraph._create_vertices (cognitive 21) · ×1
  • KubernetesLocalGraph._create_vertices (cognitive 21) checkov/kubernetes/graph_builder/local_graph.py:37 — KubernetesLocalGraph._create_vertices has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KubernetesLocalGraph._get_k8s_block_metadata (cognitive 21) · ×1
  • KubernetesLocalGraph._get_k8s_block_metadata (cognitive 21) checkov/kubernetes/graph_builder/local_graph.py:110 — KubernetesLocalGraph._get_k8s_block_metadata has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 1 (2 pts) (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · K8sValidator._is_section_valid (cognitive 21) · ×1
  • K8sValidator._is_section_valid (cognitive 21) checkov/kubernetes/parser/validatior.py:32 — K8sValidator._is_section_valid has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 2 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · K8sKustomizeRunner.mutate_kubernetes_results (cognitive 21) · ×1
  • K8sKustomizeRunner.mutate_kubernetes_results (cognitive 21) checkov/kustomize/runner.py:151 — K8sKustomizeRunner.mutate_kubernetes_results has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · runner._get_kustomization_remote_refs (cognitive 21) · ×1
  • runner._get_kustomization_remote_refs (cognitive 21) checkov/kustomize/runner.py:61 — runner._get_kustomization_remote_refs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (6 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FilesFilterManager._get_js_files_to_filter (cognitive 21) · ×1
  • FilesFilterManager._get_js_files_to_filter (cognitive 21) checkov/sast/engines/files_filter_manager.py:25 — FilesFilterManager._get_js_files_to_filter has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (15 pts), loops 3 (6 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ECSContainerHostProcess.scan_resource_conf (cognitive 21) · ×1
  • ECSContainerHostProcess.scan_resource_conf (cognitive 21) checkov/terraform/checks/resource/aws/ECSContainerHostProcess.py:19 — ECSContainerHostProcess.scan_resource_conf has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (6 pts), boolean chains 4 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ECSContainerPrivilege.scan_resource_conf (cognitive 21) · ×1
  • ECSContainerPrivilege.scan_resource_conf (cognitive 21) checkov/terraform/checks/resource/aws/ECSContainerPrivilege.py:20 — ECSContainerPrivilege.scan_resource_conf has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (6 pts), boolean chains 4 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CPULimits.scan_resource_conf (cognitive 21) · ×1
  • CPULimits.scan_resource_conf (cognitive 21) checkov/terraform/checks/resource/kubernetes/CPULimits.py:18 — CPULimits.scan_resource_conf has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 3, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CPURequests.scan_resource_conf (cognitive 21) · ×1
  • CPURequests.scan_resource_conf (cognitive 21) checkov/terraform/checks/resource/kubernetes/CPURequests.py:14 — CPURequests.scan_resource_conf has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 3, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MemoryLimits.scan_resource_conf (cognitive 21) · ×1
  • MemoryLimits.scan_resource_conf (cognitive 21) checkov/terraform/checks/resource/kubernetes/MemoryLimits.py:14 — MemoryLimits.scan_resource_conf has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 3, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MemoryRequests.scan_resource_conf (cognitive 21) · ×1
  • MemoryRequests.scan_resource_conf (cognitive 21) checkov/terraform/checks/resource/kubernetes/MemoryRequests.py:14 — MemoryRequests.scan_resource_conf has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 3, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · safe_eval_functions.formatdate (cognitive 21) · ×1
  • safe_eval_functions.formatdate (cognitive 21) checkov/terraform/graph_builder/variable_rendering/safe_eval_functions.py:223 — safe_eval_functions.formatdate has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · parser.parse (cognitive 21) · ×1
  • parser.parse (cognitive 21) checkov/terraform_json/parser.py:26 — parser.parse has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (12 pts), error handling 6 (8 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppServiceInstanceMinimum.scan_resource_conf (cognitive 20) · ×1
  • AppServiceInstanceMinimum.scan_resource_conf (cognitive 20) checkov/arm/checks/resource/AppServiceInstanceMinimum.py:21 — AppServiceInstanceMinimum.scan_resource_conf has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (20 pts) (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · AzureMLWorkspacePrivateEndpoint.scan_resource_conf (cognitive 20) · ×1
  • AzureMLWorkspacePrivateEndpoint.scan_resource_conf (cognitive 20) checkov/arm/checks/resource/AzureMLWorkspacePrivateEndpoint.py:16 — AzureMLWorkspacePrivateEndpoint.scan_resource_conf has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 1 (4 pts) (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · StorageAccountAzureServicesAccessEnabled.scan_resource_conf (cognitive 20) · ×1
  • StorageAccountAzureServicesAccessEnabled.scan_resource_conf (cognitive 20) checkov/arm/checks/resource/StorageAccountAzureServicesAccessEnabled.py:21 — StorageAccountAzureServicesAccessEnabled.scan_resource_conf has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 1 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · parser.parse (cognitive 20) · ×1
  • parser.parse (cognitive 20) checkov/arm/parser/parser.py:19 — parser.parse has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (12 pts), error handling 5 (7 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CloudformationVariableRenderer._evaluate_sub_connection (cognitive 20) · ×1
  • CloudformationVariableRenderer._evaluate_sub_connection (cognitive 20) checkov/cloudformation/graph_builder/variable_rendering/renderer.py:310 — CloudformationVariableRenderer._evaluate_sub_connection has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 2 (7 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Registry._scan (cognitive 20) · ×1
  • Registry._scan (cognitive 20) checkov/common/checks/object_registry.py:96 — Registry._scan has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Runner.add_python_check_results (cognitive 20) · ×1
  • Runner.add_python_check_results (cognitive 20) checkov/common/runners/object_runner.py:165 — Runner.add_python_check_results has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · secrets.omit_secret_value_from_checks (cognitive 20) · ×1
  • secrets.omit_secret_value_from_checks (cognitive 20) checkov/common/util/secrets.py:152 — secrets.omit_secret_value_from_checks has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GithubRepositoryCollaborators.scan_entity_conf (cognitive 20) · ×1
  • GithubRepositoryCollaborators.scan_entity_conf (cognitive 20) checkov/github/checks/repository_collaborators.py:24 — GithubRepositoryCollaborators.scan_entity_conf has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Registry._scan_json (cognitive 20) · ×1
  • Registry._scan_json (cognitive 20) checkov/json_doc/base_registry.py:63 — Registry._scan_json has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DockerSocketVolume.scan_spec_conf (cognitive 20) · ×1
  • DockerSocketVolume.scan_spec_conf (cognitive 20) checkov/kubernetes/checks/resource/k8s/DockerSocketVolume.py:32 — DockerSocketVolume.scan_spec_conf has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 2 (4 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KubeControllerManagerTerminatedPods.scan_container_conf (cognitive 20) · ×1
  • KubeControllerManagerTerminatedPods.scan_container_conf (cognitive 20) checkov/kubernetes/checks/resource/k8s/KubeControllerManagerTerminatedPods.py:13 — KubeControllerManagerTerminatedPods.scan_container_conf has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 1 (3 pts) (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Oauth2SecurityPasswordFlow.scan_openapi_conf (cognitive 20) · ×1
  • Oauth2SecurityPasswordFlow.scan_openapi_conf (cognitive 20) checkov/openapi/checks/resource/v2/Oauth2SecurityPasswordFlow.py:23 — Oauth2SecurityPasswordFlow.scan_openapi_conf has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils.filter_excluded_paths (cognitive 20) · ×1
  • utils.filter_excluded_paths (cognitive 20) checkov/secrets/utils.py:13 — utils.filter_excluded_paths has cognitive complexity 20 (threshold 15). Drivers by points: if/else 3 (6 pts), loops 3 (5 pts), ternaries 2 (5 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Runner.run (cognitive 20) · ×1
  • Runner.run (cognitive 20) checkov/serverless/runner.py:83 — Runner.run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GithubActionsOIDCTrustPolicyOnRole._evaluate_sub_conditions (cognitive 20) · ×1
  • GithubActionsOIDCTrustPolicyOnRole._evaluate_sub_conditions (cognitive 20) checkov/terraform/checks/resource/aws/GithubActionsOIDCTrustPolicyOnRole.py:85 — GithubActionsOIDCTrustPolicyOnRole._evaluate_sub_conditions has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IAMRoleAllowsPublicAssume.scan_resource_conf (cognitive 20) · ×1
  • IAMRoleAllowsPublicAssume.scan_resource_conf (cognitive 20) checkov/terraform/checks/resource/aws/IAMRoleAllowsPublicAssume.py:16 — IAMRoleAllowsPublicAssume.scan_resource_conf has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 5, loops 1 (2 pts), error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ReadonlyRootFilesystem.scan_resource_conf (cognitive 20) · ×1
  • ReadonlyRootFilesystem.scan_resource_conf (cognitive 20) checkov/terraform/checks/resource/kubernetes/ReadonlyRootFilesystem.py:16 — ReadonlyRootFilesystem.scan_resource_conf has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AnsibleLocalGraph._create_vertices (cognitive 19) · ×1
  • AnsibleLocalGraph._create_vertices (cognitive 19) checkov/ansible/graph_builder/local_graph.py:24 — AnsibleLocalGraph._create_vertices has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (8 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils.build_definitions_context (cognitive 19) · ×1
  • utils.build_definitions_context (cognitive 19) checkov/ansible/utils.py:128 — utils.build_definitions_context has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (8 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · APIManagementMinTLS12.scan_resource_conf (cognitive 19) · ×1
  • APIManagementMinTLS12.scan_resource_conf (cognitive 19) checkov/arm/checks/resource/APIManagementMinTLS12.py:17 — APIManagementMinTLS12.scan_resource_conf has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (18 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SQLServerAuditingRetention90Days.check_resource (cognitive 19) · ×1
  • SQLServerAuditingRetention90Days.check_resource (cognitive 19) checkov/arm/checks/resource/SQLServerAuditingRetention90Days.py:45 — SQLServerAuditingRetention90Days.check_resource has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 pts), error handling 1 (4 pts), boolean chains 2 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · VMScaleSetsAutoOSImagePatchingEnabled.scan_resource_conf (cognitive 19) · ×1
  • VMScaleSetsAutoOSImagePatchingEnabled.scan_resource_conf (cognitive 19) checkov/arm/checks/resource/VMScaleSetsAutoOSImagePatchingEnabled.py:18 — VMScaleSetsAutoOSImagePatchingEnabled.scan_resource_conf has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Registry.register (cognitive 19) · ×1
  • Registry.register (cognitive 19) checkov/bicep/checks/resource/base_registry.py:25 — Registry.register has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 2 (5 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ECSTaskDefinitionEFSVolumeEncryption.scan_resource_conf (cognitive 19) · ×1
  • ECSTaskDefinitionEFSVolumeEncryption.scan_resource_conf (cognitive 19) checkov/cloudformation/checks/resource/aws/ECSTaskDefinitionEFSVolumeEncryption.py:17 — ECSTaskDefinitionEFSVolumeEncryption.scan_resource_conf has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · CloudformationVariableRenderer._evaluate_if_connection (cognitive 19) · ×1
  • CloudformationVariableRenderer._evaluate_if_connection (cognitive 19) checkov/cloudformation/graph_builder/variable_rendering/renderer.py:346 — CloudformationVariableRenderer._evaluate_if_connection has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 2, ternaries 1 (2 pts), error handling 1 (nesting depth added 9). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · NodeConstructor.construct_yaml_seq (cognitive 19) · ×1
  • NodeConstructor.construct_yaml_seq (cognitive 19) checkov/cloudformation/parser/cfn_yaml.py:158 — NodeConstructor.construct_yaml_seq has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 1 (4 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Report.handle_skipped_checks (cognitive 19) · ×1
  • Report.handle_skipped_checks (cognitive 19) checkov/common/output/report.py:576 — Report.handle_skipped_checks has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · data_structures_utils.search_deep_keys (cognitive 19) · ×1
  • data_structures_utils.search_deep_keys (cognitive 19) REDACTED:39 — data_structures_utils.search_deep_keys has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (8 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ExtArgumentParser.write_config_file (cognitive 19) · ×1
  • ExtArgumentParser.write_config_file (cognitive 19) checkov/common/util/ext_argument_parser.py:77 — ExtArgumentParser.write_config_file has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (5 pts), error handling 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Runner.get_binary_output (cognitive 19) · ×1
  • Runner.get_binary_output (cognitive 19) checkov/helm/runner.py:363 — Runner.get_binary_output has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (15 pts), error handling 2, loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · BaseK8sContainerCheck.scan_spec_conf (cognitive 19) · ×1
  • BaseK8sContainerCheck.scan_spec_conf (cognitive 19) checkov/kubernetes/checks/resource/base_container_check.py:54 — BaseK8sContainerCheck.scan_spec_conf has cognitive complexity 19 (threshold 15). Drivers by points: error handling 4 (8 pts), boolean chains 4, if/else 4, ternaries 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ImagePullPolicyAlways.scan_container_conf (cognitive 19) · ×1
  • ImagePullPolicyAlways.scan_container_conf (cognitive 19) checkov/kubernetes/checks/resource/k8s/ImagePullPolicyAlways.py:23 — ImagePullPolicyAlways.scan_container_conf has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KubernetesLocalGraph._extract_nested_resources_recursive (cognitive 19) · ×1
  • KubernetesLocalGraph._extract_nested_resources_recursive (cognitive 19) checkov/kubernetes/graph_builder/local_graph.py:145 — KubernetesLocalGraph._extract_nested_resources_recursive has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Oauth2SecurityRequirement.scan_openapi_conf (cognitive 19) · ×1
  • Oauth2SecurityRequirement.scan_openapi_conf (cognitive 19) checkov/openapi/checks/resource/v2/Oauth2SecurityRequirement.py:23 — Oauth2SecurityRequirement.scan_openapi_conf has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SecurityRequirement.scan_openapi_conf (cognitive 19) · ×1
  • SecurityRequirement.scan_openapi_conf (cognitive 19) checkov/openapi/checks/resource/v2/SecurityRequirement.py:23 — SecurityRequirement.scan_openapi_conf has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · prisma_engine.get_reachability_data (cognitive 19) · ×1
  • prisma_engine.get_reachability_data (cognitive 19) checkov/sast/engines/prisma_engine.py:552 — prisma_engine.get_reachability_data has cognitive complexity 19 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 4 (9 pts) (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · load_detectors.get_runnable_plugins (cognitive 19) · ×1
  • load_detectors.get_runnable_plugins (cognitive 19) checkov/secrets/plugins/load_detectors.py:109 — load_detectors.get_runnable_plugins has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (14 pts), error handling 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Runner.verify_secrets (cognitive 19) · ×1
  • Runner.verify_secrets (cognitive 19) checkov/secrets/runner.py:792 — Runner.verify_secrets has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (15 pts), loops 2, boolean chains 1, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Runner.mask_files (cognitive 19) · ×1
  • Runner.mask_files (cognitive 19) checkov/secrets/runner.py:910 — Runner.mask_files has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ContextParser.enrich_function_with_provider (cognitive 19) · ×1
  • ContextParser.enrich_function_with_provider (cognitive 19) checkov/serverless/parsers/context_parser.py:61 — ContextParser.enrich_function_with_provider has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SecretManagerSecret90days.scan_resource_conf (cognitive 19) · ×1
  • SecretManagerSecret90days.scan_resource_conf (cognitive 19) checkov/terraform/checks/resource/aws/SecretManagerSecret90days.py:32 — SecretManagerSecret90days.scan_resource_conf has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 4, ternaries 1 (4 pts) (nesting depth added 9). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · AppServiceDotnetFrameworkVersion.scan_resource_conf (cognitive 19) · ×1
  • AppServiceDotnetFrameworkVersion.scan_resource_conf (cognitive 19) checkov/terraform/checks/resource/azure/AppServiceDotnetFrameworkVersion.py:14 — AppServiceDotnetFrameworkVersion.scan_resource_conf has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 4 (nesting depth added 9). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · GithubActionsOIDCTrustPolicy.scan_resource_conf (cognitive 19) · ×1
  • GithubActionsOIDCTrustPolicy.scan_resource_conf (cognitive 19) checkov/terraform/checks/resource/gcp/GithubActionsOIDCTrustPolicy.py:28 — GithubActionsOIDCTrustPolicy.scan_resource_conf has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 4, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · LivenessProbe.scan_resource_conf (cognitive 19) · ×1
  • LivenessProbe.scan_resource_conf (cognitive 19) checkov/terraform/checks/resource/kubernetes/LivenessProbe.py:21 — LivenessProbe.scan_resource_conf has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PrivilegedContainers.scan_resource_conf (cognitive 19) · ×1
  • PrivilegedContainers.scan_resource_conf (cognitive 19) checkov/terraform/checks/resource/kubernetes/PrivilegedContainer.py:18 — PrivilegedContainers.scan_resource_conf has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPCSecurityGroupRuleSet.scan_resource_conf (cognitive 19) · ×1
  • VPCSecurityGroupRuleSet.scan_resource_conf (cognitive 19) checkov/terraform/checks/resource/tencentcloud/VPCSecurityGroupRuleSet.py:16 — VPCSecurityGroupRuleSet.scan_resource_conf has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TerraformBlock._collect_dynamic_dependent_keys (cognitive 19) · ×1
  • TerraformBlock._collect_dynamic_dependent_keys (cognitive 19) checkov/terraform/graph_builder/graph_components/blocks.py:162 — TerraformBlock._collect_dynamic_dependent_keys has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Module._add_resource (cognitive 19) · ×1
  • Module._add_resource (cognitive 19) checkov/terraform/graph_builder/graph_components/module.py:196 — Module._add_resource has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 3 (6 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Runner.run (cognitive 19) · ×1
  • Runner.run (cognitive 19) checkov/terraform/plan_runner.py:102 — Runner.run has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dangerfile.failIfLoggingLineContainsSensitiveData · ×1
  • dangerfile.failIfLoggingLineContainsSensitiveData::processFile (cognitive 19) dangerfile.ts:56 — dangerfile.failIfLoggingLineContainsSensitiveData::processFile has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (5 pts), boolean chains 2, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CosmosDBAccountsRestrictedAccess.scan_resource_conf (cognitive 18) · ×1
  • CosmosDBAccountsRestrictedAccess.scan_resource_conf (cognitive 18) checkov/arm/checks/resource/CosmosDBAccountsRestrictedAccess.py:15 — CosmosDBAccountsRestrictedAccess.scan_resource_conf has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (14 pts), boolean chains 4 (nesting depth added 9). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · BicepLocalGraph._create_edges (cognitive 18) · ×1
  • BicepLocalGraph._create_edges (cognitive 18) checkov/bicep/graph_builder/local_graph.py:218 — BicepLocalGraph._create_edges has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 3 (7 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EC2Credentials.scan_resource_conf (cognitive 18) · ×1
  • EC2Credentials.scan_resource_conf (cognitive 18) checkov/cloudformation/checks/resource/aws/EC2Credentials.py:17 — EC2Credentials.scan_resource_conf has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 1 (5 pts), error handling 1 (3 pts) (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · LambdaServicePermission.scan_resource_conf (cognitive 18) · ×1
  • LambdaServicePermission.scan_resource_conf (cognitive 18) checkov/cloudformation/checks/resource/aws/LambdaServicePermission.py:17 — LambdaServicePermission.scan_resource_conf has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 4, error handling 1 (3 pts) (nesting depth added 8). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · CloudformationBlock.update_attribute (cognitive 18) · ×1
  • CloudformationBlock.update_attribute (cognitive 18) checkov/cloudformation/graph_builder/graph_components/blocks.py:36 — CloudformationBlock.update_attribute has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PolicyMetadataIntegration._handle_customer_run_config (cognitive 18) · ×1
  • PolicyMetadataIntegration._handle_customer_run_config (cognitive 18) checkov/common/bridgecrew/integration_features/features/policy_metadata_integration.py:146 — PolicyMetadataIntegration._handle_customer_run_config has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BcPlatformIntegration.persist_sast_scan_results (cognitive 18) · ×1
  • BcPlatformIntegration.persist_sast_scan_results (cognitive 18) checkov/common/bridgecrew/platform_integration.py:701 — BcPlatformIntegration.persist_sast_scan_results has cognitive complexity 18 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 4 (7 pts), boolean chains 1 (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · BaseAttributeSolver.get_attribute_matches (cognitive 18) · ×1
  • BaseAttributeSolver.get_attribute_matches (cognitive 18) checkov/common/checks_infra/solvers/attribute_solvers/base_attribute_solver.py:173 — BaseAttributeSolver.get_attribute_matches has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (4 pts), boolean chains 1, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BaseComplexSolver.run (cognitive 18) · ×1
  • BaseComplexSolver.run (cognitive 18) checkov/common/checks_infra/solvers/complex_solvers/base_complex_solver.py:35 — BaseComplexSolver.run has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GitLabSast._create_vulnerabilities (cognitive 18) · ×1
  • GitLabSast._create_vulnerabilities (cognitive 18) checkov/common/output/gitlab_sast.py:60 — GitLabSast._create_vulnerabilities has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (7 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · output.add_to_reports_dependency_tree_cves (cognitive 18) · ×1
  • output.add_to_reports_dependency_tree_cves (cognitive 18) checkov/common/sca/output.py:421 — output.add_to_reports_dependency_tree_cves has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 4 (8 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · parser_utils.is_acceptable_module_param (cognitive 18) · ×1
  • parser_utils.is_acceptable_module_param (cognitive 18) checkov/common/util/parser_utils.py:59 — parser_utils.is_acceptable_module_param has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ApiServerAuthorizationModeNode.scan_container_conf (cognitive 18) · ×1
  • ApiServerAuthorizationModeNode.scan_container_conf (cognitive 18) checkov/kubernetes/checks/resource/k8s/ApiServerAuthorizationModeNode.py:13 — ApiServerAuthorizationModeNode.scan_container_conf has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 1 (3 pts), ternaries 1 (3 pts) (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ApiServerAuthorizationModeRBAC.scan_container_conf (cognitive 18) · ×1
  • ApiServerAuthorizationModeRBAC.scan_container_conf (cognitive 18) checkov/kubernetes/checks/resource/k8s/ApiServerAuthorizationModeRBAC.py:13 — ApiServerAuthorizationModeRBAC.scan_container_conf has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 1 (3 pts), ternaries 1 (3 pts) (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · PathSchemeDefineHTTP.scan_openapi_conf (cognitive 18) · ×1
  • PathSchemeDefineHTTP.scan_openapi_conf (cognitive 18) checkov/openapi/checks/resource/v2/PathSchemeDefineHTTP.py:20 — PathSchemeDefineHTTP.scan_openapi_conf has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PrismaEngine._update_cdk_report (cognitive 18) · ×1
  • PrismaEngine._update_cdk_report (cognitive 18) checkov/sast/engines/prisma_engine.py:437 — PrismaEngine._update_cdk_report has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (7 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · output.create_cli_license_violations_table (cognitive 18) · ×1
  • output.create_cli_license_violations_table (cognitive 18) checkov/sca_package_2/output.py:218 — output.create_cli_license_violations_table has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (5 pts), boolean chains 1, ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Runner.find_scannable_files (cognitive 18) · ×1
  • Runner.find_scannable_files (cognitive 18) checkov/sca_package_2/runner.py:203 — Runner.find_scannable_files has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 5, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · detector_utils.remove_fp_secrets_in_keys (cognitive 18) · ×1
  • detector_utils.remove_fp_secrets_in_keys (cognitive 18) checkov/secrets/plugins/detector_utils.py:185 — detector_utils.remove_fp_secrets_in_keys has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 4, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ALBListenerHTTPS.scan_resource_conf (cognitive 18) · ×1
  • ALBListenerHTTPS.scan_resource_conf (cognitive 18) checkov/terraform/checks/resource/aws/ALBListenerHTTPS.py:14 — ALBListenerHTTPS.scan_resource_conf has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (17 pts), boolean chains 1 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ElasticsearchDomainAuditLogging.scan_resource_conf (cognitive 18) · ×1
  • ElasticsearchDomainAuditLogging.scan_resource_conf (cognitive 18) checkov/terraform/checks/resource/aws/ElasticsearchDomainAuditLogging.py:17 — ElasticsearchDomainAuditLogging.scan_resource_conf has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (13 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · GlueSecurityConfiguration.scan_resource_conf (cognitive 18) · ×1
  • GlueSecurityConfiguration.scan_resource_conf (cognitive 18) checkov/terraform/checks/resource/aws/GlueSecurityConfiguration.py:13 — GlueSecurityConfiguration.scan_resource_conf has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 4 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · FirewallIngressOpen.scan_resource_conf (cognitive 18) · ×1
  • FirewallIngressOpen.scan_resource_conf (cognitive 18) checkov/terraform/checks/resource/digitalocean/FirewallIngressOpen.py:16 — FirewallIngressOpen.scan_resource_conf has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (6 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ReadinessProbe.scan_resource_conf (cognitive 18) · ×1
  • ReadinessProbe.scan_resource_conf (cognitive 18) checkov/terraform/checks/resource/kubernetes/ReadinessProbe.py:23 — ReadinessProbe.scan_resource_conf has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SecurityListIngressStateless.scan_resource_conf (cognitive 18) · ×1
  • SecurityListIngressStateless.scan_resource_conf (cognitive 18) checkov/terraform/checks/resource/oci/SecurityListIngressStateless.py:13 — SecurityListIngressStateless.scan_resource_conf has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), ternaries 1 (5 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · evaluate_terraform.find_conditional_expression_groups (cognitive 18) · ×1
  • evaluate_terraform.find_conditional_expression_groups (cognitive 18) checkov/terraform/graph_builder/variable_rendering/evaluate_terraform.py:580 — evaluate_terraform.find_conditional_expression_groups has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 3, loops 1, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · Runner.resolve_image_name (cognitive 18) · ×1
  • Runner.resolve_image_name (cognitive 18) checkov/yaml_doc/runner.py:109 — Runner.resolve_image_name has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 1 (4 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · SQLServerAuditingEnabled.scan_resource_conf (cognitive 17) · ×1
  • SQLServerAuditingEnabled.scan_resource_conf (cognitive 17) checkov/arm/checks/resource/SQLServerAuditingEnabled.py:24 — SQLServerAuditingEnabled.scan_resource_conf has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (13 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · SQLServerEmailAlertsEnabled.scan_resource_conf (cognitive 17) · ×1
  • SQLServerEmailAlertsEnabled.scan_resource_conf (cognitive 17) checkov/arm/checks/resource/SQLServerEmailAlertsEnabled.py:19 — SQLServerEmailAlertsEnabled.scan_resource_conf has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (14 pts), boolean chains 2, loops 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · SQLServerEmailAlertsToAdminsEnabled.scan_resource_conf (cognitive 17) · ×1
  • SQLServerEmailAlertsToAdminsEnabled.scan_resource_conf (cognitive 17) checkov/arm/checks/resource/SQLServerEmailAlertsToAdminsEnabled.py:19 — SQLServerEmailAlertsToAdminsEnabled.scan_resource_conf has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (14 pts), boolean chains 2, loops 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · SQLServerNoPublicAccess.scan_resource_conf (cognitive 17) · ×1
  • SQLServerNoPublicAccess.scan_resource_conf (cognitive 17) checkov/arm/checks/resource/SQLServerNoPublicAccess.py:21 — SQLServerNoPublicAccess.scan_resource_conf has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (13 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · VnetSingleDNSServer.scan_resource_conf (cognitive 17) · ×1
  • VnetSingleDNSServer.scan_resource_conf (cognitive 17) checkov/arm/checks/resource/VnetSingleDNSServer.py:18 — VnetSingleDNSServer.scan_resource_conf has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 6 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Registry._scan_array (cognitive 17) · ×1
  • Registry._scan_array (cognitive 17) checkov/common/checks/object_registry.py:23 — Registry._scan_array has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ConnectionExistsSolver.get_networkx_operation (cognitive 17) · ×1
  • ConnectionExistsSolver.get_networkx_operation (cognitive 17) checkov/common/checks_infra/solvers/connections_solvers/connection_exists_solver.py:89 — ConnectionExistsSolver.get_networkx_operation has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), error handling 1 (3 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Report._create_test_case_failure_output (cognitive 17) · ×1
  • Report._create_test_case_failure_output (cognitive 17) checkov/common/output/report.py:470 — Report._create_test_case_failure_output has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (17 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RunnerRegistry._merge_reports (cognitive 17) · ×1
  • RunnerRegistry._merge_reports (cognitive 17) checkov/common/runners/runner_registry.py:235 — RunnerRegistry._merge_reports has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · http_utils.aiohttp_client_session_wrapper (cognitive 17) · ×1
  • http_utils.aiohttp_client_session_wrapper (cognitive 17) checkov/common/util/http_utils.py:279 — http_utils.aiohttp_client_session_wrapper has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), error handling 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WildcardRoles.scan_spec_conf (cognitive 17) · ×1
  • WildcardRoles.scan_spec_conf (cognitive 17) checkov/kubernetes/checks/resource/k8s/WildcardRoles.py:18 — WildcardRoles.scan_spec_conf has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LabelSelectorEdgeBuilder.find_connections (cognitive 17) · ×1
  • LabelSelectorEdgeBuilder.find_connections (cognitive 17) checkov/kubernetes/graph_builder/graph_components/edge_builders/LabelSelectorEdgeBuilder.py:18 — LabelSelectorEdgeBuilder.find_connections has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KubernetesLocalGraph._create_edges (cognitive 17) · ×1
  • KubernetesLocalGraph._create_edges (cognitive 17) checkov/kubernetes/graph_builder/local_graph.py:88 — KubernetesLocalGraph._create_edges has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 3 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Policy3dRunner.create_record (cognitive 17) · ×1
  • Policy3dRunner.create_record (cognitive 17) checkov/policies_3d/runner.py:100 — Policy3dRunner.create_record has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 5, loops 2, error handling 1, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PrismaEngine.setup_sast_artifact (cognitive 17) · ×1
  • PrismaEngine.setup_sast_artifact (cognitive 17) checkov/sast/engines/prisma_engine.py:116 — PrismaEngine.setup_sast_artifact has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · definition_context.build_definitions_context (cognitive 17) · ×1
  • definition_context.build_definitions_context (cognitive 17) checkov/serverless/graph_builder/definition_context.py:11 — definition_context.build_definitions_context has cognitive complexity 17 (threshold 15). Drivers by points: loops 4 (11 pts), if/else 2 (6 pts) (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · GooglePolicyIsPrivate.scan_data_conf (cognitive 17) · ×1
  • GooglePolicyIsPrivate.scan_data_conf (cognitive 17) checkov/terraform/checks/data/gcp/GooglePolicyIsPrivate.py:19 — GooglePolicyIsPrivate.scan_data_conf has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 2 (6 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CloudfrontDistributionEncryption.scan_resource_conf (cognitive 17) · ×1
  • CloudfrontDistributionEncryption.scan_resource_conf (cognitive 17) checkov/terraform/checks/resource/aws/CloudfrontDistributionEncryption.py:13 — CloudfrontDistributionEncryption.scan_resource_conf has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ElasticsearchNodeToNodeEncryption.scan_resource_conf (cognitive 17) · ×1
  • ElasticsearchNodeToNodeEncryption.scan_resource_conf (cognitive 17) checkov/terraform/checks/resource/aws/ElasticsearchNodeToNodeEncryption.py:13 — ElasticsearchNodeToNodeEncryption.scan_resource_conf has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MonitorLogProfileRetentionDays.scan_resource_conf (cognitive 17) · ×1
  • MonitorLogProfileRetentionDays.scan_resource_conf (cognitive 17) checkov/terraform/checks/resource/azure/MonitorLogProfileRetentionDays.py:14 — MonitorLogProfileRetentionDays.scan_resource_conf has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NSGRulePortAccessRestricted.scan_resource_conf (cognitive 17) · ×1
  • NSGRulePortAccessRestricted.scan_resource_conf (cognitive 17) checkov/terraform/checks/resource/azure/NSGRulePortAccessRestricted.py:30 — NSGRulePortAccessRestricted.scan_resource_conf has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 3 (5 pts), ternaries 1 (3 pts), loops 1 (nesting depth added 4). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · AbsSecurityListUnrestrictedIngress.scan_resource_conf (cognitive 17) · ×1
  • AbsSecurityListUnrestrictedIngress.scan_resource_conf (cognitive 17) checkov/terraform/checks/resource/oci/AbsSecurityListUnrestrictedIngress.py:15 — AbsSecurityListUnrestrictedIngress.scan_resource_conf has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 2 (5 pts), boolean chains 3, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ForeachModuleHandler._render_foreach_modules_by_levels (cognitive 17) · ×1
  • ForeachModuleHandler._render_foreach_modules_by_levels (cognitive 17) checkov/terraform/graph_builder/foreach/module_handler.py:41 — ForeachModuleHandler._render_foreach_modules_by_levels has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (14 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ForeachModuleHandler._update_resolved_entry_for_tf_definition (cognitive 17) · ×1
  • ForeachModuleHandler._update_resolved_entry_for_tf_definition (cognitive 17) checkov/terraform/graph_builder/foreach/module_handler.py:294 — ForeachModuleHandler._update_resolved_entry_for_tf_definition has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 1 (4 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TerraformLocalGraph.update_vertex_config (cognitive 17) · ×1
  • TerraformLocalGraph.update_vertex_config (cognitive 17) checkov/terraform/graph_builder/local_graph.py:729 — TerraformLocalGraph.update_vertex_config has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils.add_vertices_references_from_word (cognitive 17) · ×1
  • utils.add_vertices_references_from_word (cognitive 17) checkov/terraform/graph_builder/utils.py:103 — utils.add_vertices_references_from_word has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · evaluate_terraform.handle_for_loop (cognitive 17) · ×1
  • evaluate_terraform.handle_for_loop (cognitive 17) checkov/terraform/graph_builder/variable_rendering/evaluate_terraform.py:301 — evaluate_terraform.handle_for_loop has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TerraformVariableRenderer.find_path_from_referenced_vertices (cognitive 17) · ×1
  • TerraformVariableRenderer.find_path_from_referenced_vertices (cognitive 17) checkov/terraform/graph_builder/variable_rendering/renderer.py:231 — TerraformVariableRenderer.find_path_from_referenced_vertices has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 3 (7 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plan_parser._prepare_resource_block (cognitive 17) · ×1
  • plan_parser._prepare_resource_block (cognitive 17) checkov/terraform/plan_parser.py:178 — plan_parser._prepare_resource_block has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 3 (6 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plan_parser._get_resource_changes (cognitive 17) · ×1
  • plan_parser._get_resource_changes (cognitive 17) checkov/terraform/plan_parser.py:454 — plan_parser._get_resource_changes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plan_parser._add_references (cognitive 17) · ×1
  • plan_parser._add_references (cognitive 17) checkov/terraform/plan_parser.py:480 — plan_parser._add_references has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 3, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Runner._assign_correct_graph_to_registry (cognitive 17) · ×1
  • Runner._assign_correct_graph_to_registry (cognitive 17) checkov/terraform/runner.py:462 — Runner._assign_correct_graph_to_registry has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AzureScaleSetPassword.scan_resource_conf (cognitive 16) · ×1
  • AzureScaleSetPassword.scan_resource_conf (cognitive 16) checkov/arm/checks/resource/AzureScaleSetPassword.py:15 — AzureScaleSetPassword.scan_resource_conf has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (15 pts), boolean chains 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · AzureServiceFabricClusterProtectionLevel.scan_resource_conf (cognitive 16) · ×1
  • AzureServiceFabricClusterProtectionLevel.scan_resource_conf (cognitive 16) checkov/arm/checks/resource/AzureServiceFabricClusterProtectionLevel.py:15 — AzureServiceFabricClusterProtectionLevel.scan_resource_conf has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KeyVaultDisablesPublicNetworkAccess.scan_resource_conf (cognitive 16) · ×1
  • KeyVaultDisablesPublicNetworkAccess.scan_resource_conf (cognitive 16) checkov/arm/checks/resource/KeyVaultDisablesPublicNetworkAccess.py:20 — KeyVaultDisablesPublicNetworkAccess.scan_resource_conf has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 4, ternaries 1 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StorageAccountDefaultNetworkAccessDeny.scan_resource_conf (cognitive 16) · ×1
  • StorageAccountDefaultNetworkAccessDeny.scan_resource_conf (cognitive 16) checkov/arm/checks/resource/StorageAccountDefaultNetworkAccessDeny.py:22 — StorageAccountDefaultNetworkAccessDeny.scan_resource_conf has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (16 pts) (nesting depth added 9). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · cfn_utils.get_files_definitions (cognitive 16) · ×1
  • cfn_utils.get_files_definitions (cognitive 16) checkov/cloudformation/cfn_utils.py:197 — cfn_utils.get_files_definitions has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 1 (2 pts), ternaries 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IAMStarActionPolicyDocument.check_policy (cognitive 16) · ×1
  • IAMStarActionPolicyDocument.check_policy (cognitive 16) checkov/cloudformation/checks/resource/aws/IAMStarActionPolicyDocument.py:47 — IAMStarActionPolicyDocument.check_policy has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MSKClusterLogging.scan_resource_conf (cognitive 16) · ×1
  • MSKClusterLogging.scan_resource_conf (cognitive 16) checkov/cloudformation/checks/resource/aws/MSKClusterLogging.py:13 — MSKClusterLogging.scan_resource_conf has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 1 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · CloudformationVariableRenderer._evaluate_condition (cognitive 16) · ×1
  • CloudformationVariableRenderer._evaluate_condition (cognitive 16) checkov/cloudformation/graph_builder/variable_rendering/renderer.py:212 — CloudformationVariableRenderer._evaluate_condition has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 7 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CloudformationVariableRenderer._handle_edge_list_evaluation_functions (cognitive 16) · ×1
  • CloudformationVariableRenderer._handle_edge_list_evaluation_functions (cognitive 16) checkov/cloudformation/graph_builder/variable_rendering/renderer.py:442 — CloudformationVariableRenderer._handle_edge_list_evaluation_functions has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 2 (5 pts), error handling 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BcPlatformIntegration.persist_git_configuration (cognitive 16) · ×1
  • BcPlatformIntegration.persist_git_configuration (cognitive 16) checkov/common/bridgecrew/platform_integration.py:617 — BcPlatformIntegration.persist_git_configuration has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GenericResourceEncryptionBase.is_encrypted (cognitive 16) · ×1
  • GenericResourceEncryptionBase.is_encrypted (cognitive 16) checkov/common/graph/graph_builder/graph_components/generic_resource_encryption_base.py:28 — GenericResourceEncryptionBase.is_encrypted has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 3, ternaries 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Baseline.compare_and_reduce_reports (cognitive 16) · ×1
  • Baseline.compare_and_reduce_reports (cognitive 16) checkov/common/output/baseline.py:67 — Baseline.compare_and_reduce_reports has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Report.print_failed_github_md (cognitive 16) · ×1
  • Report.print_failed_github_md (cognitive 16) checkov/common/output/report.py:360 — Report.print_failed_github_md has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SPDX.add_packages_to_doc (cognitive 16) · ×1
  • SPDX.add_packages_to_doc (cognitive 16) checkov/common/output/spdx.py:106 — SPDX.add_packages_to_doc has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), loops 4 (7 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RunnerRegistry.get_enriched_resources (cognitive 16) · ×1
  • RunnerRegistry.get_enriched_resources (cognitive 16) checkov/common/runners/runner_registry.py:732 — RunnerRegistry.get_enriched_resources has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (12 pts), if/else 1 (4 pts) (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · Prompt.prompt (cognitive 16) · ×1
  • Prompt.prompt (cognitive 16) checkov/common/util/prompt.py:145 — Prompt.prompt has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · K8sHelmRunner.run (cognitive 16) · ×1
  • K8sHelmRunner.run (cognitive 16) checkov/helm/runner.py:131 — K8sHelmRunner.run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 1 (2 pts), boolean chains 1, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ControllerManagerBindAddress.scan_container_conf (cognitive 16) · ×1
  • ControllerManagerBindAddress.scan_container_conf (cognitive 16) checkov/kubernetes/checks/resource/k8s/ControllerManagerBindAddress.py:13 — ControllerManagerBindAddress.scan_container_conf has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · DefaultServiceAccount.scan_spec_conf (cognitive 16) · ×1
  • DefaultServiceAccount.scan_spec_conf (cognitive 16) checkov/kubernetes/checks/resource/k8s/DefaultServiceAccount.py:19 — DefaultServiceAccount.scan_spec_conf has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (16 pts) (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · KubeControllerManagerRootCAFile.scan_container_conf (cognitive 16) · ×1
  • KubeControllerManagerRootCAFile.scan_container_conf (cognitive 16) checkov/kubernetes/checks/resource/k8s/KubeControllerManagerRootCAFile.py:13 — KubeControllerManagerRootCAFile.scan_container_conf has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 1 (3 pts) (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · KubeControllerManagerServiceAccountPrivateKeyFile.scan_container_conf (cognitive 16) · ×1
  • KubeControllerManagerServiceAccountPrivateKeyFile.scan_container_conf (cognitive 16) checkov/kubernetes/checks/resource/k8s/KubeControllerManagerServiceAccountPrivateKeyFile.py:13 — KubeControllerManagerServiceAccountPrivateKeyFile.scan_container_conf has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 1 (3 pts) (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · KubernetesDashboard.scan_container_conf (cognitive 16) · ×1
  • KubernetesDashboard.scan_container_conf (cognitive 16) checkov/kubernetes/checks/resource/k8s/KubernetesDashboard.py:14 — KubernetesDashboard.scan_container_conf has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MinimizeCapabilities.scan_container_conf (cognitive 16) · ×1
  • MinimizeCapabilities.scan_container_conf (cognitive 16) checkov/kubernetes/checks/resource/k8s/MinimizeCapabilities.py:15 — MinimizeCapabilities.scan_container_conf has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 1 (4 pts) (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · NginxIngressCVE202125742Lua.scan_spec_conf (cognitive 16) · ×1
  • NginxIngressCVE202125742Lua.scan_spec_conf (cognitive 16) checkov/kubernetes/checks/resource/k8s/NginxIngressCVE202125742Lua.py:19 — NginxIngressCVE202125742Lua.scan_spec_conf has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 2 (7 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SchedulerBindAddress.scan_container_conf (cognitive 16) · ×1
  • SchedulerBindAddress.scan_container_conf (cognitive 16) checkov/kubernetes/checks/resource/k8s/SchedulerBindAddress.py:13 — SchedulerBindAddress.scan_container_conf has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Secrets.scan_container_conf (cognitive 16) · ×1
  • Secrets.scan_container_conf (cognitive 16) checkov/kubernetes/checks/resource/k8s/Secrets.py:15 — Secrets.scan_container_conf has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Runner._get_parsed_output (cognitive 16) · ×1
  • Runner._get_parsed_output (cognitive 16) checkov/kustomize/runner.py:572 — Runner._get_parsed_output has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Policy3dRunner.run_v2 (cognitive 16) · ×1
  • Policy3dRunner.run_v2 (cognitive 16) checkov/policies_3d/runner.py:50 — Policy3dRunner.run_v2 has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RunnerFilter.get_sast_languages (cognitive 16) · ×1
  • RunnerFilter.get_sast_languages (cognitive 16) checkov/runner_filter.py:403 — RunnerFilter.get_sast_languages has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 2 (4 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ELBwListenerNotTLSSSL.scan_resource_conf (cognitive 16) · ×1
  • ELBwListenerNotTLSSSL.scan_resource_conf (cognitive 16) checkov/terraform/checks/resource/aws/ELBwListenerNotTLSSSL.py:17 — ELBwListenerNotTLSSSL.scan_resource_conf has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (12 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppServiceAuthentication.scan_resource_conf (cognitive 16) · ×1
  • AppServiceAuthentication.scan_resource_conf (cognitive 16) checkov/terraform/checks/resource/azure/AppServiceAuthentication.py:16 — AppServiceAuthentication.scan_resource_conf has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ContainerSecurityContext.scan_resource_conf (cognitive 16) · ×1
  • ContainerSecurityContext.scan_resource_conf (cognitive 16) checkov/terraform/checks/resource/kubernetes/ContainerSecurityContext.py:19 — ContainerSecurityContext.scan_resource_conf has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DefaultServiceAccount.scan_resource_conf (cognitive 16) · ×1
  • DefaultServiceAccount.scan_resource_conf (cognitive 16) checkov/terraform/checks/resource/kubernetes/DefaultServiceAccount.py:19 — DefaultServiceAccount.scan_resource_conf has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (16 pts) (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · NACLInboundCheck.scan_resource_conf (cognitive 16) · ×1
  • NACLInboundCheck.scan_resource_conf (cognitive 16) checkov/terraform/checks/resource/ncp/NACLInboundCheck.py:14 — NACLInboundCheck.scan_resource_conf has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (14 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · plan_utils.build_definitions_context (cognitive 16) · ×1
  • plan_utils.build_definitions_context (cognitive 16) checkov/terraform/plan_utils.py:63 — plan_utils.build_definitions_context has cognitive complexity 16 (threshold 15). Drivers by points: loops 3 (6 pts), error handling 1 (5 pts), if/else 2 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member family (5 members, 18 shared lines) · ×1
  • Near-duplicate member family (5 members, 18 shared lines) checkov/terraform/checks/resource/kubernetes/AllowedCapabilities.py:21 — checkov/terraform/checks/resource/kubernetes/AllowedCapabilities.py:21-51 | checkov/terraform/checks/resource/kubernetes/CPULimits.py:19-53 | checkov/terraform/checks/resource/kubernetes/CPURequests.py:15-49 | checkov/terraform/checks/resource/kubernetes/MemoryRequests.py:15-49 | checkov/terraform/checks/resource/kubernetes/MinimiseCapabilities.py:18-51 — These 5 members are variants of one another: a block of 18 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Near-duplicate member family (4 members, 26 shared lines) · ×1
  • Near-duplicate member family (4 members, 26 shared lines) checkov/terraform/checks/resource/kubernetes/CPULimits.py:19 — checkov/terraform/checks/resource/kubernetes/CPULimits.py:19-53 | checkov/terraform/checks/resource/kubernetes/CPURequests.py:15-49 | checkov/terraform/checks/resource/kubernetes/MemoryLimits.py:15-50 | checkov/terraform/checks/resource/kubernetes/MemoryRequests.py:15-49 — These 4 members are variants of one another: a block of 26 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member family (3 members, 19 shared lines) · ×1
  • Near-duplicate member family (3 members, 19 shared lines) checkov/terraform/checks/resource/kubernetes/AllowedCapabilitiesSysAdmin.py:19 — checkov/terraform/checks/resource/kubernetes/AllowedCapabilitiesSysAdmin.py:19-48 | checkov/terraform/checks/resource/kubernetes/ContainerSecurityContext.py:20-42 | checkov/terraform/checks/resource/kubernetes/MinimiseCapabilities.py:18-51 — These 3 members are variants of one another: a block of 19 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times.
D4 · Code Duplication · Members sharing a duplicated core (11 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (11 members, 50+ identical tokens) checkov/terraform/checks/resource/gcp/AbsGooglePostgresqlDatabaseFlags.py:12 — checkov/terraform/checks/resource/gcp/AbsGooglePostgresqlDatabaseFlags.py:12-37 | checkov/terraform/checks/resource/gcp/GoogleCloudMySqlLocalInfileOff.py:14-46 | checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogCheckpoints.py:18-44 | checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogConnection.py:14-41 | checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogDisconnection.py:14-47 | checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogLockWaits.py:14-47 | checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogMinDuration.py:14-48 | checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogMinMessage.py:14-49 | checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogTemp.py:14-47 | checkov/terraform/checks/resource/gcp/GoogleCloudSqlServerContainedDBAuthentication.py:14-47 | checkov/terraform/checks/resource/gcp/GoogleCloudSqlServerCrossDBOwnershipChaining.py:14-48 — These 11 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 11 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 11 times.
D4 · Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (8 members, 50+ identical tokens) checkov/kubernetes/checks/resource/k8s/ApiServerAdmissionControlAlwaysAdmit.py:14 — checkov/kubernetes/checks/resource/k8s/ApiServerAdmissionControlAlwaysAdmit.py:14-26 | checkov/kubernetes/checks/resource/k8s/ApiServerAlwaysPullImagesPlugin.py:14-26 | checkov/kubernetes/checks/resource/k8s/ApiServerNamespaceLifecyclePlugin.py:14-25 | checkov/kubernetes/checks/resource/k8s/ApiServerNodeRestrictionPlugin.py:14-25 | checkov/kubernetes/checks/resource/k8s/ApiServerPodSecurityPolicyPlugin.py:14-25 | checkov/kubernetes/checks/resource/k8s/ApiServerSecurityContextDenyPlugin.py:14-26 | checkov/kubernetes/checks/resource/k8s/ApiServerServiceAccountKeyFile.py:17-30 | checkov/kubernetes/checks/resource/k8s/ApiServerServiceAccountPlugin.py:14-25 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
D4 · Code Duplication · Members sharing a duplicated core (7 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (7 members, 50+ identical tokens) checkov/kubernetes/checks/resource/base_root_container_check.py:33 — checkov/kubernetes/checks/resource/base_root_container_check.py:33-44 | checkov/kubernetes/checks/resource/k8s/DockerSocketVolume.py:33-55 | checkov/kubernetes/checks/resource/k8s/PodSecurityContext.py:33-48 | checkov/kubernetes/checks/resource/k8s/ServiceAccountTokens.py:33-51 | checkov/kubernetes/checks/resource/k8s/ShareHostIPC.py:33-50 | checkov/kubernetes/checks/resource/k8s/ShareHostPID.py:33-50 | checkov/kubernetes/checks/resource/k8s/SharedHostNetworkNamespace.py:33-50 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
D4 · Code Duplication · Edited copy of a member (48 corresponding lines) · ×1
  • Edited copy of a member (48 corresponding lines) checkov/serverless/runner.py:192 — checkov/serverless/runner.py:192-241 | checkov/serverless/runner.py:250-297 — These two members are one piece of code written twice and then edited apart: 48 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (51 corresponding lines) · ×1
  • Edited copy of a member (51 corresponding lines) checkov/kubernetes/checks/resource/k8s/RootContainers.py:22 — checkov/kubernetes/checks/resource/k8s/RootContainers.py:22-72 | checkov/kubernetes/checks/resource/k8s/RootContainersHighUID.py:20-74 — These two members are one piece of code written twice and then edited apart: 51 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (38 corresponding lines) · ×1
  • Edited copy of a member (38 corresponding lines) checkov/bicep/runner.py:229 — checkov/bicep/runner.py:229-266 | checkov/terraform_json/runner.py:139-179 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (37 corresponding lines) · ×1
  • Edited copy of a member (37 corresponding lines) checkov/common/bridgecrew/platform_integration.py:1065 — checkov/common/bridgecrew/platform_integration.py:1065-1104 | checkov/common/bridgecrew/platform_integration.py:1107-1143 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 26+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 26+ corresponding lines) checkov/arm/context_parser.py:158 — checkov/arm/context_parser.py:158-183 | checkov/arm/context_parser.py:187-222 | checkov/cloudformation/context_parser.py:151-176 | REDACTED:42-69 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 26 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (28 corresponding lines) · ×1
  • Edited copy of a member (28 corresponding lines) checkov/github_actions/checks/job/CosignArtifacts.py:25 — checkov/github_actions/checks/job/CosignArtifacts.py:25-52 | checkov/github_actions/checks/job/CosignSBOM.py:25-52 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (49 corresponding lines) · ×1
  • Edited copy of a member (49 corresponding lines) checkov/policies_3d/output.py:142 — checkov/policies_3d/output.py:142-190 | checkov/policies_3d/output.py:250-302 — These two members are one piece of code written twice and then edited apart: 49 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 25+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 25+ corresponding lines) checkov/terraform/checks/resource/kubernetes/HostPort.py:25 — checkov/terraform/checks/resource/kubernetes/HostPort.py:25-55 | checkov/terraform/checks/resource/kubernetes/ImageDigest.py:24-48 | checkov/terraform/checks/resource/kubernetes/ImagePullPolicyAlways.py:23-55 | checkov/terraform/checks/resource/kubernetes/ReadinessProbe.py:24-50 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 25 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 19+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 19+ corresponding lines) checkov/terraform/checks/resource/aws/ECSContainerHostProcess.py:20 — checkov/terraform/checks/resource/aws/ECSContainerHostProcess.py:20-38 | checkov/terraform/checks/resource/aws/ECSContainerPrivilege.py:21-39 | checkov/terraform/checks/resource/aws/ECSContainerReadOnlyRoot.py:21-42 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 16+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 16+ corresponding lines) checkov/helm/base_registry.py:31 — checkov/helm/base_registry.py:31-46 | checkov/kubernetes/checks/resource/base_registry.py:30-45 | checkov/serverless/base_registry.py:31-50 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 18+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 18+ corresponding lines) checkov/arm/checks/resource/AppServiceAuthentication.py:20 — checkov/arm/checks/resource/AppServiceAuthentication.py:20-37 | checkov/arm/checks/resource/PostgreSQLServerConnectionThrottlingEnabled.py:20-44 | checkov/arm/checks/resource/PostgreSQLServerLogCheckpointsEnabled.py:21-45 | checkov/arm/checks/resource/PostgreSQLServerLogConnectionsEnabled.py:21-42 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 22+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 22+ corresponding lines) checkov/bicep/image_referencer/base_provider.py:15 — checkov/bicep/image_referencer/base_provider.py:15-38 | checkov/cloudformation/image_referencer/base_provider.py:15-38 | checkov/kubernetes/image_referencer/base_provider.py:16-37 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 30+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 30+ corresponding lines) checkov/common/checks/object_registry.py:141 — checkov/common/checks/object_registry.py:141-170 | checkov/json_doc/base_registry.py:108-137 | checkov/yaml_doc/base_registry.py:204-234 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 30 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (34 corresponding lines) · ×1
  • Edited copy of a member (34 corresponding lines) checkov/github_actions/graph_builder/local_graph.py:104 — checkov/github_actions/graph_builder/local_graph.py:104-141 | checkov/github_actions/graph_builder/local_graph.py:144-177 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 34+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 34+ corresponding lines) checkov/common/checks/object_registry.py:182 — checkov/common/checks/object_registry.py:182-215 | checkov/json_doc/base_registry.py:149-183 | checkov/yaml_doc/base_registry.py:246-284 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 34 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 14+ corresponding lines) checkov/openapi/checks/resource/v2/Oauth2SecurityDefinitionImplicitFlow.py:24 — checkov/openapi/checks/resource/v2/Oauth2SecurityDefinitionImplicitFlow.py:24-37 | checkov/openapi/checks/resource/v2/Oauth2SecurityDefinitionPasswordFlow.py:24-37 | checkov/openapi/checks/resource/v2/SecurityDefinitionBasicAuth.py:24-37 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 17+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 17+ corresponding lines) checkov/bicep/graph_builder/local_graph.py:105 — checkov/bicep/graph_builder/local_graph.py:105-121 | checkov/bicep/graph_builder/local_graph.py:124-140 | checkov/bicep/graph_builder/local_graph.py:200-216 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 11+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 11+ corresponding lines) checkov/terraform/checks/resource/gcp/GKEEnsureIntegrityMonitoring.py:16 — checkov/terraform/checks/resource/gcp/GKEEnsureIntegrityMonitoring.py:16-26 | checkov/terraform/checks/resource/gcp/GKEMetadataServerIsEnabled.py:15-32 | checkov/terraform/checks/resource/gcp/GKESecureBootforShieldedNodes.py:14-26 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 15+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 15+ corresponding lines) checkov/bitbucket/runner.py:30 — checkov/bitbucket/runner.py:30-44 | checkov/github/runner.py:31-45 | checkov/gitlab/runner.py:29-43 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 10+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 10+ corresponding lines) checkov/kubernetes/checks/resource/k8s/ApiServerAuditLog.py:14 — checkov/kubernetes/checks/resource/k8s/ApiServerAuditLog.py:14-23 | checkov/kubernetes/checks/resource/k8s/ApiServerEtcdCertAndKey.py:14-26 | checkov/kubernetes/checks/resource/k8s/ApiServerKubeletClientCertAndKey.py:14-26 | checkov/kubernetes/checks/resource/k8s/EtcdCertAndKey.py:15-29 | checkov/kubernetes/checks/resource/k8s/KubeletKeyFilesSetAppropriate.py:15-27 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (27 corresponding lines) · ×1
  • Edited copy of a member (27 corresponding lines) checkov/terraform/checks/resource/panos/PolicyLoggingEnabled.py:19 — checkov/terraform/checks/resource/panos/PolicyLoggingEnabled.py:19-46 | checkov/terraform/checks/resource/panos/PolicyNoDSRI.py:19-45 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 6+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 6+ corresponding lines) checkov/arm/checks/resource/WinVMAutomaticUpdates.py:7 — checkov/arm/checks/resource/WinVMAutomaticUpdates.py:7-12 | checkov/terraform/checks/resource/alicloud/ActionTrailLogAllRegions.py:8-18 | checkov/terraform/checks/resource/aws/EBSDefaultEncryption.py:7-17 | checkov/terraform/checks/resource/azure/CDNEnableHttpsEndpoints.py:10-26 | checkov/terraform/checks/resource/azure/StorageAccountsTransportEncryption.py:7-17 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 9+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 9+ corresponding lines) checkov/ansible/checks/task/builtin/AptAllowUnauthenticated.py:11 — checkov/ansible/checks/task/builtin/AptAllowUnauthenticated.py:11-19 | checkov/ansible/checks/task/builtin/AptForce.py:11-19 | checkov/ansible/checks/task/builtin/GetUrlValidateCerts.py:9-17 | checkov/ansible/checks/task/builtin/UriValidateCerts.py:9-17 | checkov/ansible/checks/task/builtin/YumSslVerify.py:9-17 | checkov/ansible/checks/task/builtin/YumValidateCerts.py:9-17 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 8+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 8+ corresponding lines) checkov/arm/checks/resource/StorageAccountMinimumTlsVersion.py:11 — checkov/arm/checks/resource/StorageAccountMinimumTlsVersion.py:11-22 | checkov/dockerfile/checks/RunUsingAPT.py:14-21 | checkov/terraform/checks/resource/aws/ElastiCacheHasCustomSubnet.py:10-19 | checkov/terraform/checks/resource/azure/VnetLocalDNS.py:12-20 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 6+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 6+ corresponding lines) checkov/arm/checks/resource/AppServiceJavaVersion.py:8 — checkov/arm/checks/resource/AppServiceJavaVersion.py:8-13 | checkov/arm/checks/resource/AppServicePHPVersion.py:8-13 | checkov/arm/checks/resource/AppServicePythonVersion.py:10-19 | checkov/terraform/checks/resource/azure/AppServiceJavaVersion.py:7-12 | checkov/terraform/checks/resource/azure/AppServicePHPVersion.py:7-12 | checkov/terraform/checks/resource/azure/AppServicePythonVersion.py:7-12 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 5+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 5+ corresponding lines) checkov/cloudformation/checks/resource/aws/SecurityGroupRuleDescription.py:11 — checkov/cloudformation/checks/resource/aws/SecurityGroupRuleDescription.py:11-15 | checkov/terraform/checks/resource/aws/CloudWatchLogGroupRetentionYear.py:12-21 | checkov/terraform/checks/resource/aws/ELBwListenerNotTLSSSL.py:11-15 | checkov/terraform/checks/resource/aws/S3GlobalViewACL.py:11-15 | checkov/terraform/checks/resource/ncp/AccessControlGroupInboundRule.py:12-18 | checkov/terraform/checks/resource/ncp/ServerPublicIP.py:8-12 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 7+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 7+ corresponding lines) checkov/kubernetes/checks/resource/k8s/ApiServerBasicAuthFile.py:14 — checkov/kubernetes/checks/resource/k8s/ApiServerBasicAuthFile.py:14-21 | checkov/kubernetes/checks/resource/k8s/ApiServerSecurePort.py:14-21 | checkov/kubernetes/checks/resource/k8s/EtcdAutoTls.py:15-21 | checkov/kubernetes/checks/resource/k8s/EtcdClientCertAuth.py:15-21 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 4+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 4+ corresponding lines) checkov/azure_pipelines/runner.py:52 — checkov/azure_pipelines/runner.py:52-55 | checkov/circleci_pipelines/runner.py:85-88 | checkov/github_actions/runner.py:114-117 | checkov/gitlab_ci/runner.py:63-66 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (7 members, 8+ corresponding lines) · ×1
  • Edited copies of one member (7 members, 8+ corresponding lines) checkov/github/base_github_org_security.py:16 — checkov/github/base_github_org_security.py:16-23 | checkov/github/checks/minimum_admins_in_org.py:16-25 | checkov/github/checks/repository_collaborators.py:13-22 | checkov/github/checks/sso.py:15-24 | checkov/github/checks/webhooks_https_orgs.py:13-22 | checkov/github/checks/webhooks_https_repos.py:13-22 | checkov/gitlab/checks/merge_requests_approvals.py:13-22 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 5+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 5+ corresponding lines) checkov/arm/checks/resource/SecurityCenterContactPhone.py:19 — checkov/arm/checks/resource/SecurityCenterContactPhone.py:19-23 | checkov/kubernetes/checks/resource/k8s/AllowPrivilegeEscalationPSP.py:27-36 | checkov/kubernetes/checks/resource/k8s/MinimizeCapabilitiesPSP.py:20-24 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (57 lines × 2) · ×1
  • Duplicated block (57 lines × 2) checkov/terraform/checks/resource/aws/AbsSecurityGroupUnrestrictedEgress.py:20 — checkov/terraform/checks/resource/aws/AbsSecurityGroupUnrestrictedEgress.py:20-76 | checkov/terraform/checks/resource/aws/AbsSecurityGroupUnrestrictedIngress.py:20-76 — before extracting anything, compare `checkov/terraform/checks/resource/aws/AbsSecurityGroupUnrestrictedEgress.py` and `checkov/terraform/checks/resource/aws/AbsSecurityGroupUnrestrictedIngress.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (30 lines × 2) · ×1
  • Duplicated block (30 lines × 2) checkov/terraform/checks/resource/panos/PolicyNoApplicationAny.py:19 — checkov/terraform/checks/resource/panos/PolicyNoApplicationAny.py:19-48 | checkov/terraform/checks/resource/panos/PolicyNoServiceAny.py:19-48 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (29 lines × 2) · ×1
  • Duplicated block (29 lines × 2) checkov/terraform/checks/resource/panos/PolicyDescription.py:19 — checkov/terraform/checks/resource/panos/PolicyDescription.py:19-47 | checkov/terraform/checks/resource/panos/PolicyLogForwarding.py:19-47 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (25 lines × 5) · ×1
  • Duplicated block (25 lines × 5) checkov/terraform/checks/resource/gcp/ArtifactRegistryPrivateRepo.py:18 — checkov/terraform/checks/resource/gcp/ArtifactRegistryPrivateRepo.py:18-42 | checkov/terraform/checks/resource/gcp/BigQueryPrivateTable.py:18-42 | checkov/terraform/checks/resource/gcp/DataprocPrivateCluster.py:18-42 | checkov/terraform/checks/resource/gcp/GCPCloudRunPrivateService.py:18-42 | checkov/terraform/checks/resource/gcp/PubSubPrivateTopic.py:18-42 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 5 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×1
  • Duplicated block (24 lines × 2) checkov/common/checks/object_registry.py:192 — checkov/common/checks/object_registry.py:192-215 | checkov/yaml_doc/base_registry.py:259-284 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `checkov/yaml_doc/base_registry.py:259` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (21 lines × 3) · ×1
  • Duplicated block (21 lines × 3) checkov/common/checks/object_registry.py:112 — checkov/common/checks/object_registry.py:112-132 | checkov/json_doc/base_registry.py:79-99 | checkov/yaml_doc/base_registry.py:175-195 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×1
  • Duplicated block (20 lines × 2) checkov/cdk/report.py:18 — checkov/cdk/report.py:18-37 | checkov/sast/report.py:23-42 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (19 lines × 4) · ×1
  • Duplicated block (19 lines × 4) checkov/terraform/checks/resource/kubernetes/AllowedCapabilities.py:21 — checkov/terraform/checks/resource/kubernetes/AllowedCapabilities.py:21-39 | checkov/terraform/checks/resource/kubernetes/AllowedCapabilitiesSysAdmin.py:19-37 | checkov/terraform/checks/resource/kubernetes/ContainerSecurityContext.py:20-38 | checkov/terraform/checks/resource/kubernetes/MinimiseCapabilities.py:18-36 — before extracting anything, compare `checkov/terraform/checks/resource/kubernetes/AllowedCapabilities.py` and `checkov/terraform/checks/resource/kubernetes/AllowedCapabilitiesSysAdmin.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (18–19 lines × 2) · ×1
  • Duplicated block (18–19 lines × 2) checkov/bicep/graph_builder/local_graph.py:143 — checkov/bicep/graph_builder/local_graph.py:143-161 | checkov/bicep/graph_builder/local_graph.py:172-189 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `checkov/bicep/graph_builder/local_graph.py:143` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (17–18 lines × 2) · ×1
  • Duplicated block (17–18 lines × 2) checkov/terraform/runner.py:413 — checkov/terraform/runner.py:413-430 | checkov/terraform_json/runner.py:209-225 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `checkov/terraform/runner.py:413` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (17 lines × 4) · ×1
  • Duplicated block (17 lines × 4) checkov/terraform/checks/resource/kubernetes/CPULimits.py:37 — checkov/terraform/checks/resource/kubernetes/CPULimits.py:37-53 | checkov/terraform/checks/resource/kubernetes/CPURequests.py:33-49 | checkov/terraform/checks/resource/kubernetes/MemoryLimits.py:34-50 | checkov/terraform/checks/resource/kubernetes/MemoryRequests.py:33-49 — before extracting anything, compare `checkov/terraform/checks/resource/kubernetes/CPULimits.py` and `checkov/terraform/checks/resource/kubernetes/CPURequests.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (16–17 lines × 3) · ×1
  • Duplicated block (16–17 lines × 3) checkov/policies_3d/output.py:143 — checkov/policies_3d/output.py:143-159 | checkov/policies_3d/output.py:256-271 | checkov/sca_package_2/output.py:363-378 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (16–17 lines × 2) · ×1
  • Duplicated block (16–17 lines × 2) checkov/common/output/record.py:197 — checkov/common/output/record.py:197-212 | checkov/sast/record.py:51-67 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (15–16 lines × 5) · ×1
  • Duplicated block (15–16 lines × 5) checkov/terraform/checks/resource/gcp/GoogleCloudMySqlLocalInfileOff.py:24 — checkov/terraform/checks/resource/gcp/GoogleCloudMySqlLocalInfileOff.py:24-38 | checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogLockWaits.py:24-38 | checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogMinDuration.py:25-39 | checkov/terraform/checks/resource/gcp/GoogleCloudSqlServerContainedDBAuthentication.py:24-38 | checkov/terraform/checks/resource/gcp/GoogleCloudSqlServerCrossDBOwnershipChaining.py:24-39 — before extracting anything, compare `checkov/terraform/checks/resource/gcp/GoogleCloudMySqlLocalInfileOff.py` and `checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogLockWaits.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (14–16 lines × 2) · ×1
  • Duplicated block (14–16 lines × 2) checkov/terraform/checks/data/aws/GithubActionsOIDCTrustPolicy.py:77 — checkov/terraform/checks/data/aws/GithubActionsOIDCTrustPolicy.py:77-90 | checkov/terraform/checks/resource/aws/GithubActionsOIDCTrustPolicyOnRole.py:124-139 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (8–15 lines × 6) · ×1
  • Duplicated block (8–15 lines × 6) checkov/terraform/checks/resource/gcp/AbsGooglePostgresqlDatabaseFlags.py:15 — checkov/terraform/checks/resource/gcp/AbsGooglePostgresqlDatabaseFlags.py:15-28 | checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogCheckpoints.py:28-35 | checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogConnection.py:24-31 | checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogDisconnection.py:24-37 | checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogMinMessage.py:24-38 | checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogTemp.py:24-37 — before extracting anything, compare `checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogCheckpoints.py` and `checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogConnection.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (15 lines × 3) · ×1
  • Duplicated block (15 lines × 3) checkov/openapi/checks/resource/v2/Oauth2OperationObjectPasswordFlow.py:24 — checkov/openapi/checks/resource/v2/Oauth2OperationObjectPasswordFlow.py:24-38 | checkov/openapi/checks/resource/v2/OperationObjectBasicAuth.py:24-38 | checkov/openapi/checks/resource/v2/OperationObjectImplicitFlow.py:24-38 — before extracting anything, compare `checkov/openapi/checks/resource/v2/Oauth2OperationObjectPasswordFlow.py` and `checkov/openapi/checks/resource/v2/OperationObjectBasicAuth.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `checkov/openapi/checks/resource/v2/OperationObjectBasicAuth.py:40` calls `is_start_end_line` and `checkov/openapi/checks/resource/v2/Oauth2OperationObjectPasswordFlow.py:39` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (12–15 lines × 2) · ×1
  • Duplicated block (12–15 lines × 2) checkov/cloudformation/runner.py:165 — checkov/cloudformation/runner.py:165-179 | checkov/serverless/runner.py:330-341 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `checkov/cloudformation/runner.py:165` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13–14 lines × 4) · ×1
  • Duplicated block (13–14 lines × 4) checkov/terraform/checks/resource/kubernetes/DangerousGitSync.py:23 — checkov/terraform/checks/resource/kubernetes/DangerousGitSync.py:23-36 | checkov/terraform/checks/resource/kubernetes/DropCapabilities.py:29-42 | checkov/terraform/checks/resource/kubernetes/ImageTagFixed.py:25-37 | checkov/terraform/checks/resource/kubernetes/PrivilegedContainer.py:25-38 — before extracting anything, compare `checkov/terraform/checks/resource/kubernetes/DangerousGitSync.py` and `checkov/terraform/checks/resource/kubernetes/DropCapabilities.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×1
  • Duplicated block (13–14 lines × 2) checkov/terraform/checks/resource/kubernetes/Tiller.py:23 — checkov/terraform/checks/resource/kubernetes/Tiller.py:23-35 | checkov/terraform/checks/resource/kubernetes/TillerService.py:22-35 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (13 lines × 7) · ×1
  • Duplicated block (13 lines × 7) checkov/terraform/checks/resource/kubernetes/CPURequests.py:24 — checkov/terraform/checks/resource/kubernetes/CPURequests.py:24-36 | checkov/terraform/checks/resource/kubernetes/HostPort.py:35-47 | checkov/terraform/checks/resource/kubernetes/ImageDigest.py:29-41 | checkov/terraform/checks/resource/kubernetes/ImagePullPolicyAlways.py:28-40 | checkov/terraform/checks/resource/kubernetes/LivenessProbe.py:28-40 | checkov/terraform/checks/resource/kubernetes/MemoryLimits.py:25-37 | checkov/terraform/checks/resource/kubernetes/MemoryRequests.py:24-36 — before extracting anything, compare `checkov/terraform/checks/resource/kubernetes/CPURequests.py` and `checkov/terraform/checks/resource/kubernetes/MemoryLimits.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (13 lines × 5) · ×1
  • Duplicated block (13 lines × 5) checkov/terraform/checks/resource/kubernetes/CPULimits.py:19 — checkov/terraform/checks/resource/kubernetes/CPULimits.py:19-31 | checkov/terraform/checks/resource/kubernetes/CPURequests.py:15-27 | checkov/terraform/checks/resource/kubernetes/MemoryRequests.py:15-27 | checkov/terraform/checks/resource/kubernetes/Secrets.py:18-30 | checkov/terraform/checks/resource/kubernetes/Tiller.py:32-44 — before extracting anything, compare `checkov/terraform/checks/resource/kubernetes/CPULimits.py` and `checkov/terraform/checks/resource/kubernetes/CPURequests.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×1
  • Duplicated block (12–13 lines × 2) checkov/terraform/checks/resource/aws/SNSTopicPolicyAnyPrincipal.py:20 — checkov/terraform/checks/resource/aws/SNSTopicPolicyAnyPrincipal.py:20-31 | checkov/terraform/checks/resource/aws/SQSQueuePolicyAnyPrincipal.py:20-32 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (10–11 lines × 5) · ×1
  • Duplicated block (10–11 lines × 5) checkov/kubernetes/checks/resource/k8s/ApiServerAlwaysPullImagesPlugin.py:16 — checkov/kubernetes/checks/resource/k8s/ApiServerAlwaysPullImagesPlugin.py:16-26 | checkov/kubernetes/checks/resource/k8s/ApiServerNamespaceLifecyclePlugin.py:16-25 | checkov/kubernetes/checks/resource/k8s/ApiServerNodeRestrictionPlugin.py:16-25 | checkov/kubernetes/checks/resource/k8s/ApiServerPodSecurityPolicyPlugin.py:16-25 | checkov/kubernetes/checks/resource/k8s/ApiServerServiceAccountPlugin.py:16-25 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 5 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (10 lines × 10) · ×1
  • Duplicated block (10 lines × 10) checkov/terraform/checks/resource/gcp/GoogleCloudMySqlLocalInfileOff.py:14 — checkov/terraform/checks/resource/gcp/GoogleCloudMySqlLocalInfileOff.py:14-23 | checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogCheckpoints.py:18-27 | checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogConnection.py:14-23 | checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogDisconnection.py:14-23 | checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogLockWaits.py:14-23 | checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogMinDuration.py:14-24 | checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogMinMessage.py:14-23 | checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogTemp.py:14-23 | checkov/terraform/checks/resource/gcp/GoogleCloudSqlServerContainedDBAuthentication.py:14-23 | checkov/terraform/checks/resource/gcp/GoogleCloudSqlServerCrossDBOwnershipChaining.py:14-23 — before extracting anything, compare `checkov/terraform/checks/resource/gcp/GoogleCloudMySqlLocalInfileOff.py` and `checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogLockWaits.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (10 lines × 9) · ×1
  • Duplicated block (10 lines × 9) checkov/terraform/checks/resource/kubernetes/AllowedCapabilities.py:22 — checkov/terraform/checks/resource/kubernetes/AllowedCapabilities.py:22-31 | checkov/terraform/checks/resource/kubernetes/AllowedCapabilitiesSysAdmin.py:20-29 | checkov/terraform/checks/resource/kubernetes/CPULimits.py:23-32 | checkov/terraform/checks/resource/kubernetes/CPURequests.py:19-28 | checkov/terraform/checks/resource/kubernetes/ContainerSecurityContext.py:21-30 | checkov/terraform/checks/resource/kubernetes/MemoryRequests.py:19-28 | checkov/terraform/checks/resource/kubernetes/MinimiseCapabilities.py:19-28 | checkov/terraform/checks/resource/kubernetes/Secrets.py:22-31 | checkov/terraform/checks/resource/kubernetes/Tiller.py:36-45 — before extracting anything, compare `checkov/terraform/checks/resource/kubernetes/AllowedCapabilities.py` and `checkov/terraform/checks/resource/kubernetes/AllowedCapabilitiesSysAdmin.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (9–10 lines × 4) · ×1
  • Duplicated block (9–10 lines × 4) checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogCheckpoints.py:36 — checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogCheckpoints.py:36-44 | checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogConnection.py:32-41 | checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogDisconnection.py:38-47 | checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogLockWaits.py:38-47 — before extracting anything, compare `checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogCheckpoints.py` and `checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogConnection.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (9–10 lines × 3) · ×1
  • Duplicated block (9–10 lines × 3) checkov/terraform/module_loading/loaders/registry_loader.py:103 — checkov/terraform/module_loading/loaders/registry_loader.py:103-112 | checkov/terraform/module_loading/loaders/registry_loader.py:182-190 | checkov/terraform/module_loading/loaders/registry_loader.py:224-232 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `checkov/terraform/module_loading/loaders/registry_loader.py:103` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7–10 lines × 2) · ×1
  • Duplicated block (7–10 lines × 2) checkov/bicep/utils.py:34 — checkov/bicep/utils.py:34-40 | checkov/terraform_json/utils.py:31-40 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `checkov/terraform_json/utils.py:31` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (10–14 lines × 11) · ×1
  • Duplicated block (10–14 lines × 11) checkov/terraform/checks/resource/gcp/AbsGooglePostgresqlDatabaseFlags.py:12 — checkov/terraform/checks/resource/gcp/AbsGooglePostgresqlDatabaseFlags.py:12-24 | checkov/terraform/checks/resource/gcp/GoogleCloudMySqlLocalInfileOff.py:21-33 | checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogCheckpoints.py:25-34 | checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogConnection.py:21-30 | checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogDisconnection.py:21-33 | checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogLockWaits.py:21-33 | checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogMinDuration.py:22-34 | checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogMinMessage.py:21-34 | checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogTemp.py:21-33 | checkov/terraform/checks/resource/gcp/GoogleCloudSqlServerContainedDBAuthentication.py:21-33 | checkov/terraform/checks/resource/gcp/GoogleCloudSqlServerCrossDBOwnershipChaining.py:21-34 — before extracting anything, compare `checkov/terraform/checks/resource/gcp/GoogleCloudMySqlLocalInfileOff.py` and `checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogLockWaits.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (9 lines × 10) · ×1
  • Duplicated block (9 lines × 10) checkov/terraform/checks/resource/kubernetes/AllowPrivilegeEscalation.py:30 — checkov/terraform/checks/resource/kubernetes/AllowPrivilegeEscalation.py:30-38 | checkov/terraform/checks/resource/kubernetes/CPULimits.py:27-35 | checkov/terraform/checks/resource/kubernetes/CPURequests.py:23-31 | checkov/terraform/checks/resource/kubernetes/HostPort.py:34-42 | checkov/terraform/checks/resource/kubernetes/ImageDigest.py:28-36 | checkov/terraform/checks/resource/kubernetes/ImagePullPolicyAlways.py:27-35 | checkov/terraform/checks/resource/kubernetes/LivenessProbe.py:27-35 | checkov/terraform/checks/resource/kubernetes/MemoryLimits.py:24-32 | checkov/terraform/checks/resource/kubernetes/MemoryRequests.py:23-31 | checkov/terraform/checks/resource/kubernetes/Secrets.py:26-34 — before extracting anything, compare `checkov/terraform/checks/resource/kubernetes/AllowPrivilegeEscalation.py` and `checkov/terraform/checks/resource/kubernetes/CPULimits.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×1
  • Duplicated block (8 lines × 4) checkov/terraform/checks/resource/kubernetes/AllowedCapabilities.py:32 — checkov/terraform/checks/resource/kubernetes/AllowedCapabilities.py:32-39 | checkov/terraform/checks/resource/kubernetes/AllowedCapabilitiesSysAdmin.py:30-37 | checkov/terraform/checks/resource/kubernetes/MinimiseCapabilities.py:29-36 | checkov/terraform/checks/resource/kubernetes/ReadonlyRootFilesystem.py:25-32 — before extracting anything, compare `checkov/terraform/checks/resource/kubernetes/AllowedCapabilities.py` and `checkov/terraform/checks/resource/kubernetes/AllowedCapabilitiesSysAdmin.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×1
  • Duplicated block (7–8 lines × 2) checkov/common/sca/output.py:443 — checkov/common/sca/output.py:443-449 | checkov/common/sca/output.py:459-466 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `checkov/common/sca/output.py:443` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (3–8 lines × 4) · ×1
  • Duplicated block (3–8 lines × 4) checkov/terraform/checks/resource/aws/APIGatewayMethodWOAuth.py:23 — checkov/terraform/checks/resource/aws/APIGatewayMethodWOAuth.py:23-25 | checkov/terraform/checks/resource/aws/APIGatewayMethodWOAuth.py:31-38 | checkov/terraform/checks/resource/aws/APIGatewayMethodWOAuth.py:47-49 | checkov/terraform/checks/resource/aws/APIGatewayMethodWOAuth.py:56-63 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `checkov/terraform/checks/resource/aws/APIGatewayMethodWOAuth.py:23` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (7 lines × 6) · ×1
  • Duplicated block (7 lines × 6) checkov/terraform/checks/resource/kubernetes/AllowedCapabilities.py:37 — checkov/terraform/checks/resource/kubernetes/AllowedCapabilities.py:37-43 | checkov/terraform/checks/resource/kubernetes/CPULimits.py:38-44 | checkov/terraform/checks/resource/kubernetes/CPURequests.py:34-40 | checkov/terraform/checks/resource/kubernetes/MemoryLimits.py:35-41 | checkov/terraform/checks/resource/kubernetes/MemoryRequests.py:34-40 | checkov/terraform/checks/resource/kubernetes/MinimiseCapabilities.py:34-40 — before extracting anything, compare `checkov/terraform/checks/resource/kubernetes/AllowedCapabilities.py` and `checkov/terraform/checks/resource/kubernetes/CPULimits.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×1
  • Duplicated block (7 lines × 4) checkov/terraform/checks/resource/kubernetes/AllowedCapabilities.py:35 — checkov/terraform/checks/resource/kubernetes/AllowedCapabilities.py:35-41 | checkov/terraform/checks/resource/kubernetes/MinimiseCapabilities.py:32-38 | checkov/terraform/checks/resource/kubernetes/PrivilegedContainer.py:34-40 | checkov/terraform/checks/resource/kubernetes/ReadonlyRootFilesystem.py:28-34 — before extracting anything, compare `checkov/terraform/checks/resource/kubernetes/AllowedCapabilities.py` and `checkov/terraform/checks/resource/kubernetes/MinimiseCapabilities.py` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×1
  • Duplicated block (7 lines × 3) checkov/main.py:586 — checkov/main.py:586-592 | checkov/main.py:641-647 | checkov/main.py:697-703 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (3–7 lines × 5) · ×1
  • Duplicated block (3–7 lines × 5) checkov/terraform/checks/resource/aws/DLMEventsCrossRegionEncryption.py:16 — checkov/terraform/checks/resource/aws/DLMEventsCrossRegionEncryption.py:16-22 | checkov/terraform/checks/resource/aws/DLMEventsCrossRegionEncryptionWithCMK.py:16-22 | checkov/terraform/checks/resource/kubernetes/AllowedCapabilitiesSysAdmin.py:38-40 | checkov/terraform/checks/resource/kubernetes/PodSecurityContext.py:40-42 | checkov/terraform/checks/resource/kubernetes/ReadonlyRootFilesystem.py:20-23 — before extracting anything, compare `checkov/terraform/checks/resource/kubernetes/AllowedCapabilitiesSysAdmin.py` and `checkov/terraform/checks/resource/kubernetes/ReadonlyRootFilesystem.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `checkov/terraform/checks/resource/aws/DLMEventsCrossRegionEncryption.py:22` calls `get` and `checkov/terraform/checks/resource/kubernetes/AllowedCapabilitiesSysAdmin.py:40` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (5 lines × 6) · ×1
  • Duplicated block (5 lines × 6) checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogCheckpoints.py:36 — checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogCheckpoints.py:36-40 | checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogConnection.py:32-36 | checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogDisconnection.py:38-42 | checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogLockWaits.py:38-42 | checkov/terraform/checks/resource/gcp/GoogleCloudSqlServerContainedDBAuthentication.py:38-42 | checkov/terraform/checks/resource/gcp/GoogleCloudSqlServerCrossDBOwnershipChaining.py:39-43 — before extracting anything, compare `checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogCheckpoints.py` and `checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogConnection.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (7–8 lines × 4) · ×1
  • Duplicated block (7–8 lines × 4) checkov/terraform/checks/resource/aws/S3SecureDataTransport.py:63 — checkov/terraform/checks/resource/aws/S3SecureDataTransport.py:63-69 | checkov/terraform/checks/resource/aws/S3SecureDataTransport.py:89-95 | checkov/terraform/checks/resource/aws/S3SecureDataTransport.py:106-112 | checkov/terraform/checks/resource/aws/S3SecureDataTransport.py:116-123 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (26 lines × 2) · ×1
  • Duplicated block (26 lines × 2) checkov/arm/graph_builder/local_graph.py:232 — checkov/arm/graph_builder/local_graph.py:232-257 | checkov/bicep/graph_builder/local_graph.py:274-299 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×1
  • Duplicated block (22 lines × 2) checkov/arm/checks/resource/AKSEphemeralOSDisks.py:7 — checkov/arm/checks/resource/AKSEphemeralOSDisks.py:7-28 | checkov/terraform/checks/resource/gcp/GKEDontUseNodePools.py:10-36 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (8 lines × 28) · ×1
  • Duplicated block (8 lines × 28) checkov/arm/checks/resource/AkSSecretStoreRotation.py:7 — checkov/arm/checks/resource/AkSSecretStoreRotation.py:7-14 | checkov/arm/checks/resource/AppServiceIdentityProviderEnabled.py:9-19 | checkov/arm/checks/resource/CognitiveServicesConfigureIdentity.py:9-19 | checkov/arm/checks/resource/SecretContentType.py:11-21 | checkov/cloudformation/checks/resource/aws/AthenaWorkgroupConfiguration.py:7-14 | checkov/cloudformation/checks/resource/aws/ECRImmutableTags.py:9-19 | checkov/cloudformation/checks/resource/aws/S3IgnorePublicACLs.py:7-14 | checkov/terraform/checks/resource/alicloud/RDSInstanceAutoUpgrade.py:8-18 | checkov/terraform/checks/resource/aws/ECRImmutableTags.py:9-19 | checkov/terraform/checks/resource/aws/LambdaInVPC.py:10-20 | checkov/terraform/checks/resource/aws/TransferServerIsPublic.py:11-21 | checkov/terraform/checks/resource/azure/ACRDedicatedDataEndpointEnabled.py:7-14 | checkov/terraform/checks/resource/azure/AKSIsPaidSku.py:9-23 | checkov/terraform/checks/resource/azure/AKSSecretStoreRotation.py:7-14 | checkov/terraform/checks/resource/azure/AppConfigSku.py:9-19 | checkov/terraform/checks/resource/azure/AzureSparkPoolIsolatedComputeEnabled.py:7-14 | checkov/terraform/checks/resource/azure/CosmosDBDisableAccessKeyWrite.py:9-19 | checkov/terraform/checks/resource/azure/PubsubSKUSLA.py:11-21 | checkov/terraform/checks/resource/azure/SignalRSKUSLA.py:11-21 | checkov/terraform/checks/resource/gcp/DataflowPrivateJob.py:9-20 | checkov/terraform/checks/resource/gcp/DataprocPublicIpCluster.py:7-14 | checkov/terraform/checks/resource/gcp/GoogleSubnetworkPrivateGoogleEnabled.py:14-28 | checkov/terraform/checks/resource/gcp/MemorystoreForRedisAuthEnabled.py:9-20 | checkov/terraform/checks/resource/gcp/VertexAIPrivateInstance.py:9-20 | checkov/terraform/checks/resource/kubernetes/AllowPrivilegeEscalationPSP.py:19-29 | checkov/terraform/checks/resource/ncp/LBListenerUsingHTTPS.py:10-20 | checkov/terraform/checks/resource/oci/InstanceMetadataServiceEnabled.py:9-19 | checkov/terraform/checks/resource/oci/StorageBlockEncryption.py:10-20 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 28 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 28 times. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (15 lines × 4) · ×1
  • Duplicated block (15 lines × 4) checkov/arm/checks/resource/AppServiceClientCertificate.py:13 — checkov/arm/checks/resource/AppServiceClientCertificate.py:13-27 | checkov/arm/checks/resource/AppServiceHTTPSOnly.py:12-26 | checkov/arm/checks/resource/SecurityCenterContactEmailAlert.py:12-26 | checkov/arm/checks/resource/SecurityCenterContactEmailAlertAdmins.py:12-26 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (8 lines × 31) · ×1
  • Duplicated block (8 lines × 31) checkov/arm/checks/resource/AppServiceDetailedErrorMessagesEnabled.py:8 — checkov/arm/checks/resource/AppServiceDetailedErrorMessagesEnabled.py:8-15 | checkov/arm/checks/resource/AppServiceHttpLoggingEnabled.py:8-18 | checkov/cloudformation/checks/resource/aws/BackupVaultEncrypted.py:8-18 | checkov/cloudformation/checks/resource/aws/CloudfrontDistributionLogging.py:8-18 | checkov/cloudformation/checks/resource/aws/CloudtrailLogValidation.py:7-14 | checkov/cloudformation/checks/resource/aws/CloudtrailMultiRegion.py:7-14 | checkov/cloudformation/checks/resource/aws/DocDBAuditLogs.py:9-19 | checkov/cloudformation/checks/resource/aws/ELBAccessLogs.py:7-14 | checkov/cloudformation/checks/resource/aws/RedshiftClusterLogging.py:8-18 | checkov/cloudformation/checks/resource/aws/S3AccessLogs.py:10-20 | checkov/cloudformation/checks/resource/aws/S3PublicACLRead.py:8-18 | checkov/cloudformation/checks/resource/aws/S3Versioning.py:8-22 | checkov/terraform/checks/resource/aws/APIGatewayXray.py:8-15 | checkov/terraform/checks/resource/aws/CloudformationStackNotificationArns.py:8-18 | checkov/terraform/checks/resource/aws/CloudfrontDistributionLogging.py:9-19 | checkov/terraform/checks/resource/aws/CloudtrailLogValidation.py:7-14 | checkov/terraform/checks/resource/aws/CloudtrailMultiRegion.py:7-14 | checkov/terraform/checks/resource/aws/DBInstanceLogging.py:10-26 | checkov/terraform/checks/resource/aws/EC2DetailedMonitoringEnabled.py:8-18 | checkov/terraform/checks/resource/aws/GlobalAcceleratorAcceleratorFlowLogs.py:7-14 | checkov/terraform/checks/resource/aws/LambdaXrayEnabled.py:7-20 | checkov/terraform/checks/resource/aws/MQBrokerLogging.py:7-14 | checkov/terraform/checks/resource/aws/MWAAWorkerLogsEnabled.py:8-15 | checkov/terraform/checks/resource/aws/StateMachineLoggingExecutionHistory.py:8-15 | checkov/terraform/checks/resource/aws/StateMachineXray.py:8-15 | checkov/terraform/checks/resource/gcp/CloudStorageVersioningEnabled.py:7-14 | checkov/terraform/checks/resource/gcp/DataFusionStackdriverLogs.py:7-14 | checkov/terraform/checks/resource/gcp/DataFusionStackdriverMonitoring.py:7-14 | checkov/terraform/checks/resource/oci/ObjectStorageEmitEvents.py:7-17 | checkov/terraform/checks/resource/tencentcloud/CVMDisableMonitorService.py:10-20 | checkov/terraform/checks/resource/tencentcloud/TKELogAgentEnabled.py:8-18 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 31 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 31 times. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (8 lines × 72) · ×1
  • Duplicated block (8 lines × 72) checkov/arm/checks/resource/AppServiceDotnetFrameworkVersion.py:7 — checkov/arm/checks/resource/AppServiceDotnetFrameworkVersion.py:7-17 | checkov/arm/checks/resource/AzureInstanceExtensions.py:7-17 | checkov/arm/checks/resource/AzureSparkPoolIsolatedComputeEnabled.py:7-14 | checkov/arm/checks/resource/AzureSynapseWorkspaceVAisEnabled.py:7-14 | checkov/arm/checks/resource/KeyExpirationDate.py:8-18 | checkov/arm/checks/resource/SynapseWorkspaceEnablesDataExfilProtection.py:7-14 | checkov/cloudformation/checks/resource/aws/ECRImageScanning.py:7-14 | checkov/cloudformation/checks/resource/aws/LambdaFunctionURLAuth.py:8-18 | checkov/cloudformation/checks/resource/aws/QLDBLedgerDeletionProtection.py:10-23 | checkov/cloudformation/checks/resource/aws/S3BlockPublicACLs.py:8-15 | checkov/cloudformation/checks/resource/aws/S3BlockPublicPolicy.py:8-15 | checkov/cloudformation/checks/resource/aws/S3RestrictPublicBuckets.py:8-15 | checkov/cloudformation/checks/resource/aws/TransferServerIsPublic.py:7-17 | checkov/terraform/checks/resource/alicloud/OSSBucketTransferAcceleration.py:7-14 | checkov/terraform/checks/resource/alicloud/OSSBucketVersioning.py:7-17 | checkov/terraform/checks/resource/aws/CloudfrontDistributionEnabled.py:7-14 | checkov/terraform/checks/resource/aws/DBSnapshotsArePrivate.py:9-19 | checkov/terraform/checks/resource/aws/DeprecatedLambdaRuntime.py:9-27 | checkov/terraform/checks/resource/aws/EC2EBSOptimized.py:7-14 | checkov/terraform/checks/resource/aws/ECRImageScanning.py:7-14 | checkov/terraform/checks/resource/aws/LambdaDLQConfigured.py:8-18 | checkov/terraform/checks/resource/aws/LambdaFunctionURLAuth.py:8-18 | checkov/terraform/checks/resource/aws/MQBrokerMinorAutoUpgrade.py:7-14 | checkov/terraform/checks/resource/aws/NeptuneClusterInstancePublic.py:8-18 | checkov/terraform/checks/resource/aws/RDSDeletionProtection.py:8-15 | checkov/terraform/checks/resource/aws/RDSInstanceDeletionProtection.py:8-15 | checkov/terraform/checks/resource/aws/S3BlockPublicACLs.py:7-14 | checkov/terraform/checks/resource/aws/S3BlockPublicPolicy.py:7-14 | checkov/terraform/checks/resource/aws/S3IgnorePublicACLs.py:7-14 | checkov/terraform/checks/resource/aws/S3RestrictPublicBuckets.py:7-14 | checkov/terraform/checks/resource/azure/ActiveDirectoryUsedAuthenticationServiceFabric.py:8-18 | checkov/terraform/checks/resource/azure/AppServiceSkuMinimum.py:17-27 | checkov/terraform/checks/resource/azure/AzureScaleSetPassword.py:7-14 | checkov/terraform/checks/resource/azure/FunctionAppsEnableAuthentication.py:8-15 | checkov/terraform/checks/resource/azure/KeyExpirationDate.py:8-18 | checkov/terraform/checks/resource/azure/MLComputeClusterMinNodes.py:7-17 | checkov/terraform/checks/resource/azure/MySQLTreatDetectionEnabled.py:7-14 | checkov/terraform/checks/resource/azure/PostgresSQLTreatDetectionEnabled.py:7-14 | checkov/terraform/checks/resource/azure/SQLServerEmailAlertsEnabled.py:8-18 | checkov/terraform/checks/resource/azure/SQLServerEmailAlertsToAdminsEnabled.py:7-14 | checkov/terraform/checks/resource/azure/SecretContentType.py:8-18 | checkov/terraform/checks/resource/azure/SecretExpirationDate.py:8-18 | checkov/terraform/checks/resource/azure/SecurityCenterContactEmailAlert.py:7-14 | checkov/terraform/checks/resource/azure/SecurityCenterContactEmailAlertAdmins.py:7-14 | checkov/terraform/checks/resource/azure/SecurityCenterContactEmails.py:8-18 | checkov/terraform/checks/resource/azure/SecurityCenterContactPhone.py:8-18 | checkov/terraform/checks/resource/azure/SecurityCenterStandardPricing.py:7-17 | checkov/terraform/checks/resource/azure/SynapseWorkspaceEnablesDataExfilProtection.py:7-14 | checkov/terraform/checks/resource/digitalocean/DropletSSHKeys.py:10-20 | checkov/terraform/checks/resource/gcp/CloudBuildWorkersArePrivate.py:8-15 | checkov/terraform/checks/resource/gcp/CloudSqlMajorVersion.py:7-18 | checkov/terraform/checks/resource/gcp/DataFusionPrivateInstance.py:7-14 | checkov/terraform/checks/resource/gcp/GoogleStorageBucketUniformAccess.py:7-14 | checkov/terraform/checks/resource/gcp/GoogleStoragePublicAccessPrevention.py:9-19 | checkov/terraform/checks/resource/gcp/GoogleVertexAINotebookShieldedVM.py:9-19 | checkov/terraform/checks/resource/gcp/MemorystoreForRedisInTransitEncryption.py:7-18 | checkov/terraform/checks/resource/gcp/VertexAINotebookEnsureIntegrityMonitoring.py:9-19 | checkov/terraform/checks/resource/kubernetes/AllowedCapabilitiesPSP.py:11-24 | checkov/terraform/checks/resource/kubernetes/ShareHostIPCPSP.py:12-22 | checkov/terraform/checks/resource/linode/authorized_keys.py:10-20 | checkov/terraform/checks/resource/linode/firewall_inbound_policy.py:9-19 | checkov/terraform/checks/resource/linode/firewall_outbound_policy.py:9-19 | checkov/terraform/checks/resource/linode/user_email_set.py:10-20 | checkov/terraform/checks/resource/linode/user_username_set.py:10-20 | checkov/terraform/checks/resource/oci/IAMPasswordPolicyLowerCase.py:7-17 | checkov/terraform/checks/resource/oci/IAMPasswordPolicyNumeric.py:7-17 | checkov/terraform/checks/resource/oci/IAMPasswordPolicySpecialCharacters.py:7-17 | checkov/terraform/checks/resource/oci/IAMPasswordPolicyUpperCase.py:7-17 | checkov/terraform/checks/resource/oci/ObjectStoragePublic.py:7-17 | checkov/terraform/checks/resource/oci/ObjectStorageVersioning.py:7-17 | checkov/terraform/checks/resource/oci/SecurityListIngress.py:8-18 | checkov/terraform/checks/resource/oci/StorageBlockBackupEnabled.py:9-19 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 72 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 72 times. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (11 lines × 15) · ×1
  • Duplicated block (11 lines × 15) checkov/arm/checks/resource/KeyExpirationDate.py:8 — checkov/arm/checks/resource/KeyExpirationDate.py:8-18 | checkov/terraform/checks/resource/aws/LambdaDLQConfigured.py:8-18 | checkov/terraform/checks/resource/azure/ActiveDirectoryUsedAuthenticationServiceFabric.py:8-18 | checkov/terraform/checks/resource/azure/KeyExpirationDate.py:8-18 | checkov/terraform/checks/resource/azure/SQLServerEmailAlertsEnabled.py:8-18 | checkov/terraform/checks/resource/azure/SecretContentType.py:8-18 | checkov/terraform/checks/resource/azure/SecretExpirationDate.py:8-18 | checkov/terraform/checks/resource/azure/SecurityCenterContactEmails.py:8-18 | checkov/terraform/checks/resource/azure/SecurityCenterContactPhone.py:8-18 | checkov/terraform/checks/resource/digitalocean/DropletSSHKeys.py:10-20 | checkov/terraform/checks/resource/linode/authorized_keys.py:10-20 | checkov/terraform/checks/resource/linode/user_email_set.py:10-20 | checkov/terraform/checks/resource/linode/user_username_set.py:10-20 | checkov/terraform/checks/resource/oci/SecurityListIngress.py:8-18 | checkov/terraform/checks/resource/oci/StorageBlockBackupEnabled.py:9-19 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 15 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 15 times.
D4 · Code Duplication · Duplicated block (20 lines × 3) · ×1
  • Duplicated block (20 lines × 3) checkov/bitbucket_pipelines/base_bitbucket_pipelines_check.py:20 — checkov/bitbucket_pipelines/base_bitbucket_pipelines_check.py:20-39 | checkov/github_actions/checks/base_github_action_check.py:19-38 | checkov/gitlab_ci/checks/base_gitlab_ci_check.py:16-35 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
D4 · Code Duplication · Duplicated block (11 lines × 58) · ×1
  • Duplicated block (11 lines × 58) checkov/cloudformation/checks/resource/aws/BedrockAgentEncrypted.py:8 — checkov/cloudformation/checks/resource/aws/BedrockAgentEncrypted.py:8-18 | checkov/cloudformation/checks/resource/aws/SNSTopicEncryption.py:8-18 | checkov/cloudformation/checks/resource/aws/SQSQueueEncryption.py:10-20 | checkov/cloudformation/checks/resource/aws/SagemakerDataQualityJobDefinitionEncryption.py:8-18 | checkov/cloudformation/checks/resource/aws/SagemakerDataQualityJobDefinitionVolumeEncryption.py:8-18 | checkov/cloudformation/checks/resource/aws/TimestreamDatabaseKMSKey.py:10-20 | checkov/cloudformation/checks/resource/aws/WAFEnabled.py:8-18 | checkov/terraform/checks/resource/alicloud/OSSBucketEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/aws/AMICopyUsesCMK.py:8-18 | checkov/terraform/checks/resource/aws/AppFlowConnectorProfileUsesCMK.py:8-18 | checkov/terraform/checks/resource/aws/AppFlowUsesCMK.py:8-18 | checkov/terraform/checks/resource/aws/AthenaDatabaseEncryption.py:8-18 | checkov/terraform/checks/resource/aws/CloudWatchLogGroupKMSKey.py:8-18 | checkov/terraform/checks/resource/aws/CloudtrailEventDataStoreUsesCMK.py:8-18 | checkov/terraform/checks/resource/aws/ComprehendEntityRecognizerModelUsesCMK.py:8-18 | checkov/terraform/checks/resource/aws/ConnectInstanceKinesisVideoStreamStorageConfigUsesCMK.py:8-18 | checkov/terraform/checks/resource/aws/DBSnapshotCopyUsesCMK.py:8-18 | checkov/terraform/checks/resource/aws/DMSReplicationInstanceEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/aws/DocDBEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/aws/EBSSnapshotCopyEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/aws/EBSVolumeEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/aws/EFSFileSystemEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/aws/ElasticacheReplicationGroupEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/aws/FSXOntapFSEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/aws/FSXOpenZFSFileSystemEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/aws/FSXWindowsFSEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/aws/ImagebuilderComponentEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/aws/KendraIndexSSEUsesCMK.py:8-18 | checkov/terraform/checks/resource/aws/KinesisStreamEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/aws/KinesisVideoEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/aws/LustreFSEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/aws/MQBrokerEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/aws/MemoryDBEncryptionWithCMK.py:8-18 | checkov/terraform/checks/resource/aws/RDSClusterEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/aws/RedshiftClusterKMSKey.py:8-18 | checkov/terraform/checks/resource/aws/S3BucketObjectEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/aws/S3ObjectCopyEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/aws/SagemakerDataQualityJobDefinitionEncryption.py:8-18 | checkov/terraform/checks/resource/aws/SagemakerDataQualityJobDefinitionVolumeEncryption.py:8-18 | checkov/terraform/checks/resource/aws/SagemakerEndpointConfigurationEncryption.py:9-19 | checkov/terraform/checks/resource/aws/SagemakerFlowDefinitionUsesKMS.py:8-18 | checkov/terraform/checks/resource/aws/SagemakerNotebookEncryption.py:8-18 | checkov/terraform/checks/resource/aws/TimestreamDatabaseKMSKey.py:10-20 | checkov/terraform/checks/resource/azure/AzureBatchAccountUsesKeyVaultEncryption.py:8-18 | checkov/terraform/checks/resource/azure/SynapseWorkspaceCMKEncryption.py:8-18 | checkov/terraform/checks/resource/gcp/ArtifactRegsitryEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/gcp/BigQueryDatasetEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/gcp/BigQueryTableEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/gcp/BigTableInstanceEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/gcp/CloudPubSubEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/gcp/DataflowJobEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/gcp/DataprocClusterEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/gcp/GoogleComputeDiskEncryption.py:8-18 | checkov/terraform/checks/resource/gcp/SpannerDatabaseEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/gcp/VertexAIDatasetEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/gcp/VertexAIMetadataStoreEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/oci/FileSystemEncryption.py:8-18 | checkov/terraform/checks/resource/oci/ObjectStorageEncryption.py:8-18 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 58 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 58 times.
D4 · Code Duplication · Duplicated block (8 lines × 40) · ×1
  • Duplicated block (8 lines × 40) checkov/arm/checks/resource/AutomationEncrypted.py:7 — checkov/arm/checks/resource/AutomationEncrypted.py:7-17 | checkov/cloudformation/checks/resource/aws/AuroraEncryption.py:11-30 | checkov/cloudformation/checks/resource/aws/DMSReplicationInstancePubliclyAccessible.py:9-19 | checkov/cloudformation/checks/resource/aws/DocDBEncryption.py:7-14 | checkov/cloudformation/checks/resource/aws/EBSEncryption.py:7-14 | checkov/cloudformation/checks/resource/aws/ECRRepositoryEncrypted.py:9-19 | checkov/cloudformation/checks/resource/aws/ElasticacheReplicationGroupEncryptionAtTransit.py:7-14 | checkov/cloudformation/checks/resource/aws/ElasticsearchDomainEnforceHTTPS.py:7-14 | checkov/cloudformation/checks/resource/aws/ElasticsearchNodeToNodeEncryption.py:7-14 | checkov/cloudformation/checks/resource/aws/NeptuneClusterStorageEncrypted.py:7-14 | checkov/terraform/checks/resource/alicloud/MongoDBTransparentDataEncryptionEnabled.py:8-18 | checkov/terraform/checks/resource/aws/AthenaWorkgroupEncryption.py:10-20 | checkov/terraform/checks/resource/aws/BackupVaultEncrypted.py:10-20 | checkov/terraform/checks/resource/aws/BedrockAgentEncrypted.py:10-20 | checkov/terraform/checks/resource/aws/CodePipelineArtifactsEncrypted.py:10-20 | checkov/terraform/checks/resource/aws/ConnectInstanceS3StorageConfigUsesCMK.py:10-20 | checkov/terraform/checks/resource/aws/DMSS3UsesCMK.py:12-22 | checkov/terraform/checks/resource/aws/DocDBGlobalClusterEncryption.py:7-14 | checkov/terraform/checks/resource/aws/DynamoDBTableReplicaKMSUsesCMK.py:10-20 | checkov/terraform/checks/resource/aws/MemoryDBClusterIntransitEncryption.py:11-21 | checkov/terraform/checks/resource/aws/MemoryDBSnapshotEncryptionWithCMK.py:10-20 | checkov/terraform/checks/resource/aws/NeptuneClusterEncryptedWithCMK.py:10-20 | checkov/terraform/checks/resource/aws/NeptuneClusterSnapshotEncrypted.py:7-14 | checkov/terraform/checks/resource/aws/NeptuneClusterSnapshotEncryptedWithCMK.py:10-20 | checkov/terraform/checks/resource/aws/RedshiftClusterSnapshotCopyGrantEncryptedWithCMK.py:10-20 | checkov/terraform/checks/resource/aws/RedshiftServerlessNamespaceKMSKey.py:10-20 | checkov/terraform/checks/resource/aws/SNSTopicEncryption.py:10-20 | checkov/terraform/checks/resource/aws/SSMParameterUsesCMK.py:10-25 | checkov/terraform/checks/resource/aws/SchedulerScheduleUsesCMK.py:10-20 | checkov/terraform/checks/resource/azure/AppConfigEncryption.py:10-20 | checkov/terraform/checks/resource/azure/AppGWUsesHttps.py:7-17 | checkov/terraform/checks/resource/azure/AzureServicebusDoubleEncryptionEnabled.py:9-19 | checkov/terraform/checks/resource/azure/AzureServicebusHasCMK.py:10-20 | checkov/terraform/checks/resource/azure/PostgreSQLEncryptionEnabled.py:7-14 | checkov/terraform/checks/resource/ncp/LaunchConfigurationEncryptionVPC.py:7-14 | checkov/terraform/checks/resource/ncp/NASEncryptionEnabled.py:7-14 | checkov/terraform/checks/resource/ncp/ServerEncryptionVPC.py:7-14 | checkov/terraform/checks/resource/yandexcloud/K8SEtcdKMSEncryption.py:10-20 | checkov/terraform/checks/resource/yandexcloud/KMSSymmetricKeyRotation.py:10-20 | checkov/terraform/checks/resource/yandexcloud/ObjectStorageBucketEncryption.py:10-20 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 40 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 40 times. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (8 lines × 98) · ×1
  • Duplicated block (8 lines × 98) checkov/arm/checks/resource/PostgreSQLEncryptionEnabled.py:7 — checkov/arm/checks/resource/PostgreSQLEncryptionEnabled.py:7-17 | checkov/cloudformation/checks/resource/aws/BedrockAgentEncrypted.py:8-18 | checkov/cloudformation/checks/resource/aws/DAXEncryption.py:7-17 | checkov/cloudformation/checks/resource/aws/DocDBTLS.py:9-19 | checkov/cloudformation/checks/resource/aws/EFSEncryptionEnabled.py:7-14 | checkov/cloudformation/checks/resource/aws/ElasticacheReplicationGroupEncryptionAtRest.py:7-14 | checkov/cloudformation/checks/resource/aws/ElasticsearchEncryption.py:7-14 | checkov/cloudformation/checks/resource/aws/KinesisStreamEncryptionType.py:7-17 | checkov/cloudformation/checks/resource/aws/RedshiftClusterEncryption.py:7-14 | checkov/cloudformation/checks/resource/aws/SNSTopicEncryption.py:8-18 | checkov/cloudformation/checks/resource/aws/SQSQueueEncryption.py:10-20 | checkov/cloudformation/checks/resource/aws/SagemakerDataQualityJobDefinitionEncryption.py:8-18 | checkov/cloudformation/checks/resource/aws/SagemakerDataQualityJobDefinitionTrafficEncryption.py:7-14 | checkov/cloudformation/checks/resource/aws/SagemakerDataQualityJobDefinitionVolumeEncryption.py:8-18 | checkov/cloudformation/checks/resource/aws/SagemakerNotebookInstanceAllowsIMDSv2.py:7-17 | checkov/cloudformation/checks/resource/aws/TimestreamDatabaseKMSKey.py:10-20 | checkov/cloudformation/checks/resource/aws/WAFEnabled.py:8-18 | checkov/cloudformation/checks/resource/aws/WorkspaceRootVolumeEncrypted.py:7-14 | checkov/cloudformation/checks/resource/aws/WorkspaceUserVolumeEncrypted.py:7-14 | checkov/terraform/checks/resource/alicloud/OSSBucketEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/aws/AMICopyIsEncrypted.py:8-15 | checkov/terraform/checks/resource/aws/AMICopyUsesCMK.py:8-18 | checkov/terraform/checks/resource/aws/AppFlowConnectorProfileUsesCMK.py:8-18 | checkov/terraform/checks/resource/aws/AppFlowUsesCMK.py:8-18 | checkov/terraform/checks/resource/aws/AthenaDatabaseEncryption.py:8-18 | checkov/terraform/checks/resource/aws/AuroraEncryption.py:7-23 | checkov/terraform/checks/resource/aws/CloudWatchLogGroupKMSKey.py:8-18 | checkov/terraform/checks/resource/aws/CloudtrailEventDataStoreUsesCMK.py:8-18 | checkov/terraform/checks/resource/aws/ComprehendEntityRecognizerModelUsesCMK.py:8-18 | checkov/terraform/checks/resource/aws/ConnectInstanceKinesisVideoStreamStorageConfigUsesCMK.py:8-18 | checkov/terraform/checks/resource/aws/DAXEncryption.py:7-14 | checkov/terraform/checks/resource/aws/DAXEndpointTLS.py:7-17 | checkov/terraform/checks/resource/aws/DBSnapshotCopyUsesCMK.py:8-18 | checkov/terraform/checks/resource/aws/DMSReplicationInstanceEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/aws/DMSReplicationInstanceMinorUpgrade.py:7-14 | checkov/terraform/checks/resource/aws/DocDBEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/aws/DocDBEncryption.py:7-14 | checkov/terraform/checks/resource/aws/EBSEncryption.py:7-14 | checkov/terraform/checks/resource/aws/EBSSnapshotCopyEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/aws/EBSVolumeEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/aws/ECRRepositoryEncrypted.py:7-17 | checkov/terraform/checks/resource/aws/EFSEncryptionEnabled.py:7-14 | checkov/terraform/checks/resource/aws/EFSFileSystemEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/aws/ElasticacheReplicationGroupEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/aws/ElasticacheReplicationGroupEncryptionAtRest.py:7-14 | checkov/terraform/checks/resource/aws/ElasticacheReplicationGroupEncryptionAtTransit.py:7-14 | checkov/terraform/checks/resource/aws/FSXOntapFSEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/aws/FSXOpenZFSFileSystemEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/aws/FSXWindowsFSEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/aws/ImagebuilderComponentEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/aws/KMSRotation.py:7-22 | checkov/terraform/checks/resource/aws/KendraIndexSSEUsesCMK.py:8-18 | checkov/terraform/checks/resource/aws/KinesisStreamEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/aws/KinesisStreamEncryptionType.py:7-17 | checkov/terraform/checks/resource/aws/KinesisVideoEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/aws/LustreFSEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/aws/MQBrokerEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/aws/MemoryDBEncryptionWithCMK.py:8-18 | checkov/terraform/checks/resource/aws/NeptuneClusterStorageEncrypted.py:7-14 | checkov/terraform/checks/resource/aws/RDSClusterEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/aws/RDSClusterSnapshotEncrypted.py:7-14 | checkov/terraform/checks/resource/aws/RDSEncryption.py:7-14 | checkov/terraform/checks/resource/aws/RedshiftClusterEncryption.py:7-14 | checkov/terraform/checks/resource/aws/RedshiftClusterKMSKey.py:8-18 | checkov/terraform/checks/resource/aws/S3BucketObjectEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/aws/S3ObjectCopyEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/aws/SagemakerDataQualityJobDefinitionEncryption.py:8-18 | checkov/terraform/checks/resource/aws/SagemakerDataQualityJobDefinitionTrafficEncryption.py:7-14 | checkov/terraform/checks/resource/aws/SagemakerDataQualityJobDefinitionVolumeEncryption.py:8-18 | checkov/terraform/checks/resource/aws/SagemakerEndpointConfigurationEncryption.py:9-19 | checkov/terraform/checks/resource/aws/SagemakerFlowDefinitionUsesKMS.py:8-18 | checkov/terraform/checks/resource/aws/SagemakerNotebookEncryption.py:8-18 | checkov/terraform/checks/resource/aws/SagemakerNotebookInstanceAllowsIMDSv2.py:7-17 | checkov/terraform/checks/resource/aws/TimestreamDatabaseKMSKey.py:10-20 | checkov/terraform/checks/resource/aws/WorkspaceRootVolumeEncrypted.py:7-17 | checkov/terraform/checks/resource/aws/WorkspaceUserVolumeEncrypted.py:7-17 | checkov/terraform/checks/resource/azure/AzureBatchAccountUsesKeyVaultEncryption.py:8-18 | checkov/terraform/checks/resource/azure/AzureDataExplorerDoubleEncryptionEnabled.py:7-17 | checkov/terraform/checks/resource/azure/DataExplorerUsesDiskEncryption.py:7-14 | checkov/terraform/checks/resource/azure/MySQLEncryptionEnabled.py:7-14 | checkov/terraform/checks/resource/azure/SynapseWorkspaceCMKEncryption.py:8-18 | checkov/terraform/checks/resource/gcp/ArtifactRegsitryEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/gcp/BigQueryDatasetEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/gcp/BigQueryTableEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/gcp/BigTableInstanceEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/gcp/CloudPubSubEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/gcp/DataflowJobEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/gcp/DataprocClusterEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/gcp/GoogleCloudDNSSECEnabled.py:12-34 | checkov/terraform/checks/resource/gcp/GoogleComputeDiskEncryption.py:8-18 | checkov/terraform/checks/resource/gcp/GoogleKMSPreventDestroy.py:13-20 | checkov/terraform/checks/resource/gcp/SpannerDatabaseEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/gcp/VertexAIDatasetEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/gcp/VertexAIMetadataStoreEncryptedWithCMK.py:8-18 | checkov/terraform/checks/resource/oci/FileSystemEncryption.py:8-18 | checkov/terraform/checks/resource/oci/InstanceBootVolumeIntransitEncryption.py:7-17 | checkov/terraform/checks/resource/oci/ObjectStorageEncryption.py:8-18 | checkov/terraform/checks/resource/tencentcloud/CBSEncryption.py:10-20 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 98 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 98 times. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (8 lines × 17) · ×1
  • Duplicated block (8 lines × 17) checkov/arm/checks/resource/PubsubSpecifyIdentity.py:10 — checkov/arm/checks/resource/PubsubSpecifyIdentity.py:10-20 | checkov/cloudformation/checks/resource/aws/QLDBLedgerPermissionsMode.py:7-17 | checkov/cloudformation/checks/resource/aws/RDSClusterIAMAuthentication.py:7-14 | checkov/terraform/checks/resource/alicloud/RAMPasswordPolicyLowercaseLetter.py:7-14 | checkov/terraform/checks/resource/alicloud/RAMPasswordPolicyNumber.py:7-14 | checkov/terraform/checks/resource/alicloud/RAMPasswordPolicySymbol.py:7-14 | checkov/terraform/checks/resource/alicloud/RAMPasswordPolicyUppcaseLetter.py:7-14 | checkov/terraform/checks/resource/aws/IAMUserRootAccessKeys.py:9-19 | checkov/terraform/checks/resource/aws/PasswordPolicyLowercaseLetter.py:7-14 | checkov/terraform/checks/resource/aws/PasswordPolicyNumber.py:7-14 | checkov/terraform/checks/resource/aws/PasswordPolicySymbol.py:7-14 | checkov/terraform/checks/resource/aws/PasswordPolicyUppercaseLetter.py:7-14 | checkov/terraform/checks/resource/aws/QLDBLedgerPermissionsMode.py:7-17 | checkov/terraform/checks/resource/aws/RDSClusterIAMAuthentication.py:7-14 | checkov/terraform/checks/resource/aws/RDSIAMAuthentication.py:9-23 | checkov/terraform/checks/resource/azure/ACRAdminAccountDisabled.py:8-18 | checkov/terraform/checks/resource/azure/AKSLocalAdminDisabled.py:7-17 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 17 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 17 times. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (8 lines × 51) · ×1
  • Duplicated block (8 lines × 51) checkov/arm/checks/resource/CosmosDBDisablesPublicNetwork.py:7 — checkov/arm/checks/resource/CosmosDBDisablesPublicNetwork.py:7-17 | checkov/arm/checks/resource/KeyVaultEnablesPurgeProtection.py:9-19 | checkov/arm/checks/resource/MariaDBSSLEnforcementEnabled.py:9-19 | checkov/arm/checks/resource/MySQLServerSSLEnforcementEnabled.py:9-19 | checkov/arm/checks/resource/PostgreSQLServerSSLEnforcementEnabled.py:9-19 | checkov/arm/checks/resource/SynapseWorkspaceEnablesManagedVirtualNetworks.py:11-21 | checkov/cloudformation/checks/resource/aws/MSKClusterNodesArePrivate.py:9-19 | checkov/cloudformation/checks/resource/aws/RedshiftClusterPubliclyAccessible.py:7-17 | checkov/cloudformation/checks/resource/aws/RedshiftInEc2ClassicMode.py:8-18 | checkov/cloudformation/checks/resource/aws/SagemakerModelWithNetworkIsolation.py:7-14 | checkov/cloudformation/checks/resource/aws/VPCEndpointAcceptanceConfigured.py:7-14 | checkov/terraform/checks/resource/alicloud/ALBACLIsUnrestricted.py:7-17 | checkov/terraform/checks/resource/alicloud/MongoDBInstanceSSL.py:8-18 | checkov/terraform/checks/resource/alicloud/RDSInstanceSSL.py:8-18 | checkov/terraform/checks/resource/alicloud/TLSPoliciesAreSecure.py:7-17 | checkov/terraform/checks/resource/aws/AutoScalingGroupWithPublicAccess.py:8-18 | checkov/terraform/checks/resource/aws/DMSReplicationInstancePubliclyAccessible.py:7-17 | checkov/terraform/checks/resource/aws/EMRPubliclyAccessible.py:8-15 | checkov/terraform/checks/resource/aws/RedshiftInEc2ClassicMode.py:8-18 | checkov/terraform/checks/resource/aws/RedshitClusterPubliclyAvailable.py:7-17 | checkov/terraform/checks/resource/aws/SagemakerModelWithNetworkIsolation.py:7-14 | checkov/terraform/checks/resource/aws/SubnetPublicIP.py:7-17 | checkov/terraform/checks/resource/aws/VPCEndpointAcceptanceConfigured.py:7-14 | checkov/terraform/checks/resource/azure/ACRPublicNetworkAccessDisabled.py:7-17 | checkov/terraform/checks/resource/azure/AKSEnablesPrivateClusters.py:7-14 | checkov/terraform/checks/resource/azure/APIServicesUseVirtualNetwork.py:8-18 | checkov/terraform/checks/resource/azure/AzureContainerGroupDeployedIntoVirtualNetwork.py:12-22 | checkov/terraform/checks/resource/azure/AzureFirewallDefinesPolicy.py:9-19 | checkov/terraform/checks/resource/azure/AzureFirewallPolicyIDPSDeny.py:8-18 | checkov/terraform/checks/resource/azure/AzureFrontDoorEnablesWAF.py:8-18 | checkov/terraform/checks/resource/azure/AzureSearchPublicNetworkAccessDisabled.py:7-17 | checkov/terraform/checks/resource/azure/CognitiveServicesConfigureIdentity.py:8-18 | checkov/terraform/checks/resource/azure/CognitiveServicesDisablesPublicNetwork.py:7-17 | checkov/terraform/checks/resource/azure/CosmosDBDisablesPublicNetwork.py:7-17 | checkov/terraform/checks/resource/azure/CosmosDBHaveCMK.py:8-18 | checkov/terraform/checks/resource/azure/KeyVaultEnablesFirewallRulesSettings.py:7-17 | checkov/terraform/checks/resource/azure/KeyVaultEnablesPurgeProtection.py:7-14 | checkov/terraform/checks/resource/azure/MSSQLServerMinTLSVersion.py:7-17 | checkov/terraform/checks/resource/azure/MariaDBSSLEnforcementEnabled.py:7-14 | checkov/terraform/checks/resource/azure/MySQLServerSSLEnforcementEnabled.py:7-14 | checkov/terraform/checks/resource/azure/PostgreSQLServerSSLEnforcementEnabled.py:7-14 | checkov/terraform/checks/resource/azure/SpringCloudAPIPortalPublicAccessIsDisabled.py:8-18 | checkov/terraform/checks/resource/azure/SynapseWorkspaceEnablesManagedVirtualNetworks.py:7-14 | checkov/terraform/checks/resource/gcp/GoogleComputeProjectOSLogin.py:7-17 | checkov/terraform/checks/resource/panos/InterfaceMgmtProfileNoHTTP.py:7-17 | checkov/terraform/checks/resource/panos/InterfaceMgmtProfileNoTelnet.py:7-17 | checkov/terraform/checks/resource/tencentcloud/CDBInternetService.py:10-20 | checkov/terraform/checks/resource/tencentcloud/CDBIntranetPort.py:10-20 | checkov/terraform/checks/resource/tencentcloud/CLBListenerProtocol.py:10-20 | checkov/terraform/checks/resource/tencentcloud/CVMAllocatePublicIp.py:10-20 | checkov/terraform/checks/resource/tencentcloud/VPCFlowLogConfigEnable.py:10-20 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 51 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 51 times. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (8 lines × 14) · ×1
  • Duplicated block (8 lines × 14) checkov/cloudformation/checks/resource/aws/AppSyncFieldLevelLogs.py:9 — checkov/cloudformation/checks/resource/aws/AppSyncFieldLevelLogs.py:9-19 | checkov/cloudformation/checks/resource/aws/AppSyncLogging.py:10-20 | checkov/cloudformation/checks/resource/aws/CloudtrailEncryption.py:10-20 | checkov/cloudformation/checks/resource/aws/RDSEnhancedMonitorEnabled.py:11-22 | checkov/cloudformation/checks/resource/aws/S3PublicACLWrite.py:9-19 | checkov/terraform/checks/resource/alicloud/LogAuditRDSEnabled.py:7-14 | checkov/terraform/checks/resource/alicloud/OSSBucketAccessLogs.py:10-20 | checkov/terraform/checks/resource/aws/APIGatewayMethodSettingsDataTrace.py:7-17 | checkov/terraform/checks/resource/aws/AppSyncFieldLevelLogs.py:9-19 | checkov/terraform/checks/resource/aws/AppSyncLogging.py:10-20 | checkov/terraform/checks/resource/aws/MQBrokerAuditLogging.py:11-25 | checkov/terraform/checks/resource/aws/MWAAWebserverLogsEnabled.py:7-14 | checkov/terraform/checks/resource/gcp/GoogleSubnetworkLoggingEnabled.py:13-30 | checkov/terraform/checks/resource/oci/InstanceMonitoringEnabled.py:11-21 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 14 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 14 times. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (28 lines × 2) · ×1
  • Duplicated block (28 lines × 2) checkov/terraform/checks/resource/alicloud/RAMPasswordPolicyExpiration.py:8 — checkov/terraform/checks/resource/alicloud/RAMPasswordPolicyExpiration.py:8-35 | checkov/terraform/checks/resource/aws/PasswordPolicyExpiration.py:8-35 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (28 lines × 4) · ×1
  • Duplicated block (28 lines × 4) checkov/terraform/checks/resource/alicloud/RAMPasswordPolicyLength.py:8 — checkov/terraform/checks/resource/alicloud/RAMPasswordPolicyLength.py:8-35 | checkov/terraform/checks/resource/alicloud/RAMPasswordPolicyReuse.py:8-35 | checkov/terraform/checks/resource/aws/PasswordPolicyLength.py:8-35 | checkov/terraform/checks/resource/aws/PasswordPolicyReuse.py:8-35 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times.
D4 · Code Duplication · Duplicated block (12 lines × 8) · ×1
  • Duplicated block (12 lines × 8) checkov/arm/checks/resource/SQLServerUsesADAuth.py:12 — checkov/arm/checks/resource/SQLServerUsesADAuth.py:12-26 | checkov/terraform/checks/resource/aws/APIGatewayCreateBeforeDestroy.py:8-19 | checkov/terraform/checks/resource/aws/CloudWatchAlarmsEnabled.py:7-22 | checkov/terraform/checks/resource/aws/CloudfrontDistributionDefaultRoot.py:9-23 | checkov/terraform/checks/resource/aws/CodeBuildPrivilegedMode.py:7-22 | checkov/terraform/checks/resource/aws/EFSAccessUserIdentity.py:9-23 | checkov/terraform/checks/resource/aws/Ec2TransitGatewayAutoAccept.py:8-22 | checkov/terraform/checks/resource/aws/SSMDocumentsArePrivate.py:9-25 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 8 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 8 times. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (14 lines × 4) · ×1
  • Duplicated block (14 lines × 4) checkov/terraform/checks/resource/azure/AppServicePlanZoneRedundant.py:9 — checkov/terraform/checks/resource/azure/AppServicePlanZoneRedundant.py:9-23 | checkov/terraform/checks/resource/azure/EventHubNamespaceZoneRedundant.py:54-67 | checkov/terraform/checks/resource/azure/RedisCacheStandardReplicationEnabled.py:11-32 | checkov/terraform/checks/resource/azure/SQLDatabaseZoneRedundant.py:9-40 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (15 lines × 7) · ×1
  • Duplicated block (15 lines × 7) checkov/terraform/checks/resource/azure/AzureDefenderOnAppServices.py:11 — checkov/terraform/checks/resource/azure/AzureDefenderOnAppServices.py:11-25 | checkov/terraform/checks/resource/azure/AzureDefenderOnContainerRegistry.py:11-25 | checkov/terraform/checks/resource/azure/AzureDefenderOnKeyVaults.py:11-25 | checkov/terraform/checks/resource/azure/AzureDefenderOnKubernetes.py:11-25 | checkov/terraform/checks/resource/azure/AzureDefenderOnServers.py:11-25 | checkov/terraform/checks/resource/azure/AzureDefenderOnSqlServers.py:11-25 | checkov/terraform/checks/resource/azure/AzureDefenderOnStorage.py:11-25 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 7 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (13 lines × 3) · ×1
  • Duplicated block (13 lines × 3) checkov/terraform/checks/resource/azure/PostgreSQLServerLogCheckpointsEnabled.py:8 — checkov/terraform/checks/resource/azure/PostgreSQLServerLogCheckpointsEnabled.py:8-20 | checkov/terraform/checks/resource/azure/PostgreSQLServerLogConnectionsEnabled.py:8-20 | checkov/terraform/checks/resource/azure/PostgreSQLServerLogRetentionEnabled.py:8-20 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (5 lines × 12) · ×1
  • Duplicated block (5 lines × 12) checkov/arm/checks/resource/AppServiceAuthentication.py:13 — checkov/arm/checks/resource/AppServiceAuthentication.py:13-17 | checkov/terraform/checks/resource/aws/S3ProtectAgainstPolicyLockout.py:13-17 | checkov/terraform/checks/resource/aws/SQSQueuePolicyAnyPrincipal.py:13-17 | checkov/terraform/checks/resource/gcp/GoogleFolderBasicRole.py:7-11 | checkov/terraform/checks/resource/gcp/GoogleFolderImpersonationRole.py:7-11 | checkov/terraform/checks/resource/gcp/GoogleFolderMemberDefaultServiceAccount.py:7-11 | checkov/terraform/checks/resource/gcp/GoogleOrgBasicRole.py:7-11 | checkov/terraform/checks/resource/gcp/GoogleOrgImpersonationRole.py:7-11 | checkov/terraform/checks/resource/gcp/GoogleOrgMemberDefaultServiceAccount.py:7-11 | checkov/terraform/checks/resource/gcp/GoogleProjectBasicRole.py:7-11 | checkov/terraform/checks/resource/gcp/GoogleProjectImpersonationRole.py:7-11 | checkov/terraform/checks/resource/gcp/GoogleProjectMemberDefaultServiceAccount.py:7-11 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 12 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 12 times.
D4 · Code Duplication · Duplicated block (5 lines × 5) · ×1
  • Duplicated block (5 lines × 5) checkov/arm/checks/resource/FrontDoorWAFACLCVE202144228.py:10 — checkov/arm/checks/resource/FrontDoorWAFACLCVE202144228.py:10-14 | checkov/cloudformation/checks/resource/aws/WAFACLCVE202144228.py:9-13 | checkov/terraform/checks/resource/aws/WAFACLCVE202144228.py:10-14 | checkov/terraform/checks/resource/aws/WAFEnabled.py:10-14 | checkov/terraform/checks/resource/azure/FrontDoorWAFACLCVE202144228.py:10-14 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 5 times.
D4 · Code Duplication · Duplicated block (5 lines × 16) · ×1
  • Duplicated block (5 lines × 16) checkov/arm/checks/resource/PostgreSQLServerConnectionThrottlingEnabled.py:13 — checkov/arm/checks/resource/PostgreSQLServerConnectionThrottlingEnabled.py:13-17 | checkov/arm/checks/resource/PostgreSQLServerLogCheckpointsEnabled.py:14-18 | checkov/arm/checks/resource/PostgreSQLServerLogConnectionsEnabled.py:14-18 | checkov/cloudformation/checks/resource/aws/EC2PublicIP.py:11-15 | checkov/terraform/checks/resource/azure/AppServicePublicAccessDisabled.py:9-13 | checkov/terraform/checks/resource/gcp/CloudFunctionPermissiveIngress.py:9-13 | checkov/terraform/checks/resource/panos/NetworkIPsecAlgorithms.py:11-15 | checkov/terraform/checks/resource/panos/NetworkIPsecAuthAlgorithms.py:11-15 | checkov/terraform/checks/resource/panos/PolicyDescription.py:11-15 | checkov/terraform/checks/resource/panos/PolicyLogForwarding.py:11-15 | checkov/terraform/checks/resource/panos/PolicyLoggingEnabled.py:11-15 | checkov/terraform/checks/resource/panos/PolicyNoApplicationAny.py:11-15 | checkov/terraform/checks/resource/panos/PolicyNoDSRI.py:11-15 | checkov/terraform/checks/resource/panos/PolicyNoServiceAny.py:11-15 | checkov/terraform/checks/resource/panos/PolicyNoSrcAnyDstAny.py:11-15 | checkov/terraform/checks/resource/panos/ZoneUserIDIncludeACL.py:11-15 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 16 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 16 times.
D4 · Code Duplication · Duplicated block (8 lines × 5) · ×1
  • Duplicated block (8 lines × 5) checkov/github_actions/checks/job/AllowUnsecureCommandsOnJob.py:13 — checkov/github_actions/checks/job/AllowUnsecureCommandsOnJob.py:13-20 | checkov/github_actions/checks/job/ReverseShellNetcat.py:15-22 | checkov/github_actions/checks/job/ShellInjection.py:14-21 | checkov/github_actions/checks/job/SuspectCurlInScript.py:12-19 | checkov/gitlab_ci/checks/job/DetectImagesUsage.py:12-19 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 5 times.
D4 · Code Duplication · Duplicated block (17 lines × 6) · ×1
  • Duplicated block (17 lines × 6) checkov/kubernetes/checks/resource/k8s/DockerSocketVolume.py:12 — checkov/kubernetes/checks/resource/k8s/DockerSocketVolume.py:12-30 | checkov/kubernetes/checks/resource/k8s/PodSecurityContext.py:13-30 | checkov/kubernetes/checks/resource/k8s/ServiceAccountTokens.py:13-30 | checkov/kubernetes/checks/resource/k8s/ShareHostIPC.py:14-30 | checkov/kubernetes/checks/resource/k8s/ShareHostPID.py:14-30 | checkov/kubernetes/checks/resource/k8s/SharedHostNetworkNamespace.py:14-30 — before extracting anything, compare `checkov/kubernetes/checks/resource/k8s/ShareHostIPC.py` and `checkov/kubernetes/checks/resource/k8s/ShareHostPID.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (8 lines × 9) · ×1
  • Duplicated block (8 lines × 9) checkov/terraform/checks/resource/aws/AutoScalingLaunchTemplate.py:7 — checkov/terraform/checks/resource/aws/AutoScalingLaunchTemplate.py:7-15 | checkov/terraform/checks/resource/aws/CloudfrontDistributionOriginFailover.py:7-15 | checkov/terraform/checks/resource/aws/ECSContainerHostProcess.py:9-17 | checkov/terraform/checks/resource/aws/ECSContainerPrivilege.py:9-18 | checkov/terraform/checks/resource/aws/ECSContainerReadOnlyRoot.py:9-18 | checkov/terraform/checks/resource/aws/ElasticBeanstalkUseEnhancedHealthChecks.py:9-16 | checkov/terraform/checks/resource/aws/ElasticBeanstalkUseManagedUpdates.py:7-15 | checkov/terraform/checks/resource/aws/RDSClusterCopyTags.py:7-15 | checkov/terraform/checks/resource/aws/S3AbortIncompleteUploads.py:11-19 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 9 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (6 lines × 17) · ×1
  • Duplicated block (6 lines × 17) checkov/terraform/checks/resource/kubernetes/AllowPrivilegeEscalation.py:15 — checkov/terraform/checks/resource/kubernetes/AllowPrivilegeEscalation.py:15-20 | checkov/terraform/checks/resource/kubernetes/AllowedCapabilities.py:9-18 | checkov/terraform/checks/resource/kubernetes/AllowedCapabilitiesSysAdmin.py:8-16 | checkov/terraform/checks/resource/kubernetes/CPULimits.py:11-16 | checkov/terraform/checks/resource/kubernetes/CPURequests.py:7-12 | checkov/terraform/checks/resource/kubernetes/ContainerSecurityContext.py:9-17 | checkov/terraform/checks/resource/kubernetes/DangerousGitSync.py:8-14 | checkov/terraform/checks/resource/kubernetes/DefaultNamespace.py:8-25 | checkov/terraform/checks/resource/kubernetes/DefaultServiceAccountBinding.py:8-14 | checkov/terraform/checks/resource/kubernetes/MemoryLimits.py:7-12 | checkov/terraform/checks/resource/kubernetes/MemoryRequests.py:7-12 | checkov/terraform/checks/resource/kubernetes/MinimiseCapabilities.py:9-15 | checkov/terraform/checks/resource/kubernetes/PrivilegedContainer.py:10-16 | checkov/terraform/checks/resource/kubernetes/ReadonlyRootFilesystem.py:8-14 | checkov/terraform/checks/resource/kubernetes/Secrets.py:9-15 | checkov/terraform/checks/resource/kubernetes/ShareHostIPC.py:12-17 | checkov/terraform/checks/resource/kubernetes/Tiller.py:11-16 — before extracting anything, compare `checkov/terraform/checks/resource/kubernetes/AllowPrivilegeEscalation.py` and `checkov/terraform/checks/resource/kubernetes/CPULimits.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (10 lines × 7) · ×1
  • Duplicated block (10 lines × 7) checkov/arm/base_parameter_check.py:23 — checkov/arm/base_parameter_check.py:23-32 | checkov/bicep/checks/param/base_param_check.py:30-39 | checkov/bicep/checks/resource/base_resource_check.py:24-33 | checkov/cloudformation/checks/resource/base_resource_check.py:19-28 | checkov/dockerfile/base_dockerfile_check.py:24-33 | checkov/terraform/checks/provider/base_check.py:19-28 | checkov/terraform/checks/resource/base_resource_check.py:21-30 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 7 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 7 times.
D4 · Code Duplication · Duplicated block (6 lines × 4) · ×1
  • Duplicated block (6 lines × 4) checkov/terraform/checks/resource/azure/AppServiceClientCertificate.py:7 — checkov/terraform/checks/resource/azure/AppServiceClientCertificate.py:7-12 | checkov/terraform/checks/resource/azure/AppServiceDetailedErrorMessagesEnabled.py:7-12 | checkov/terraform/checks/resource/azure/AppServiceDisallowCORS.py:7-12 | checkov/terraform/checks/resource/azure/AppServiceMinTLSVersion.py:9-14 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (4 members, 50+ identical tokens) cdk_integration_tests/src/python/RDSEnhancedMonitorEnabled/fail__1__.py:7 — cdk_integration_tests/src/python/RDSEnhancedMonitorEnabled/fail__1__.py:7-24 | cdk_integration_tests/src/python/RDSEnhancedMonitorEnabled/pass.py:7-25 | cdk_integration_tests/src/python/RDSPubliclyAccessible/fail__1__.py:7-25 | cdk_integration_tests/src/python/RDSPubliclyAccessible/pass.py:7-25 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Edited copies of one member (4 members, 13+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 13+ corresponding lines) cdk_integration_tests/src/python/AppSyncFieldLevelLogs/fail__1__.py:7 — cdk_integration_tests/src/python/AppSyncFieldLevelLogs/fail__1__.py:7-19 | cdk_integration_tests/src/python/AppSyncFieldLevelLogs/pass.py:7-20 | cdk_integration_tests/src/python/AppSyncLogging/fail__1__.py:7-19 | cdk_integration_tests/src/python/AppSyncLogging/pass.py:7-20 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 9+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 9+ corresponding lines) cdk_integration_tests/src/python/ECRImageScanning/pass.py:7 — cdk_integration_tests/src/python/ECRImageScanning/pass.py:7-15 | cdk_integration_tests/src/python/ECRImmutableTags/fail__1__.py:7-15 | cdk_integration_tests/src/python/ECRImmutableTags/pass.py:7-15 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (34 lines × 2) · ×1
  • Duplicated block (34 lines × 2) cdk_integration_tests/src/python/CloudfrontDistributionEncryption/fail__2__.py:6 — cdk_integration_tests/src/python/CloudfrontDistributionEncryption/fail__2__.py:6-40 | cdk_integration_tests/src/python/CloudfrontDistributionEncryption/pass.py:6-39 — before extracting anything, compare `cdk_integration_tests/src/python/CloudfrontDistributionEncryption/fail__2__.py` and `cdk_integration_tests/src/python/CloudfrontDistributionEncryption/pass.py` as WHOLE FILES: 96% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (38 lines × 2) · ×1
  • Duplicated block (38 lines × 2) cdk_integration_tests/src/python/EC2PublicIP/fail__2__.py:6 — cdk_integration_tests/src/python/EC2PublicIP/fail__2__.py:6-43 | cdk_integration_tests/src/python/EC2PublicIP/pass.py:6-46 — before extracting anything, compare `cdk_integration_tests/src/python/EC2PublicIP/fail__2__.py` and `cdk_integration_tests/src/python/EC2PublicIP/pass.py` as WHOLE FILES: 94% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (43 lines × 2) · ×1
  • Duplicated block (43 lines × 2) cdk_integration_tests/src/python/ElasticsearchDomainLogging/fail__2__.py:7 — cdk_integration_tests/src/python/ElasticsearchDomainLogging/fail__2__.py:7-49 | cdk_integration_tests/src/python/ElasticsearchDomainLogging/pass.py:7-49 — before extracting anything, compare `cdk_integration_tests/src/python/ElasticsearchDomainLogging/fail__2__.py` and `cdk_integration_tests/src/python/ElasticsearchDomainLogging/pass.py` as WHOLE FILES: 97% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (37 lines × 2) · ×1
  • Duplicated block (37 lines × 2) cdk_integration_tests/src/python/RedShiftSSL/fail__2__.py:6 — cdk_integration_tests/src/python/RedShiftSSL/fail__2__.py:6-42 | cdk_integration_tests/src/python/RedShiftSSL/pass.py:6-83 — before extracting anything, compare `cdk_integration_tests/src/python/RedShiftSSL/fail__2__.py` and `cdk_integration_tests/src/python/RedShiftSSL/pass.py` as WHOLE FILES: 85% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D44 · Platform End-of-Life · End-of-life runtime · ×1
  • End-of-life runtime: .NET net7.0 tests/sca_package_2/examples/Microsoft.NET.Sdk.csproj:4 — tests/sca_package_2/examples/Microsoft.NET.Sdk.csproj declares .NET net7.0 as this project's target framework, and .NET 7, support ended 2024-05-14. An unsupported runtime receives no security patches, so every vulnerability disclosed in it since 2024-05-14 is present and unfixable without moving off it. This is a migration rather than an upgrade: there is no newer release of a runtime that has ended.
D6 · Cohesion (LCOM4) · Low cohesion · ×1
  • Low cohesion: CloudformationVariableRenderer (LCOM4 5) checkov/cloudformation/graph_builder/variable_rendering/renderer.py:34 — CloudformationVariableRenderer's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
P12 · CI test-gate honesty · Coverage collected but not gated · ×1
  • Coverage collected but not gated — CI collects a coverage report but no step enforces a minimum — coverage could halve and CI stays green. Add a step that fails the build when coverage drops below a floor (your coverage tool's minimum-threshold flag, or a coverage-gate action) so the number guards something. What was searched, so you can tell an absence from a miss: this repository's CI files AND its coverage configuration — the well-known coverage and test-runner config files, read at the repository root and inside workspace package directories two levels down, so a floor declared beside the tests rather than in the pipeline is credited — matched against the threshold settings this check knows by name. A floor set in your coverage service's web UI rather than in a committed file, or under a setting whose name is not one of those, is not seen here.
R2 · Cyclomatic Complexity · Complex function processFile (cyclomatic 13, cognitive 19) · ×1
  • Complex function processFile (cyclomatic 13, cognitive 19) dangerfile.ts:56 — processFile has cyclomatic complexity 13 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R8 · Dependency Hygiene · Unused dependency 'express' · ×1
  • Unused dependency 'express' tests/sca_package_2/examples/package.json:23 — Declared in tests/sca_package_2/examples/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency 'lodash' · ×1
  • Unused dependency 'lodash' tests/sca_package_2/examples/package.json:24 — Declared in tests/sca_package_2/examples/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
SC1 · Supply-chain hygiene · NuGet dependencies are not locked · ×1
  • NuGet dependencies are not locked tests/sca_package_2/examples/Microsoft.NET.Sdk.csproj:9 — tests/sca_package_2/examples/Microsoft.NET.Sdk.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
Minor — 179 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×40
  • Duplicated predicate checkov/terraform/checks/resource/alicloud/MongoDBIsPublic.py:17 — `"0.0.0.0" in addresses or "0.0.0.0/0" in addresses` appears character-identically in 2 files — checkov/terraform/checks/resource/alicloud/MongoDBIsPublic.py, checkov/terraform/checks/resource/alicloud/RDSIsPublic.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate checkov/terraform/checks/resource/azure/VnetLocalDNS.py:23 — `"dns_servers" in conf and conf["dns_servers"] and isinstance(conf["dns_servers"], list)` appears character-identically in 2 files — checkov/terraform/checks/resource/azure/VnetLocalDNS.py, checkov/terraform/checks/resource/azure/VnetSingleDNSServer.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate checkov/kubernetes/checks/resource/k8s/Seccomp.py:101 — `"docker/default" in annotation[key] or "runtime/default" in annotation[key]` appears character-identically in 2 files — checkov/kubernetes/checks/resource/k8s/Seccomp.py, checkov/kubernetes/checks/resource/k8s/SeccompPSP.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate checkov/terraform/checks/resource/kubernetes/ReadinessProbe.py:19 — `"kubernetes_deployment" == self.entity_type or "kubernetes_deployment_v1" == self.entity_type` appears character-identically in 4 files — checkov/terraform/checks/resource/kubernetes/ReadinessProbe.py, checkov/terraform/checks/resource/kubernetes/ShareHostIPC.py, checkov/terraform/checks/resource/kubernetes/ShareHostPID.py, checkov/terraform/checks/resource/kubernetes/SharedHostNetworkNamespace.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate checkov/terraform/checks/resource/kubernetes/Tiller.py:19 — `"metadata" in conf and isinstance(conf["metadata"], list)` appears character-identically in 2 files — checkov/terraform/checks/resource/kubernetes/Tiller.py, checkov/terraform/checks/resource/kubernetes/TillerService.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate checkov/helm/base_registry.py:59 — `"metadata" in entity_configuration and "namespace" in entity_configuration["metadata"]` appears character-identically in 2 files — checkov/helm/base_registry.py, checkov/kubernetes/checks/resource/base_registry.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate checkov/helm/base_registry.py:62 — `"parent_metadata" in entity_configuration and "namespace" in entity_configuration["parent_metadata"]` appears character-identically in 2 files — checkov/helm/base_registry.py, checkov/kubernetes/checks/resource/base_registry.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate checkov/arm/checks/resource/VnetLocalDNS.py:22 — `"properties" in conf and "dhcpOptions" in conf["properties"]` appears character-identically in 2 files — checkov/arm/checks/resource/VnetLocalDNS.py, checkov/arm/checks/resource/VnetSingleDNSServer.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate checkov/arm/checks/resource/PostgreSQLServerConnectionThrottlingEnabled.py:24 — `"value" in conf["properties"] and conf["properties"]["value"].lower() == "on"` appears character-identically in 3 files — checkov/arm/checks/resource/PostgreSQLServerConnectionThrottlingEnabled.py, checkov/arm/checks/resource/PostgreSQLServerLogCheckpointsEnabled.py, checkov/arm/checks/resource/PostgreSQLServerLogConnectionsEnabled.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate checkov/terraform/checks/resource/aws/IAMRoleAllowsPublicAssume.py:23 — `'Effect' in statement and statement['Effect'] == 'Deny'` appears character-identically in 2 files — checkov/terraform/checks/resource/aws/IAMRoleAllowsPublicAssume.py, checkov/terraform/checks/resource/aws/KMSKeyWildcardPrincipal.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate checkov/terraform/module_loading/loaders/git_loader.py:204 — `'File exists' not in str_e and 'already exists and is not an empty directory' not in str_e` appears character-identically in 2 files — checkov/terraform/module_loading/loaders/git_loader.py, checkov/terraform/module_loading/loaders/registry_loader.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate checkov/terraform/checks/resource/gcp/AbsGooglePostgresqlDatabaseFlags.py:12 — `'database_version' in conf.keys() and isinstance(conf['database_version'][0], str) and 'POSTGRES' in conf['database_version'][0]` appears character-identically in 8 files — checkov/terraform/checks/resource/gcp/AbsGooglePostgresqlDatabaseFlags.py, checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogCheckpoints.py, checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogConnection.py, checkov/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogDisconnection.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate checkov/terraform/checks/resource/gcp/GoogleCloudSqlDatabaseRequireSsl.py:33 — `'database_version' in conf.keys() and isinstance(conf['database_version'][0], str) and 'SQLSERVER' in conf['database_version'][0]` appears character-identically in 3 files — checkov/terraform/checks/resource/gcp/GoogleCloudSqlDatabaseRequireSsl.py, checkov/terraform/checks/resource/gcp/GoogleCloudSqlServerContainedDBAuthentication.py, checkov/terraform/checks/resource/gcp/GoogleCloudSqlServerCrossDBOwnershipChaining.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate checkov/terraform/checks/resource/azure/AppGWUseWAFMode.py:18 — `'enabled' in policy_settings and not policy_settings['enabled'][0]` appears character-identically in 2 files — checkov/terraform/checks/resource/azure/AppGWUseWAFMode.py, checkov/terraform/checks/resource/azure/FrontdoorUseWAFMode.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate checkov/terraform/checks/resource/aws/AbsSecurityGroupUnrestrictedEgress.py:71 — `'from_port' in conf or 'to_port' in conf` appears character-identically in 2 files — checkov/terraform/checks/resource/aws/AbsSecurityGroupUnrestrictedEgress.py, checkov/terraform/checks/resource/aws/AbsSecurityGroupUnrestrictedIngress.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate checkov/terraform/checks/resource/azure/AppGWUseWAFMode.py:16 — `'policy_settings' in conf and conf['policy_settings'][0]` appears character-identically in 2 files — checkov/terraform/checks/resource/azure/AppGWUseWAFMode.py, checkov/terraform/checks/resource/azure/FrontdoorUseWAFMode.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate checkov/terraform/checks/resource/gcp/GoogleComputeBlockProjectSSH.py:17 — `'source_instance_template' in conf.keys() and 'metadata' not in conf.keys()` appears character-identically in 3 files — checkov/terraform/checks/resource/gcp/GoogleComputeBlockProjectSSH.py, checkov/terraform/checks/resource/gcp/GoogleComputeInstanceOSLogin.py, checkov/terraform/checks/resource/gcp/GoogleComputeSerialPorts.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate checkov/ansible/graph_builder/local_graph.py:49 — `ResourceType.BLOCK in task and isinstance(task[ResourceType.BLOCK], list)` appears character-identically in 2 files — checkov/ansible/graph_builder/local_graph.py, checkov/ansible/utils.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate checkov/terraform/plan_parser.py:123 — `_is_simple_type(value) or _is_list_of_simple_types(value)` appears character-identically in 2 files — checkov/terraform/plan_parser.py, checkov/terraform_json/parser.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate checkov/cloudformation/checks/resource/aws/ALBListenerHTTPS.py:35 — `action in ConditionFunctions.__dict__.values() or action in IntrinsicFunctions.__dict__.values()` appears character-identically in 2 files — checkov/cloudformation/checks/resource/aws/ALBListenerHTTPS.py, checkov/cloudformation/checks/resource/aws/ALBListenerTLS12.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate checkov/terraform/checks/resource/aws/DLMEventsCrossRegionEncryption.py:21 — `action.get("cross_region_copy") and isinstance(action.get("cross_region_copy"), list)` appears character-identically in 2 files — checkov/terraform/checks/resource/aws/DLMEventsCrossRegionEncryption.py, checkov/terraform/checks/resource/aws/DLMEventsCrossRegionEncryptionWithCMK.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate checkov/terraform/checks/resource/azure/AKSDashboardDisabled.py:19 — `addon_profile and isinstance(addon_profile, dict)` appears character-identically in 2 files — checkov/terraform/checks/resource/azure/AKSDashboardDisabled.py, checkov/terraform/checks/resource/azure/AKSUsesAzurePoliciesAddon.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate checkov/arm/context_parser.py:146 — `bc_id_mapping and skipped_check["id"] in bc_id_mapping` appears character-identically in 3 files — checkov/arm/context_parser.py, checkov/cloudformation/context_parser.py, checkov/common/util/suppression.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate checkov/terraform/checks/resource/azure/GithubActionsOIDCTrustPolicy.py:30 — `claim_parts[0] == "*" or claim_parts[1] == "*"` appears character-identically in 2 files — checkov/terraform/checks/resource/azure/GithubActionsOIDCTrustPolicy.py, checkov/terraform/checks/resource/gcp/GithubActionsOIDCTrustPolicy.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate checkov/terraform/checks/resource/aws/SSMSessionManagerDocumentEncryption.py:20 — `conf.get("document_type") != ["Session"] or "content" not in conf.keys()` appears character-identically in 2 files — checkov/terraform/checks/resource/aws/SSMSessionManagerDocumentEncryption.py, checkov/terraform/checks/resource/aws/SSMSessionManagerDocumentLogging.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • + 15 more in this group — see findings.md.
X4 · Structured logging · Interpolated log message defeats structured logging · ×40
  • Interpolated log message defeats structured logging checkov/contributor_metrics.py:19 — `debug` at line 19 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging checkov/contributor_metrics.py:25 — `debug` at line 25 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging checkov/contributor_metrics.py:30 — `debug` at line 30 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging checkov/contributor_metrics.py:31 — `debug` at line 31 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging checkov/contributor_metrics.py:33 — `debug` at line 33 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging checkov/contributor_metrics.py:42 — `info` at line 42 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging checkov/contributor_metrics.py:50 — `info` at line 50 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging checkov/main.py:189 — `debug` at line 189 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging checkov/main.py:214 — `debug` at line 214 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging checkov/main.py:218 — `debug` at line 218 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging checkov/main.py:237 — `debug` at line 237 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging checkov/main.py:239 — `debug` at line 239 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging checkov/main.py:267 — `debug` at line 267 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging checkov/main.py:357 — `warning` at line 357 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging checkov/main.py:360 — `debug` at line 360 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging checkov/main.py:387 — `debug` at line 387 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging checkov/main.py:480 — `warning` at line 480 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging checkov/main.py:500 — `debug` at line 500 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging checkov/main.py:501 — `debug` at line 501 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging checkov/main.py:533 — `error` at line 533 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging checkov/main.py:587 — `debug` at line 587 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging checkov/main.py:592 — `warning` at line 592 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging checkov/main.py:619 — `error` at line 619 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging checkov/main.py:642 — `debug` at line 642 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging checkov/main.py:647 — `warning` at line 647 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
  • + 15 more in this group — see findings.md.
D24 · Comment Value · redundant comment · ×35
  • redundant comment cdk_integration_tests/src/typescript/CloudtrailEncryption/pass.ts:32 — "Create a CloudTrail trail with the specified KMS key ID" repeats the code it sits on: 6 of its 7 words (create, cloud, trail, kms, key, id) are already in `const trail = new cloudtrail.CfnTrail(this, 'MyTrail', {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment cdk_integration_tests/src/typescript/CodeBuildProjectEncryption/fail.ts:8 — "Create a CodeBuild project" repeats the code it sits on: 4 of its 4 words (create, code, build, project) are already in `const project = new codebuild.Project(this, 'MyCodeBuildProject', {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment cdk_integration_tests/src/typescript/CodeBuildProjectEncryption/pass.ts:12 — "Create a CodeBuild project" repeats the code it sits on: 4 of its 4 words (create, code, build, project) are already in `const project = new codebuild.Project(this, 'MyCodeBuildProject', {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment cdk_integration_tests/src/typescript/CodeBuildProjectEncryption/pass.ts:52 — "Create a CodeBuild project" repeats the code it sits on: 4 of its 4 words (create, code, build, project) are already in `const project = new codebuild.Project(this, 'MyCodeBuildProject', {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment cdk_integration_tests/src/typescript/DAXEncryption/fail__2__.ts:8 — "Create a DAX cluster" repeats the code it sits on: 3 of its 3 words (create, dax, cluster) are already in `const daxCluster = new dax.CfnCluster(this, 'MyDAXCluster', {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment cdk_integration_tests/src/typescript/DAXEncryption/fail__2__.ts:31 — "Create a DAX cluster" repeats the code it sits on: 3 of its 3 words (create, dax, cluster) are already in `const daxCluster = new dax.CfnCluster(this, 'MyDAXCluster', {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment cdk_integration_tests/src/typescript/DAXEncryption/pass.ts:8 — "Create a DAX cluster" repeats the code it sits on: 3 of its 3 words (create, dax, cluster) are already in `const daxCluster = new dax.CfnCluster(this, 'MyDAXCluster', {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment cdk_integration_tests/src/typescript/DMSReplicationInstancePubliclyAccessible/fail.ts:8 — "Create a DMS replication instance" repeats the code it sits on: 4 of its 4 words (create, dms, replication, instance) are already in `const replicationInstance = new dms.CfnReplicationInstance(this, 'MyCfnReplicationInstance', {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment cdk_integration_tests/src/typescript/DMSReplicationInstancePubliclyAccessible/pass.ts:8 — "Create a DMS replication instance" repeats the code it sits on: 4 of its 4 words (create, dms, replication, instance) are already in `const replicationInstance = new dms.CfnReplicationInstance(this, 'MyCfnReplicationInstance', {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment cdk_integration_tests/src/typescript/DocDBAuditLogs/fail__2__.ts:8 — "Define the DocDB Cluster Parameter Group" repeats the code it sits on: 5 of its 6 words (doc, db, cluster, parameter, group) are already in `const dbParameterGroup = new docdb.CfnDBClusterParameterGroup(this, 'DocDBClusterParameterGroup', {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment cdk_integration_tests/src/typescript/DocDBAuditLogs/fail__2__.ts:29 — "Define the DocDB Cluster Parameter Group" repeats the code it sits on: 5 of its 6 words (doc, db, cluster, parameter, group) are already in `const dbParameterGroup = new docdb.CfnDBClusterParameterGroup(this, 'DocDBClusterParameterGroup', {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment cdk_integration_tests/src/typescript/DocDBAuditLogs/pass.ts:8 — "Define the DocDB Cluster Parameter Group" repeats the code it sits on: 5 of its 6 words (doc, db, cluster, parameter, group) are already in `const dbParameterGroup = new docdb.CfnDBClusterParameterGroup(this, 'DocDBClusterParameterGroup', {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment cdk_integration_tests/src/typescript/DocDBTLS/fail.ts:8 — "Define the DocDB Cluster Parameter Group" repeats the code it sits on: 5 of its 6 words (doc, db, cluster, parameter, group) are already in `const dbParameterGroup = new docdb.CfnDBClusterParameterGroup(this, 'DocDBClusterParameterGroup', {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment cdk_integration_tests/src/typescript/DocDBTLS/pass.ts:8 — "Define the DocDB Cluster Parameter Group" repeats the code it sits on: 5 of its 6 words (doc, db, cluster, parameter, group) are already in `const dbParameterGroup = new docdb.CfnDBClusterParameterGroup(this, 'DocDBClusterParameterGroup', {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment cdk_integration_tests/src/typescript/EBSEncryption/fail__2__.ts:8 — "Create an EC2 instance" repeats the code it sits on: 3 of its 3 words (create, ec, instance) are already in `const instance = new ec2.Instance(this, 'MyInstance', {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment cdk_integration_tests/src/typescript/EBSEncryption/fail__2__.ts:40 — "Create an EC2 instance" repeats the code it sits on: 3 of its 3 words (create, ec, instance) are already in `const instance = new ec2.Instance(this, 'MyInstance', {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment cdk_integration_tests/src/typescript/EBSEncryption/pass.ts:8 — "Create an EC2 instance" repeats the code it sits on: 3 of its 3 words (create, ec, instance) are already in `const instance = new ec2.Instance(this, 'MyInstance', {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment cdk_integration_tests/src/typescript/EBSEncryption/pass.ts:41 — "Create an EC2 instance" repeats the code it sits on: 3 of its 3 words (create, ec, instance) are already in `const instance = new ec2.Instance(this, 'MyInstance', {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment cdk_integration_tests/src/typescript/S3BlockPublicACLs/fail.ts:8 — "Create an S3 bucket with blockPublicAcls enabled" repeats the code it sits on: 5 of its 6 words (create, bucket, block, public, acls) are already in `const bucket = new s3.Bucket(stack, 'MyBucket', {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment cdk_integration_tests/src/typescript/S3BlockPublicACLs/pass.ts:8 — "Create an S3 bucket with blockPublicAcls enabled" repeats the code it sits on: 5 of its 6 words (create, bucket, block, public, acls) are already in `const bucket = new s3.Bucket(stack, 'MyBucket', {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment cdk_integration_tests/src/typescript/S3PublicACLRead/fail__3__.ts:9 — "Bucket with PUBLIC_READ access - Match" repeats the code it sits on: 4 of its 5 words (bucket, public, read, access) are already in `new s3.Bucket(this, 'MyPublicReadBucket', {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment cdk_integration_tests/src/typescript/S3PublicACLRead/fail__3__.ts:16 — "Bucket with PUBLIC_READ_WRITE access" repeats the code it sits on: 5 of its 5 words (bucket, public, read, write, access) are already in `new s3.Bucket(this, 'MyPublicReadWriteBucket', {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment cdk_integration_tests/src/typescript/S3PublicACLRead/fail__3__.ts:21 — "Bucket with publicReadAccess set to true" repeats the code it sits on: 5 of its 6 words (bucket, public, read, access, true) are already in `new s3.Bucket(this, 'MyPublicReadAccessBucket', {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment cdk_integration_tests/src/typescript/S3PublicACLRead/pass.ts:14 — "Bucket with PUBLIC_READ_WRITE access" repeats the code it sits on: 5 of its 5 words (bucket, public, read, write, access) are already in `new s3.Bucket(this, 'MyPublicReadWriteBucket', {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment cdk_integration_tests/src/typescript/SNSTopicEncryption/pass.ts:10 — "Create a new KMS Key" repeats the code it sits on: 4 of its 4 words (create, new, kms, key) are already in `const key = new kms.Key(this, 'MyKey');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • + 10 more in this group — see findings.md.
X23 · Unguarded diagnostic materialisation · Diagnostic log message is built whether or not it is wanted · ×12
  • Diagnostic log message is built whether or not it is wanted checkov/main.py:267 — `debug` at line 267 is called with an argument built by `json.dumps(self.run_metadata, indent = 2)` (line 267), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
  • Diagnostic log message is built whether or not it is wanted checkov/runner_filter.py:126 — `debug` at line 126 is called with an argument built by `"…".join(self.framework)` (line 126), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
  • Diagnostic log message is built whether or not it is wanted checkov/terraform/checks/utils/base_cloudsplaining_iam_scanner.py:36 — `debug` at line 36 is called with an argument built by `json.dumps(violations, indent = 2, default = str)` (line 36), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
  • Diagnostic log message is built whether or not it is wanted checkov/common/runners/runner_registry.py:718 — `debug` at line 718 is called with an argument built by `[r.check_type for r in self.runners]` (line 718), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
  • Diagnostic log message is built whether or not it is wanted checkov/common/bridgecrew/integration_features/features/fixes_integration.py:122 — `debug` at line 122 is called with an argument built by `json.dumps(payload)` (line 122), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
  • Diagnostic log message is built whether or not it is wanted checkov/common/bridgecrew/integration_features/features/policy_metadata_integration.py:173 — `debug` at line 173 is called with an argument built by `json.dumps(metadata)` (line 173), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
  • Diagnostic log message is built whether or not it is wanted checkov/common/bridgecrew/integration_features/features/repo_config_integration.py:74 — `debug` at line 74 is called with an argument built by `json.dumps(default_rule, indent = 2)` (line 74), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
  • Diagnostic log message is built whether or not it is wanted checkov/common/bridgecrew/integration_features/features/repo_config_integration.py:75 — `debug` at line 75 is called with an argument built by `json.dumps(other_rules, indent = 2)` (line 75), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
  • Diagnostic log message is built whether or not it is wanted checkov/common/bridgecrew/integration_features/features/repo_config_integration.py:115 — `debug` at line 115 is called with an argument built by `json.dumps(self.enforcement_rule, indent = 2)` (line 115), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
  • Diagnostic log message is built whether or not it is wanted checkov/cloudformation/graph_manager.py:44 — `debug` at line 44 is called with an argument built by `json.dumps(file_definition, indent = 2, default = str)` (line 45), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
  • Diagnostic log message is built whether or not it is wanted checkov/cloudformation/runner.py:115 — `debug` at line 115 is called with an argument built by `json.dumps(file_definition, indent = 2, default = str)` (line 116), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
  • Diagnostic log message is built whether or not it is wanted checkov/cloudformation/checks/resource/BaseCloudsplainingIAMCheck.py:73 — `debug` at line 73 is called with an argument built by `json.dumps(violations)` (line 73), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
R7 · Dead Code · Unused module-local declaration 'cfnSecurityConfigurationProps1' · ×8
  • Unused module-local declaration 'cfnSecurityConfigurationProps1' cdk_integration_tests/src/typescript/GlueSecurityConfiguration/fail.ts:3 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
  • Unused module-local declaration 'cfnSecurityConfigurationProps1' cdk_integration_tests/src/typescript/GlueSecurityConfigurationEnabled/fail.ts:3 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
  • Unused module-local declaration 'cfnSecurityConfigurationProps1' cdk_integration_tests/src/typescript/GlueSecurityConfigurationEnabled/pass.ts:18 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
  • Unused module-local declaration 'cfnSecurityConfigurationProps1' cdk_integration_tests/src/typescript/IAMPolicyAttachedToGroupOrRoles/fail.ts:3 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
  • Unused module-local declaration 'cfnSecurityConfigurationProps1' cdk_integration_tests/src/typescript/IAMPolicyAttachedToGroupOrRoles/pass.ts:10 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
  • Unused module-local declaration 'cfnSecurityConfigurationProps1' cdk_integration_tests/src/typescript/KinesisStreamEncryptionType/fail.ts:3 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
  • Unused module-local declaration 'cfnSecurityConfigurationProps1' cdk_integration_tests/src/typescript/KinesisStreamEncryptionType/pass.ts:3 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
  • Unused module-local declaration 'cfnSecurityConfigurationProps1' cdk_integration_tests/src/typescript/LambdaEnvironmentCredentials/fail.ts:4 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'cfnSecurityConfigurationProps2' · ×6
  • Unused module-local declaration 'cfnSecurityConfigurationProps2' cdk_integration_tests/src/typescript/GlueSecurityConfiguration/fail.ts:18 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
  • Unused module-local declaration 'cfnSecurityConfigurationProps2' cdk_integration_tests/src/typescript/GlueSecurityConfigurationEnabled/fail.ts:7 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
  • Unused module-local declaration 'cfnSecurityConfigurationProps2' cdk_integration_tests/src/typescript/GlueSecurityConfigurationEnabled/pass.ts:23 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
  • Unused module-local declaration 'cfnSecurityConfigurationProps2' cdk_integration_tests/src/typescript/KinesisStreamEncryptionType/fail.ts:8 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
  • Unused module-local declaration 'cfnSecurityConfigurationProps2' cdk_integration_tests/src/typescript/LambdaDLQConfigured/fail.ts:14 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
  • Unused module-local declaration 'cfnSecurityConfigurationProps2' cdk_integration_tests/src/typescript/LambdaEnvironmentCredentials/fail.ts:12 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'logConfig' · ×4
  • Unused module-local declaration 'logConfig' cdk_integration_tests/src/typescript/AppSyncFieldLevelLogs/fail.ts:6 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
  • Unused module-local declaration 'logConfig' cdk_integration_tests/src/typescript/AppSyncFieldLevelLogs/pass.ts:6 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
  • Unused module-local declaration 'logConfig' cdk_integration_tests/src/typescript/AppSyncLogging/fail.ts:6 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
  • Unused module-local declaration 'logConfig' cdk_integration_tests/src/typescript/AppSyncLogging/pass.ts:6 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'cfnSecurityConfigurationProps3' · ×3
  • Unused module-local declaration 'cfnSecurityConfigurationProps3' cdk_integration_tests/src/typescript/GlueSecurityConfiguration/fail.ts:33 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
  • Unused module-local declaration 'cfnSecurityConfigurationProps3' cdk_integration_tests/src/typescript/GlueSecurityConfigurationEnabled/fail.ts:11 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
  • Unused module-local declaration 'cfnSecurityConfigurationProps3' cdk_integration_tests/src/typescript/GlueSecurityConfigurationEnabled/pass.ts:28 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'viewerCertificateConfig' · ×2
  • Unused module-local declaration 'viewerCertificateConfig' cdk_integration_tests/src/typescript/CloudFrontTLS12/fail.ts:7 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
  • Unused module-local declaration 'viewerCertificateConfig' cdk_integration_tests/src/typescript/CloudFrontTLS12/pass.ts:7 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'encryptionAtRestOptionsProperty1' · ×2
  • Unused module-local declaration 'encryptionAtRestOptionsProperty1' cdk_integration_tests/src/typescript/ElasticsearchEncryption/fail.ts:5 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
  • Unused module-local declaration 'encryptionAtRestOptionsProperty1' cdk_integration_tests/src/typescript/ElasticsearchNodeToNodeEncryption/fail.ts:5 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'encryptionAtRestOptionsProperty2' · ×2
  • Unused module-local declaration 'encryptionAtRestOptionsProperty2' cdk_integration_tests/src/typescript/ElasticsearchEncryption/fail.ts:10 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
  • Unused module-local declaration 'encryptionAtRestOptionsProperty2' cdk_integration_tests/src/typescript/ElasticsearchNodeToNodeEncryption/fail.ts:9 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'encryptionAtRestOptionsProperty3' · ×2
  • Unused module-local declaration 'encryptionAtRestOptionsProperty3' cdk_integration_tests/src/typescript/ElasticsearchEncryption/pass.ts:18 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
  • Unused module-local declaration 'encryptionAtRestOptionsProperty3' cdk_integration_tests/src/typescript/ElasticsearchNodeToNodeEncryption/pass.ts:15 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'cfnDataCatalogEncryptionSettingsProps' · ×2
  • Unused module-local declaration 'cfnDataCatalogEncryptionSettingsProps' cdk_integration_tests/src/typescript/GlueDataCatalogEncryption/pass.ts:18 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
  • Unused module-local declaration 'cfnDataCatalogEncryptionSettingsProps' cdk_integration_tests/src/typescript/GlueSecurityConfiguration/pass.ts:39 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
D16 · Bus Factor · Off-boarding risk · ×1
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 2 significant file(s) lose their only recent owner: checkov/terraform_json/parser.py, checkov/terraform/module_loading/loaders/github_access_token_loader.py. Pair on, review, or document these before any departure.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 3 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (5 single-owned of 352 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 352 of the 2720 production source files in this repository met that bar). They are anonymized user #2 (1 file(s)), anonymized user #3 (1 file(s)), anonymized user #4 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: checkov/bicep/graph_builder/local_graph.py, checkov/sca_package_2/runner.py, checkov/terraform/checks/data/aws/AWSAvailabilityZonesUnfiltered.py.
D27 · Navigability · Scattered collaborators · ×1
  • Scattered collaborators — 50 % of calls cross a namespace and only 0 % of collaborators are co-located — group each feature's code into a vertical slice so a call's collaborators sit together.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D40 · Network Egress Confinement · No network policy · ×1
  • No network policy — No Kubernetes NetworkPolicy (or Cilium policy) found. Without one, every pod can talk to every other pod and reach out to the internet by default. Add a default-deny policy and open only the flows you need.
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
M2 · Architecture documentation · No architecture diagram/doc · ×1
  • No architecture diagram/doc — No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
M3 · Folder & project structure · No src/ separation · ×1
  • No src/ separation — Most of the production code is in directories of its own, but 1 application file(s) sit at the repository root beside the build and tooling files (`dangerfile.ts`).
M4 · Documentation accuracy · README/code drift · ×1
  • README/code drift README.md:199 — README.md names Python 3.6, but setup.py:119 requires `python_requires=">=3.10",`: the package does not install on Python 3.6. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
P3 · Security & performance tooling · Dependabot does not watch nuget/npm/gomod/pip/bundler/gitsubmodule · ×1
  • Dependabot does not watch nuget/npm/gomod/pip/bundler/gitsubmodule REDACTED:2 — `REDACTED` schedules updates, but no `package-ecosystem` entry covers `nuget`, `npm`, `gomod`, `pip`, `bundler`, `gitsubmodule`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entries to the `updates:` list.
R7 · Dead Code · Unused module-local declaration 'cfnDataCatalogEncryptionSettingsProps1' · ×1
  • Unused module-local declaration 'cfnDataCatalogEncryptionSettingsProps1' cdk_integration_tests/src/typescript/GlueDataCatalogEncryption/fail.ts:5 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'cfnDataCatalogEncryptionSettingsProps2' · ×1
  • Unused module-local declaration 'cfnDataCatalogEncryptionSettingsProps2' cdk_integration_tests/src/typescript/GlueDataCatalogEncryption/fail.ts:20 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'cfnSecurityConfigurationProps4' · ×1
  • Unused module-local declaration 'cfnSecurityConfigurationProps4' cdk_integration_tests/src/typescript/GlueSecurityConfiguration/fail.ts:48 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'cfnSecurityConfigurationProps5' · ×1
  • Unused module-local declaration 'cfnSecurityConfigurationProps5' cdk_integration_tests/src/typescript/GlueSecurityConfiguration/fail.ts:63 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'cfnSecurityConfigurationProps6' · ×1
  • Unused module-local declaration 'cfnSecurityConfigurationProps6' cdk_integration_tests/src/typescript/GlueSecurityConfiguration/fail.ts:78 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'cfnSecurityConfigurationProps7' · ×1
  • Unused module-local declaration 'cfnSecurityConfigurationProps7' cdk_integration_tests/src/typescript/GlueSecurityConfiguration/fail.ts:93 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'cfnSecurityConfigurationProps8' · ×1
  • Unused module-local declaration 'cfnSecurityConfigurationProps8' cdk_integration_tests/src/typescript/GlueSecurityConfiguration/fail.ts:108 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'cfnSecurityConfigurationProps9' · ×1
  • Unused module-local declaration 'cfnSecurityConfigurationProps9' cdk_integration_tests/src/typescript/GlueSecurityConfiguration/fail.ts:123 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'cfnSecurityConfigurationProps10' · ×1
  • Unused module-local declaration 'cfnSecurityConfigurationProps10' cdk_integration_tests/src/typescript/GlueSecurityConfiguration/fail.ts:138 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
X5 · Nullable reference types · Strict null checking is not enabled everywhere the repository type-checks · ×1
  • Strict null checking is not enabled everywhere the repository type-checks — 0/4 of this repository's type-checking configuration(s) turn on strict null checking (`"strict": true`, or `"strictNullChecks": true`). A configuration that states neither is counted as OFF, because off is tsc's own default; a solution-style one whose `"files"` is empty and whose `"references"` point at other projects is in neither number, because it checks no source itself. Where it is off, `string` admits `null` and `undefined`: passing a value that is null compiles silently and throws on the first property access.

Appendix B — Reproduction & audit trail

Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=0 --max-count=200" --report-format json --report-path /tmp/watchdog-gitleaks-fa0ad3de9c834275bc8ab5984232eac2/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=200 --max-count=800" --report-format json --report-path /tmp/watchdog-gitleaks-fa0ad3de9c834275bc8ab5984232eac2/history-1.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-1.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=1000 --max-count=3098" --report-format json --report-path /tmp/watchdog-gitleaks-fa0ad3de9c834275bc8ab5984232eac2/history-2.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-2.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=4098 --max-count=1654" --report-format json --report-path /tmp/watchdog-gitleaks-fa0ad3de9c834275bc8ab5984232eac2/history-3.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-3.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=5752 --max-count=1598" --report-format json --report-path /tmp/watchdog-gitleaks-fa0ad3de9c834275bc8ab5984232eac2/history-4.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-4.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=7350 --max-count=1621" --report-format json --report-path /tmp/watchdog-gitleaks-fa0ad3de9c834275bc8ab5984232eac2/history-5.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-5.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=8971 --max-count=1460" --report-format json --report-path /tmp/watchdog-gitleaks-fa0ad3de9c834275bc8ab5984232eac2/history-6.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-6.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=10431 --max-count=1434" --report-format json --report-path /tmp/watchdog-gitleaks-fa0ad3de9c834275bc8ab5984232eac2/history-7.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-7.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=11865 --max-count=1288" --report-format json --report-path /tmp/watchdog-gitleaks-fa0ad3de9c834275bc8ab5984232eac2/history-8.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-8.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=13153 --max-count=1152" --report-format json --report-path /tmp/watchdog-gitleaks-fa0ad3de9c834275bc8ab5984232eac2/history-9.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-9.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=14305 --max-count=1076" --report-format json --report-path /tmp/watchdog-gitleaks-fa0ad3de9c834275bc8ab5984232eac2/history-10.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-10.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=15381 --max-count=1100" --report-format json --report-path /tmp/watchdog-gitleaks-fa0ad3de9c834275bc8ab5984232eac2/history-11.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-11.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=16481 --max-count=1027" --report-format json --report-path /tmp/watchdog-gitleaks-fa0ad3de9c834275bc8ab5984232eac2/history-12.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-12.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-fa0ad3de9c834275bc8ab5984232eac2/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .43artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .12artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet . --skip-check-update10—
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — The repository ships application workloads but no cluster-governance resources (CRDs, admission webhooks, or a committed policy engine). Runtime threat-detection (Falco/Tetragon) and admission control (Kyverno/OPA-Gatekeeper/PodSecurity) are cluster-OPERATOR controls owned by the platform, not shipped by an application repo/chart — nothing for this repo to assess.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .0artifacts/raw/trivy-fs.json

Run 01a1e6c0-ed01-7d15-896b-604b91c2ac02 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md