Skip to content

Checkov is passing a fail case during the scan for rule Id CKV_AWS_260 and CKV_AWS_149. #7305

@omprakash4193

Description

@omprakash4193

Describe the issue
I am testing a fail scenario to validate the CKV_AWS_260 rule, but the rule is incorrectly passing instead of detecting a violation.

Examples
Please review the sample code below.

<resource "aws_security_group" "fail_test" {
     name = "fail_test_sg"
     description = "Security group with ingress from 0.0.0.0/0 to port 80"

     ingress {
        from_port = 80
        to_port = 80
        portocol = "tcp"
        cidr_blocks = ["0.0.0.0/0"]
     }
     egress {
       from_port = 0
       to_port = 0
       protocol = -1
       cidr_blocks = ["0.0.0.0/0"]
     }
}

Version (please complete the following information):

  • Checkov Version [3.2.469]

Additional context
I am using the Checkov Python library and passing arguments to validate the rules. While it works correctly with the existing rules, it fails to detect violations for newly added rules.

Metadata

Metadata

Assignees

No one assigned

    Labels

    checksCheck additions or changes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions