bridgecrewio / checkov

Prevent cloud misconfigurations and find vulnerabilities during build-time in infrastructure as code, container images and open source packages with Checkov by Bridgecrew.
https://www.checkov.io/
Apache License 2.0
7.17k stars 1.12k forks source link

fix(arm): Fix arm resource naming on integration with Prisma #6870

Closed omriyoffe-panw closed 4 days ago

omriyoffe-panw commented 4 days ago

User description

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

[//]: # "

PR Title

We use the title to create changelog automatically and therefore only allow specific prefixes
- break:    to indicate a breaking change, this supersedes any of the other types
- feat:     to indicate new features or checks
- fix:      to indicate a bugfix or handling of edge cases of existing checks
- docs:     to indicate an update to our documentation
- chore:    to indicate adjustments to workflow files or dependency updates
- platform: to indicate a change needed for the platform
Each prefix should be accompanied by a scope that specifies the targeted framework. If uncertain, use 'general'.
#    
Allowed prefixs:
ansible|argo|arm|azure|bicep|bitbucket|circleci|cloudformation|dockerfile|github|gha|gitlab|helm|kubernetes|kustomize|openapi|sast|sca|secrets|serverless|terraform|general|graph|terraform_plan|terraform_json
#
ex.
feat(terraform): add CKV_AWS_123 to ensure that VPC Endpoint Service is configured for Manual Acceptance

"

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

New/Edited policies (Delete if not relevant)

Description

Include a description of what makes it a violation and any relevant external links.

Fix

How does someone fix the issue in code and/or in runtime?

Checklist:


Generated description

Below is a concise technical summary of the changes proposed in this PR:

Refactor the ARM resource naming logic to improve integration with Prisma by removing redundant filepath functions. The changes primarily affect the ArmGraphManager and Runner classes, which handle the graph building and execution of ARM checks. The get_files_definitions function is now called without a custom filepath function, simplifying the code. Additionally, test cases in TestRunnerValid have been updated to reflect these changes.

<table><tr><th>Topic</th><th>Details</th><tr><td><a href=https://baz.co/changes/bridgecrewio/checkov/6870?tool=ast&topic=Test+Case+Updates>Test Case Updates</a>
    </td><td>Update test cases in <code>TestRunnerValid</code> to align with the new ARM resource naming logic.<details><summary>Modified files (1)</summary><ul><li>tests/arm/runner/test_runner.py</li></ul></details><details><summary>Latest Contributors(2)</summary><table><tr><th>User</th><th>Commit</th><th>Date</th></tr><tr><td>gruebel</td><td>break-general-remove-m...</td><td>October 24, 2023</td></tr>
murbanski@paloaltonetw...add-tests-for-honoring...July 28, 2022 ARM Resource Naming Simplify the ARM resource naming logic by removing redundant filepath functions in ArmGraphManager and Runner.
Modified files (3)
  • checkov/arm/graph_manager.py
  • checkov/arm/runner.py
  • checkov/arm/utils.py
Latest Contributors(2)
UserCommitDate
omriyoffe-panwfix-arm-Fix-arm-graph-...November 24, 2024
taviassaffeat-azure-add-new-pol...November 17, 2024
This pull request is reviewed by Baz. Join @omriyoffe-panw and the rest of your team on (Baz).