-
Notifications
You must be signed in to change notification settings - Fork 509
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Cesar Rodriguez
committed
Oct 19, 2020
1 parent
8ac4d82
commit 5530d27
Showing
2 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
...cies/opa/rego/aws/aws_apigatewayv2_api/AWS.ApiGatewayV2Api.AccessControl.Medium.0630.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
8 changes: 8 additions & 0 deletions
8
pkg/policies/opa/rego/aws/aws_apigatewayv2_api/apiGatewayMiconfiguredCors.rego
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 == ["*"] | ||
} |