Skip to content

Commit

Permalink
adds rego for insecure cors config
Browse files Browse the repository at this point in the history
  • Loading branch information
Cesar Rodriguez committed Oct 19, 2020
1 parent 8ac4d82 commit 5530d27
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "apiGatewayMiconfiguredCors",
"file": "apiGatewayMiconfiguredCors.rego",
"template_args": null,
"severity": "Medium",
"description": "Insecure Cross-Origin Resource Sharing Configuration allowing all domains",
"reference_id": "AWS.ApiGatewayV2Api.AccessControl.High.0630",
"category": "AccessControl",
"version": 2
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package accurics

apiGatewayMiconfiguredCors[api.id] {
api := input.aws_apigatewayv2_api[_]
cors := api.config.cors_configuration[_]
origins := cors.allow_origins[_]
not origins == ["*"]
}

0 comments on commit 5530d27

Please sign in to comment.