Skip to content

fix(terraform): CKV_AZURE_215 - fix false positive on azurerm_api_management_backend for unresolvable url references#7560

Open
JoshMcLeanTx wants to merge 2 commits into
bridgecrewio:mainfrom
JoshMcLeanTx:fix/ckv-azure-215-false-positive-unresolvable-url
Open

fix(terraform): CKV_AZURE_215 - fix false positive on azurerm_api_management_backend for unresolvable url references#7560
JoshMcLeanTx wants to merge 2 commits into
bridgecrewio:mainfrom
JoshMcLeanTx:fix/ckv-azure-215-false-positive-unresolvable-url

Conversation

@JoshMcLeanTx

Copy link
Copy Markdown

Description

Fixes #7412

CKV_AZURE_215 produces false positives on azurerm_api_management_backend
when the url parameter is set to a variable reference (var., local., each.,
module., data.) that cannot be statically resolved at scan time. Previously
the check returned FAILED for any URL not containing 'https', including
unresolvable variable references.

New/Edited policies

Description

When a backend url is defined as a variable reference, Checkov cannot
determine the actual value at scan time. Returning FAILED in this case
is a false positive since the URL may well be HTTPS at runtime.

Fix

Configure the url to a hardcoded https:// value, or ensure the variable
resolves to an https:// URL via a variables.tf default value.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my feature, policy, or fix is effective and works
  • New and existing tests pass locally with my changes

@JoshMcLeanTx

Copy link
Copy Markdown
Author

Anything needed from my side to get this reviewed? Happy to make any changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CKV_AZURE_215: False positive on azurerm_api_management_backend - protocol parameter doesn't control transport security

1 participant