check CKV_SECRET_6 fails even when suppressed
See original GitHub issueDescribe the bug Checkov raises FAILED check CKV_SECRET_6 when running against a project even if the check is suppressed.
To Reproduce Steps to reproduce the behavior:
- Create a module with Terraform and suppress the check for CKV_SECRET_6
# terraform/common/modules/terraform-azurerm-kv-secrets/main.tf
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
}
}
}
#Create Key Vault Secret
resource "azurerm_key_vault_secret" "secret" {
name = var.key_vault_secret_name
value = var.key_vault_secret_value
key_vault_id = var.key_vault_id
#checkov:skip=CKV_SECRET_6 todo
#checkov:skip=CKV_AZURE_114 Content type is not used
#checkov:skip=CKV_AZURE_41 No expiration dates set on keys
}
- Create a Terraform file where the module is called upon:
terraform {
backend "azurerm" {
version = "2.74.0"
}
required_providers {
azuredevops = {
source = "microsoft/azuredevops"
version = "0.1.7"
}
azuread = {
source = "hashicorp/azuread"
version = "1.6.0"
}
}
}
provider "azurerm" {
features {}
}
data "azurerm_client_config" "current" {}
module "terraform-azurerm-rg" {
source = "../common/modules/terraform-azurerm-rg"
resource_group_name = "dummy-rg"
location = var.location
tags = var.tags
}
module "terraform-azurerm-kv" {
source = "../common/modules/terraform-azurerm-kv"
keyvault_name = "dummy-kv"
resource_group_name = module.terraform-azurerm-rg.name
location = module.terraform-azurerm-rg.location
tags = var.tags
tenant_id = data.azurerm_client_config.current.tenant_id
}
module "kv-secret" {
source = "../common/modules/terraform-azurerm-kv-secrets"
key_vault_id = module.terraform-azurerm-kv.key_vault_id
key_vault_secret_name = "MultiTenancy"
key_vault_secret_value = "verymuchsecretvalue"
- Run Checkov scan in Azure DevOps pipeline:
- stage: SecurityCheck
displayName: Security & Quality Check
jobs:
- job: Checkov_analysis
displayName: Run Checkov
steps:
- script: |
mkdir CheckovReport
docker pull bridgecrew/checkov
docker run --volume $(tbc__terraform_folder):/tf bridgecrew/checkov --directory /tf --compact --output junitxml > $(System.DefaultWorkingDirectory)/CheckovReport/Checkov-Report.xml
displayName: Run Static Code analysis for Terraform using Checkov in a Docker container
Expected behavior The check for CKV_SECRET_6 should have been SKIPPED but instead, my Azure DevOps pipeline fails.
Screenshots
Desktop (please complete the following information):
- Terraform: 1.0.0
- Checkov Version: latest image
Additional context
I have been able to work around this issue by using an older image tag. Found the following version working for me bridgecrew/checkov:2.0.355
but I want to be able to stay up to date and skip the check for CKV_SECRET_6
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
How To Fix Ejection Problems on a Suppressed AR Rifle
Suppressors can cause ejection problems because of too much or too little gas in your AR rifle. Luckily, it's an easy fix.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Skipping the check works now by adding the skip next to the name and value of the Azure Keyvault Secrets. Tested with the latest image at the moment of writing this comment.
@schosterbarak @gruebel Any update on your side for this issue?