Skip to content

Commit

Permalink
fix linting elb without secure protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
ArturRibeiro-CX committed Nov 9, 2024
1 parent 3de2b00 commit e4c890f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@ import data.generic.common as common_lib
import future.keywords.in

CxPolicy[result] {
some p, name, protocol, idx, i
resource := input.document[i].Resources[name]
some name, idx
some document in input.document
resource := document.Resources[name]
resource.Type == "AWS::ElasticLoadBalancing::LoadBalancer"

listener := resource.Properties.Listeners[idx]

protocols := {"InstanceProtocol", "Protocol"}
some protocol in protocols[p]
some protocol in protocols
not is_secure(listener, protocol)

result := {
"documentId": input.document[i].id,
"documentId": document.id,
"resourceType": resource.Type,
"resourceName": cf_lib.get_resource_name(resource, name),
"searchKey": sprintf("Resources.%s.Properties.Listeners", [name]),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package Cx

import data.generic.common as common_lib
import input as tf
import future.keywords.in
import input as tf

CxPolicy[result] {
paths := [p |
Expand Down

0 comments on commit e4c890f

Please sign in to comment.