-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Vishnu Jayadevan <[email protected]> Signed-off-by: Srijan Saurav <[email protected]> Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com> Co-authored-by: Srijan Saurav <[email protected]> Co-authored-by: Eshaan Bansal <[email protected]>
- Loading branch information
1 parent
d169811
commit 553e450
Showing
169 changed files
with
4,601 additions
and
6 deletions.
There are no files selected for viewing
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
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,7 @@ | ||
# Analyzer Profile | ||
category = "conf" | ||
name = "AWS CloudFormation Linter" | ||
shortcode = "cfn-lint" | ||
status = "active" | ||
tool_latest_version = "0.83.0" | ||
description = "AWS Cloudformation Linter validates AWS CloudFormation yaml/json templates against AWS CloudFormation Resource Specification." |
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,5 @@ | ||
version = 1 | ||
|
||
[[analyzers]] | ||
name = "cfn-lint" | ||
type = "community" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
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,12 @@ | ||
title = "Error processing rule on the template" | ||
verbose_name = "E0002" | ||
severity = "major" | ||
category = "antipattern" | ||
weight = 70 | ||
tags = ["base", "rule"] | ||
description = ''' | ||
Errors found when processing a rule on the template | ||
### References: | ||
[CloudFormation Python Lint](https://github.com/aws-cloudformation/cfn-python-lint) | ||
''' |
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,12 @@ | ||
title = "Basic cloudformation template configuration" | ||
verbose_name = "E1001" | ||
severity = "major" | ||
category = "antipattern" | ||
weight = 70 | ||
tags = ["base"] | ||
description = ''' | ||
Making sure the basic CloudFormation template components are properly configured | ||
### References: | ||
[CloudFormation Python Lint](https://github.com/aws-cloudformation/cfn-python-lint) | ||
''' |
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,12 @@ | ||
title = "Template size limit" | ||
verbose_name = "E1002" | ||
severity = "major" | ||
category = "antipattern" | ||
weight = 70 | ||
tags = ["limits"] | ||
description = ''' | ||
Check the size of the template is less than the upper limit | ||
### References: | ||
[CloudFormation Limits](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cloudformation-limits.html) | ||
''' |
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,12 @@ | ||
title = "Template description limit" | ||
verbose_name = "E1003" | ||
severity = "major" | ||
category = "antipattern" | ||
weight = 70 | ||
tags = ["description", "limits"] | ||
description = ''' | ||
Check if the size of the template description is less than the upper limit | ||
### References: | ||
[CloudFormation Limits](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cloudformation-limits.html) | ||
''' |
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,12 @@ | ||
title = "Template description can only be a string" | ||
verbose_name = "E1004" | ||
severity = "major" | ||
category = "antipattern" | ||
weight = 70 | ||
tags = ["description"] | ||
description = ''' | ||
Template description can only be a string | ||
### References: | ||
[Template Description Structure](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-description-structure.html) | ||
''' |
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,12 @@ | ||
title = "Getatt validation of parameters" | ||
verbose_name = "E1010" | ||
severity = "major" | ||
category = "antipattern" | ||
weight = 70 | ||
tags = ["functions", "getatt"] | ||
description = ''' | ||
Validates that GetAtt parameters are to valid resources and properties of those resources | ||
### References: | ||
[Intrinsic Function Reference Getatt](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-getatt.html) | ||
''' |
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,12 @@ | ||
title = "Findinmap validation of configuration" | ||
verbose_name = "E1011" | ||
severity = "major" | ||
category = "antipattern" | ||
weight = 70 | ||
tags = ["functions", "findinmap"] | ||
description = ''' | ||
Making sure the function is a list of appropriate config | ||
### References: | ||
[Intrinsic Function Reference Findinmap](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-findinmap.html) | ||
''' |
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,12 @@ | ||
title = "Check if refs exist" | ||
verbose_name = "E1012" | ||
severity = "major" | ||
category = "antipattern" | ||
weight = 70 | ||
tags = ["functions", "ref"] | ||
description = ''' | ||
Making sure the refs exist | ||
### References: | ||
[Intrinsic Function Reference Ref](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html) | ||
''' |
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,12 @@ | ||
title = "Getaz validation of parameters" | ||
verbose_name = "E1015" | ||
severity = "major" | ||
category = "antipattern" | ||
weight = 70 | ||
tags = ["functions", "getaz"] | ||
description = ''' | ||
Making sure the GetAz function is properly configured | ||
### References: | ||
[Intrinsic Function Reference Getavailabilityzones](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-getavailabilityzones.html) | ||
''' |
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,12 @@ | ||
title = "Importvalue validation of parameters" | ||
verbose_name = "E1016" | ||
severity = "major" | ||
category = "antipattern" | ||
weight = 70 | ||
tags = ["functions", "importvalue"] | ||
description = ''' | ||
Making sure the ImportValue function is properly configured | ||
### References: | ||
[Intrinsic Function Reference Importvalue](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-importvalue.html) | ||
''' |
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,12 @@ | ||
title = "Select validation of parameters" | ||
verbose_name = "E1017" | ||
severity = "major" | ||
category = "antipattern" | ||
weight = 70 | ||
tags = ["functions", "select"] | ||
description = ''' | ||
Making sure the Select function is properly configured | ||
### References: | ||
[Intrinsic Function Reference Select](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-select.html) | ||
''' |
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,12 @@ | ||
title = "Split validation of parameters" | ||
verbose_name = "E1018" | ||
severity = "major" | ||
category = "antipattern" | ||
weight = 70 | ||
tags = ["functions", "split"] | ||
description = ''' | ||
Making sure the split function is properly configured | ||
### References: | ||
[Intrinsic Function Reference Split](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-split.html) | ||
''' |
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,12 @@ | ||
title = "Sub validation of parameters" | ||
verbose_name = "E1019" | ||
severity = "major" | ||
category = "antipattern" | ||
weight = 70 | ||
tags = ["functions", "sub"] | ||
description = ''' | ||
Making sure the sub function is properly configured | ||
### References: | ||
[Intrinsic Function Reference Sub](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-sub.html) | ||
''' |
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,12 @@ | ||
title = "Ref validation of value" | ||
verbose_name = "E1020" | ||
severity = "major" | ||
category = "antipattern" | ||
weight = 70 | ||
tags = ["functions", "ref"] | ||
description = ''' | ||
Making sure the Ref has a String value (no other functions are supported) | ||
### References: | ||
[Intrinsic Function Reference Ref](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html) | ||
''' |
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,12 @@ | ||
title = "Base64 validation of parameters" | ||
verbose_name = "E1021" | ||
severity = "major" | ||
category = "antipattern" | ||
weight = 70 | ||
tags = ["functions", "base64"] | ||
description = ''' | ||
Making sure the Base64 function is properly configured | ||
### References: | ||
[Intrinsic Function Reference Base64](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-base64.html) | ||
''' |
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,12 @@ | ||
title = "Join validation of parameters" | ||
verbose_name = "E1022" | ||
severity = "major" | ||
category = "antipattern" | ||
weight = 70 | ||
tags = ["functions", "join"] | ||
description = ''' | ||
Making sure the join function is properly configured | ||
### References: | ||
[Intrinsic Function Reference Join](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-join.html) | ||
''' |
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,12 @@ | ||
title = "Validation not function configuration" | ||
verbose_name = "E1023" | ||
severity = "major" | ||
category = "antipattern" | ||
weight = 70 | ||
tags = ["functions", "not"] | ||
description = ''' | ||
Making sure that NOT functions are list | ||
### References: | ||
[Intrinsic Function Reference Conditions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-conditions.html#intrinsic-function-reference-conditions-not) | ||
''' |
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,12 @@ | ||
title = "Cidr validation of parameters" | ||
verbose_name = "E1024" | ||
severity = "major" | ||
category = "antipattern" | ||
weight = 70 | ||
tags = ["functions", "cidr"] | ||
description = ''' | ||
Making sure the function CIDR is a list with valid values | ||
### References: | ||
[Intrinsic Function Reference Cidr](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-cidr.html) | ||
''' |
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,12 @@ | ||
title = "Cannot reference resources in the conditions block of the template" | ||
verbose_name = "E1026" | ||
severity = "major" | ||
category = "antipattern" | ||
weight = 70 | ||
tags = ["conditions", "functions", "ref"] | ||
description = ''' | ||
Check that any Refs in the Conditions block uses no resources | ||
### References: | ||
[Intrinsic Function Reference Conditions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-conditions.html#w2ab2c21c28c21c45) | ||
''' |
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,12 @@ | ||
title = "Check dynamic references secure strings are in supported locations" | ||
verbose_name = "E1027" | ||
severity = "major" | ||
category = "antipattern" | ||
weight = 70 | ||
tags = ["functions", "dynamic reference"] | ||
description = ''' | ||
Dynamic References Secure Strings are only supported for a small set of resource properties. Validate that they are being used in the correct location when checking values and Fn::Sub in resource properties. Currently doesn't check outputs, maps, conditions, parameters, and descriptions. | ||
### References: | ||
[Dynamic References](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html) | ||
''' |
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,12 @@ | ||
title = "Check fn::if structure for validity" | ||
verbose_name = "E1028" | ||
severity = "major" | ||
category = "antipattern" | ||
weight = 70 | ||
tags = ["functions", "if"] | ||
description = ''' | ||
Check Fn::If to make sure its valid. Condition has to be a string. | ||
### References: | ||
[Intrinsic Function Reference Conditions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-conditions.html#intrinsic-function-reference-conditions-if) | ||
''' |
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,12 @@ | ||
title = "Sub is required if a variable is used in a string" | ||
verbose_name = "E1029" | ||
severity = "major" | ||
category = "antipattern" | ||
weight = 70 | ||
tags = ["functions", "sub"] | ||
description = ''' | ||
If a substitution variable exists in a string but isn't wrapped with the Fn::Sub function the deployment will fail. | ||
### References: | ||
[Intrinsic Function Reference Sub](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-sub.html) | ||
''' |
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,12 @@ | ||
title = "Length validation of parameters" | ||
verbose_name = "E1030" | ||
severity = "major" | ||
category = "antipattern" | ||
weight = 70 | ||
tags = ["functions", "length"] | ||
description = ''' | ||
Making sure Fn::Length is configured correctly | ||
### References: | ||
[Intrinsic Function Reference Length](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-length.html) | ||
''' |
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,12 @@ | ||
title = "Tojsonstring validation of parameters" | ||
verbose_name = "E1031" | ||
severity = "major" | ||
category = "antipattern" | ||
weight = 70 | ||
tags = ["functions", "toJsonString"] | ||
description = ''' | ||
Making sure Fn::ToJsonString is configured correctly | ||
### References: | ||
[Intrinsic Function Reference](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference.html) | ||
''' |
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,12 @@ | ||
title = "Validates foreach functions" | ||
verbose_name = "E1032" | ||
severity = "major" | ||
category = "antipattern" | ||
weight = 70 | ||
tags = ["functions", "foreach"] | ||
description = ''' | ||
Validates that ForEach parameters have a valid configuration | ||
### References: | ||
[Intrinsic Function Reference Getatt](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-getatt.html) | ||
''' |
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,12 @@ | ||
title = "Parameters have appropriate properties" | ||
verbose_name = "E2001" | ||
severity = "major" | ||
category = "antipattern" | ||
weight = 70 | ||
tags = ["parameters"] | ||
description = ''' | ||
Making sure the parameters are properly configured | ||
### References: | ||
[Parameters Section Structure](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html) | ||
''' |
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,12 @@ | ||
title = "Parameters have appropriate type" | ||
verbose_name = "E2002" | ||
severity = "major" | ||
category = "antipattern" | ||
weight = 70 | ||
tags = ["parameters"] | ||
description = ''' | ||
Making sure the parameters have a correct type | ||
### References: | ||
[Best Practices](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/best-practices.html#parmtypes) | ||
''' |
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,12 @@ | ||
title = "Parameters have appropriate names" | ||
verbose_name = "E2003" | ||
severity = "major" | ||
category = "antipattern" | ||
weight = 70 | ||
tags = ["parameters"] | ||
description = ''' | ||
Check if Parameters are properly named (A-Za-z0-9) | ||
### References: | ||
[Parameters Section Structure](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html#parameters-section-structure-requirements) | ||
''' |
Oops, something went wrong.