Skip to content

Commit

Permalink
feat: add cfn-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
vishnu-deepsource committed Oct 27, 2023
1 parent ec03446 commit ff2612f
Show file tree
Hide file tree
Showing 162 changed files with 3,404 additions and 0 deletions.
7 changes: 7 additions & 0 deletions analyzers/cfn-lint/.deepsource/analyzer/analyzer.toml
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."
4 changes: 4 additions & 0 deletions analyzers/cfn-lint/.deepsource/analyzer/example_config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
version = 1

[[analyzers]]
name = "cfn-lint"
11 changes: 11 additions & 0 deletions analyzers/cfn-lint/.deepsource/analyzer/issues/CFLIN-E0002.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title = "Error processing rule on the template"
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)
'''
11 changes: 11 additions & 0 deletions analyzers/cfn-lint/.deepsource/analyzer/issues/CFLIN-E1001.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title = "Basic CloudFormation Template Configuration"
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)
'''
11 changes: 11 additions & 0 deletions analyzers/cfn-lint/.deepsource/analyzer/issues/CFLIN-E1002.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title = "Template size limit"
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)
'''
11 changes: 11 additions & 0 deletions analyzers/cfn-lint/.deepsource/analyzer/issues/CFLIN-E1003.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title = "Template description limit"
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)
'''
11 changes: 11 additions & 0 deletions analyzers/cfn-lint/.deepsource/analyzer/issues/CFLIN-E1004.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title = "Template description can only be a string"
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)
'''
11 changes: 11 additions & 0 deletions analyzers/cfn-lint/.deepsource/analyzer/issues/CFLIN-E1010.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title = "GetAtt validation of parameters"
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)
'''
11 changes: 11 additions & 0 deletions analyzers/cfn-lint/.deepsource/analyzer/issues/CFLIN-E1011.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title = "FindInMap validation of configuration"
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)
'''
11 changes: 11 additions & 0 deletions analyzers/cfn-lint/.deepsource/analyzer/issues/CFLIN-E1012.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title = "Check if Refs exist"
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)
'''
11 changes: 11 additions & 0 deletions analyzers/cfn-lint/.deepsource/analyzer/issues/CFLIN-E1015.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title = "GetAz validation of parameters"
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)
'''
11 changes: 11 additions & 0 deletions analyzers/cfn-lint/.deepsource/analyzer/issues/CFLIN-E1016.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title = "ImportValue validation of parameters"
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)
'''
11 changes: 11 additions & 0 deletions analyzers/cfn-lint/.deepsource/analyzer/issues/CFLIN-E1017.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title = "Select validation of parameters"
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)
'''
11 changes: 11 additions & 0 deletions analyzers/cfn-lint/.deepsource/analyzer/issues/CFLIN-E1018.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title = "Split validation of parameters"
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)
'''
11 changes: 11 additions & 0 deletions analyzers/cfn-lint/.deepsource/analyzer/issues/CFLIN-E1019.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title = "Sub validation of parameters"
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)
'''
11 changes: 11 additions & 0 deletions analyzers/cfn-lint/.deepsource/analyzer/issues/CFLIN-E1020.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title = "Ref validation of value"
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)
'''
11 changes: 11 additions & 0 deletions analyzers/cfn-lint/.deepsource/analyzer/issues/CFLIN-E1021.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title = "Base64 validation of parameters"
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)
'''
11 changes: 11 additions & 0 deletions analyzers/cfn-lint/.deepsource/analyzer/issues/CFLIN-E1022.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title = "Join validation of parameters"
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)
'''
11 changes: 11 additions & 0 deletions analyzers/cfn-lint/.deepsource/analyzer/issues/CFLIN-E1023.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title = "Validation NOT function configuration"
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)
'''
11 changes: 11 additions & 0 deletions analyzers/cfn-lint/.deepsource/analyzer/issues/CFLIN-E1024.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title = "Cidr validation of parameters"
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)
'''
11 changes: 11 additions & 0 deletions analyzers/cfn-lint/.deepsource/analyzer/issues/CFLIN-E1026.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title = "Cannot reference resources in the Conditions block of the template"
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)
'''
11 changes: 11 additions & 0 deletions analyzers/cfn-lint/.deepsource/analyzer/issues/CFLIN-E1027.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title = "Check dynamic references secure strings are in supported locations"
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)
'''
11 changes: 11 additions & 0 deletions analyzers/cfn-lint/.deepsource/analyzer/issues/CFLIN-E1028.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title = "Check Fn::If structure for validity"
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)
'''
11 changes: 11 additions & 0 deletions analyzers/cfn-lint/.deepsource/analyzer/issues/CFLIN-E1029.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title = "Sub is required if a variable is used in a string"
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)
'''
11 changes: 11 additions & 0 deletions analyzers/cfn-lint/.deepsource/analyzer/issues/CFLIN-E1030.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title = "Length validation of parameters"
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)
'''
11 changes: 11 additions & 0 deletions analyzers/cfn-lint/.deepsource/analyzer/issues/CFLIN-E1031.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title = "ToJsonString validation of parameters"
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)
'''
11 changes: 11 additions & 0 deletions analyzers/cfn-lint/.deepsource/analyzer/issues/CFLIN-E1032.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title = "Validates ForEach functions"
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)
'''
11 changes: 11 additions & 0 deletions analyzers/cfn-lint/.deepsource/analyzer/issues/CFLIN-E2001.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title = "Parameters have appropriate properties"
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)
'''
11 changes: 11 additions & 0 deletions analyzers/cfn-lint/.deepsource/analyzer/issues/CFLIN-E2002.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title = "Parameters have appropriate type"
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)
'''
11 changes: 11 additions & 0 deletions analyzers/cfn-lint/.deepsource/analyzer/issues/CFLIN-E2003.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title = "Parameters have appropriate names"
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)
'''
11 changes: 11 additions & 0 deletions analyzers/cfn-lint/.deepsource/analyzer/issues/CFLIN-E2010.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title = "Parameter limit not exceeded"
severity = "major"
category = "antipattern"
weight = 70
tags = ["parameters", "limits"]
description = '''
Check the number of Parameters in the template is less than the upper limit
### References:
[CloudFormation Limits](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cloudformation-limits.html)
'''
11 changes: 11 additions & 0 deletions analyzers/cfn-lint/.deepsource/analyzer/issues/CFLIN-E2011.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title = "Parameter name limit not exceeded"
severity = "major"
category = "antipattern"
weight = 70
tags = ["parameters", "limits"]
description = '''
Check the size of Parameter names in the template is less than the upper limit
### References:
[CloudFormation Limits](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cloudformation-limits.html)
'''
11 changes: 11 additions & 0 deletions analyzers/cfn-lint/.deepsource/analyzer/issues/CFLIN-E2012.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title = "Parameter value limit not exceeded"
severity = "major"
category = "antipattern"
weight = 70
tags = ["parameters", "limits"]
description = '''
Check if the size of Parameter values in the template is less than the upper limit
### References:
[CloudFormation Limits](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cloudformation-limits.html)
'''
11 changes: 11 additions & 0 deletions analyzers/cfn-lint/.deepsource/analyzer/issues/CFLIN-E2014.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title = "Default value cannot use Refs"
severity = "major"
category = "antipattern"
weight = 70
tags = ["parameters", "ref"]
description = '''
Check if Refs are not used in Parameter Defaults
### References:
[Parameters Section Structure](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html)
'''
Loading

0 comments on commit ff2612f

Please sign in to comment.