Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(query): Api Gateway Without Content Encoding #5215

Merged
merged 1 commit into from
Apr 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"id": "d6653eee-2d4d-4e6a-976f-6794a497999a",
"queryName": "API Gateway Without Content Encoding",
"queryName": "API Gateway With Invalid Compression",
"severity": "MEDIUM",
"category": "Encryption",
"descriptionText": "Enable Content Encoding through the attribute 'MinimumCompressionSize'. This value should be greater than -1 and smaller than 10485760.",
"descriptionText": "Attribute 'MinimumCompressionSize' should be set and it's value should be greater than -1 and smaller than 10485760.",
"descriptionUrl": "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-restapi.html",
"platform": "CloudFormation",
"descriptionID": "de76ae0f",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ CxPolicy[result] {
"documentId": input.document[i].id,
"searchKey": sprintf("Resources.%s.Properties.MinimumCompressionSize", [name]),
"issueType": "IncorrectValue",
"keyExpectedValue": "Resources.%s.Properties.MinimumCompressionSize is greater than -1 and smaller than 10485760",
"keyExpectedValue": "Resources.%s.Properties.MinimumCompressionSize to be greater than -1 and smaller than 10485760",
"keyActualValue": "Resources.%s.Properties.MinimumCompressionSize is set but smaller than 0",
"searchLine": common_lib.build_search_line(["Resources", name, "Properties", "MinimumCompressionSize"], []),
}
Expand All @@ -32,7 +32,7 @@ CxPolicy[result] {
"documentId": input.document[i].id,
"searchKey": sprintf("Resources.%s.Properties.MinimumCompressionSize", [name]),
"issueType": "IncorrectValue",
"keyExpectedValue": "Resources.%s.Properties.MinimumCompressionSize is greater than -1 and smaller than 10485760",
"keyExpectedValue": "Resources.%s.Properties.MinimumCompressionSize to be greater than -1 and smaller than 10485760",
"keyActualValue": "Resources.%s.Properties.MinimumCompressionSize is set but greater than 10485759",
"searchLine": common_lib.build_search_line(["Resources", name, "Properties", "MinimumCompressionSize"], []),
}
Expand All @@ -50,7 +50,7 @@ CxPolicy[result] {
"documentId": input.document[i].id,
"searchKey": sprintf("Resources.%s.Properties", [name]),
"issueType": "MissingAttribute",
"keyExpectedValue": sprintf("Resources.%s.Properties.MinimumCompressionSize is defined", [name]),
"keyExpectedValue": sprintf("Resources.%s.Properties.MinimumCompressionSize to be defined", [name]),
"keyActualValue": sprintf("Resources.%s.Properties.MinimumCompressionSize is not defined", [name]),
"searchLine": common_lib.build_search_line(["Resources", name, "Properties"], []),
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
[
{
"queryName": "API Gateway Without Content Encoding",
"queryName": "API Gateway With Invalid Compression",
"severity": "MEDIUM",
"line": 17,
"fileName": "positive1.yaml"
},
{
"queryName": "API Gateway Without Content Encoding",
"queryName": "API Gateway With Invalid Compression",
"severity": "MEDIUM",
"line": 22,
"fileName": "positive4.json"
},
{
"queryName": "API Gateway Without Content Encoding",
"queryName": "API Gateway With Invalid Compression",
"severity": "MEDIUM",
"line": 17,
"fileName": "positive2.yaml"
},
{
"queryName": "API Gateway Without Content Encoding",
"queryName": "API Gateway With Invalid Compression",
"severity": "MEDIUM",
"line": 22,
"fileName": "positive5.json"
},
{
"queryName": "API Gateway Without Content Encoding",
"queryName": "API Gateway With Invalid Compression",
"severity": "MEDIUM",
"line": 5,
"fileName": "positive3.yaml"
},
{
"queryName": "API Gateway Without Content Encoding",
"queryName": "API Gateway With Invalid Compression",
"severity": "MEDIUM",
"line": 5,
"fileName": "positive6.json"
Expand Down