Skip to content

fix(queries): fixed fp on terraform/aws network acl with unrestricted access to rdp/ssh queries - #8151

Open
cx-ricardo-jesus wants to merge 3 commits into
masterfrom
AST-185678
Open

cx-ricardo-jesus wants to merge 3 commits into
masterfrom
AST-185678

Conversation

@cx-ricardo-jesus

Copy link
Copy Markdown
Contributor

Reason for Proposed Changes

  • The queries Network ACL With Unrestricted Access to RDP and Network ACL With Unrestricted Access to RDP for Terraform / AWS were reporting a false positive when the protocol field was defined to tcp, an open CIDR (e.g., "cidr_block": "0.0.0.0/0") and both from_port and to_port set both to 0.

Proposed Changes

  • Added a helper function called is_tcp_port_zero to both queries to stop the query from returning a result when the scenario described above occurs.
  • Regarding the tests, the old positive4.tf that covered that specific scenario was renamed to negative6.tf since this case shouldn't return any result.

I submit this contribution under the Apache-2.0 license.

@cx-ricardo-jesus
cx-ricardo-jesus requested a review from a team October 21, 2026 17:12
@github-actions

Copy link
Copy Markdown
Contributor

kics-logo

KICS version: v2.1.20

Category Results
CRITICAL CRITICAL 0
HIGH HIGH 0
MEDIUM MEDIUM 0
LOW LOW 0
INFO INFO 0
TRACE TRACE 0
TOTAL TOTAL 0
Metric Values
Files scanned placeholder 1
Files parsed placeholder 1
Files failed to scan placeholder 0
Total executed queries placeholder 47
Queries failed to execute placeholder 0
Execution time placeholder 0

This branch has not been deployed

No deployments
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.

1 participant