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

V1 - Update to switch to CloudFormation provider schemas #2583

Merged
merged 193 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
193 commits
Select commit Hold shift + click to select a range
3e0ef96
Convert to using CloudFormation provider schemas
kddejong Feb 13, 2023
7be06a2
Remove old CloudFormation specs
kddejong Feb 13, 2023
05c52c2
Provide CloudFormation provider schemas
kddejong Feb 13, 2023
f47ea1f
Increase coverage and update rules
kddejong Feb 14, 2023
a03b275
Clean up circular dependency
kddejong Mar 6, 2023
f1cec30
Release v1.0.0.a1
kddejong Mar 9, 2023
b54f1cf
Fix packaging and keep consistent folder names (#2625)
kddejong Mar 14, 2023
b2c0087
Update caching to not use symlink (#2627)
kddejong Mar 14, 2023
20d8e17
Convert pricing to new schema approach
kddejong Mar 17, 2023
5f1bf8a
update schema specs for 2023/03/17 (#2638)
kddejong Mar 17, 2023
80056a7
Allow for all getatts
kddejong Mar 20, 2023
6f3f68e
Merge in upstream changes
kddejong Mar 31, 2023
511bda4
V1 - cleaning up more rules (#2670)
kddejong Apr 7, 2023
e8bdf51
Restructure data/schemas (#2674)
kddejong Apr 9, 2023
2e8dd63
Update rule E3033 to include minLength (#2680)
kddejong Apr 11, 2023
7ca6e24
Include launch template security group schema (#2681)
kddejong Apr 11, 2023
337df19
Use schema cache to know if we need to validate props again (#2684)
kddejong Apr 12, 2023
2af5c42
Add json schema for CW Alarm period when in the AWS namespace (#2685)
kddejong Apr 13, 2023
2b20fe4
- Create additional schemas to validate zipfile and runtime on lambda…
kddejong Apr 13, 2023
05f6552
Switch getatts from RegexDict to Dict (#2688)
kddejong Apr 13, 2023
9fe8ef0
updates to GetAtt how resource names (#2689)
kddejong Apr 13, 2023
0536aea
Create EC2::VPC schema extensions (#2693)
kddejong Apr 17, 2023
9f5350b
Read boto for enum information (#2702)
kddejong Apr 18, 2023
24eb28a
Complete botocore migrations (#2705)
kddejong Apr 19, 2023
9129a79
Convert manual patches (#2706)
kddejong Apr 20, 2023
3126bc9
Add in schema integration testing (#2708)
kddejong Apr 21, 2023
79d1d5e
Allow for integration the configuration of additional registry schema…
kddejong Apr 22, 2023
716a250
Release v1.0.0.a3 (#2711)
kddejong Apr 23, 2023
6d32f6a
Fix test changes
kddejong Apr 25, 2023
8970595
Increase test coverage (#2717)
kddejong Apr 25, 2023
9aa15c2
Increase coverage for core module (#2724)
kddejong Apr 28, 2023
a558393
test schemas and patch as needed (#2725)
kddejong May 1, 2023
300213d
Release 1.0.0.rc1 (#2726)
kddejong May 1, 2023
1988d54
V1 fixes/rc1 (#2730)
kddejong May 6, 2023
6c8f6d9
Update condition logic to include resource level conditions (#2737)
kddejong May 9, 2023
eaecd92
Release v1.0.0.rc2 (#2738)
kddejong May 9, 2023
28d37c0
Fix an issue where disabled rules will result in an error (#2739)
kddejong May 9, 2023
fa8de18
Fix an issue where GetAtts of arrays are dropped (#2740)
kddejong May 10, 2023
8dc9583
Bunch of fixes based on SAM testing (#2741)
kddejong May 10, 2023
60c1e2e
update schemas for 2023/05/10 (#2742)
kddejong May 10, 2023
cb9d795
V1 - switch to pyproject.toml and pre-commit for lint (#2749)
kddejong May 29, 2023
5bd7d58
V1 - schema/move/cfn schema (#2752)
kddejong Jun 3, 2023
e7cc67d
V1 - Filter jsonschema checks for ref novalue (#2760)
kddejong Jun 13, 2023
b86048c
V1 cleanup/remove/validate ref (#2767)
kddejong Jun 16, 2023
cb5d982
Remove some added files that are no longer needed
kddejong Jun 16, 2023
8f212ba
Release v1.1.0a1 (#2768)
kddejong Jun 17, 2023
5df34be
Fix build command (#2769)
kddejong Jun 19, 2023
a67c11d
Fixes from SAM testing with update specs (#2774)
kddejong Jun 21, 2023
1544d2a
Move required field for lambda eventsource mappings (#2775)
kddejong Jun 21, 2023
237766e
Release 1.1.0.a2 (#2776)
kddejong Jun 21, 2023
cbd326b
Merge in upstream changes
kddejong Jul 26, 2023
8d15b1d
Bring back deletion policy testing
kddejong Jul 28, 2023
eb9af9f
Upstream cleanup
kddejong Jul 28, 2023
7f03e1f
restructure fn handling to enable foreach
kddejong Jul 31, 2023
47ec7ab
Update schemas to 2023/08/04
kddejong Aug 4, 2023
13f88aa
Move away from functions to jsonschema validators
kddejong Aug 11, 2023
ba47d28
Supported nested json types
kddejong Aug 12, 2023
697b965
Provide value based validation when using fns
kddejong Sep 13, 2023
6022fb2
Support condition functions
kddejong Sep 14, 2023
26e5407
update specs and implement some fixes
kddejong Sep 24, 2023
b92ea32
Update specs and fix test errors
kddejong Sep 27, 2023
3082a73
Add rule E3009 to validate CloudFormation init
kddejong Oct 5, 2023
7fa0743
Including more support for ForEach
kddejong Oct 20, 2023
2136c33
Go back to using foreach transform
kddejong Nov 1, 2023
35c84c9
Clean up some extra code
kddejong Nov 1, 2023
fe32ee3
update schemas from 01/11/2023
kddejong Nov 1, 2023
a013197
Create more schema patches
kddejong Nov 1, 2023
6140a8c
Add resolution for Fn::Sub and Fn::FindInMap (#2935)
kddejong Nov 2, 2023
9cc239e
Code cleanup and improve testing
kddejong Nov 2, 2023
d833e13
Cleanup function validation logic
kddejong Nov 6, 2023
bdfc92e
Remove extra code and improve testing
kddejong Nov 8, 2023
77d914e
Update resources that support all property types for GetAtt
kddejong Nov 8, 2023
bd226ac
Update specs for 2023-11-08
kddejong Nov 8, 2023
80ee079
Improve context parameter logic
kddejong Nov 9, 2023
28fa605
Update GetAtts for all attributes
kddejong Nov 9, 2023
27fc3f5
Remove extra print statement
kddejong Nov 9, 2023
526c42a
Convert property name checks and limit checks
kddejong Nov 10, 2023
4c6a6c1
Convert mappings to JSON Schema validation
kddejong Nov 11, 2023
227c418
Add Parameters to JSON Schema validation
kddejong Nov 13, 2023
72f990e
Release 1.2.0.a1
kddejong Nov 13, 2023
44a50e3
Fix issues with FnGetAtt and validating types in json schemas
kddejong Nov 14, 2023
d26d53d
Release 1.2.1.a1
kddejong Nov 14, 2023
d21b130
Update json schema MIT licensing
kddejong Nov 15, 2023
ca5470a
Clean up AWS::CloudFormation::Init validation
kddejong Nov 16, 2023
85edce0
Rework rules and remove some backwards compatibility items
kddejong Nov 17, 2023
41c1b0a
Redo the runner logic
kddejong Nov 22, 2023
cffefe3
Redo API logic to create more freedom
kddejong Dec 4, 2023
d1d828d
Update specs to 23/12/5
kddejong Dec 5, 2023
7e7e171
Improve test coverage
kddejong Dec 6, 2023
93c87d5
Increase rules file test coverage
kddejong Dec 6, 2023
617cea9
Maintain backwards compatibility with API
kddejong Dec 7, 2023
dddb0c0
Release v1.2.1.a2
kddejong Dec 7, 2023
b99cf6c
Pass all error types through Fn::IF
kddejong Dec 8, 2023
513f48c
Changes to fix merging in main
kddejong Dec 15, 2023
f02510e
Update specs to 23/12/15
kddejong Dec 15, 2023
be4ee84
Release v1.2.1.a3
kddejong Dec 15, 2023
ee9a35b
V1 - Cleanup some of the function rules (#2983)
kddejong Dec 21, 2023
a73adc0
Remove redundant Fn::Length logic (#2985)
kddejong Dec 21, 2023
8285a79
Remove extra new specs
kddejong Dec 22, 2023
93ff704
Update specs for 2023/12/22
kddejong Dec 22, 2023
82641e9
Fix spec issues
kddejong Dec 22, 2023
cc7a2b5
Update schemas for DBInstance KmsKeyId (#2989)
kddejong Dec 22, 2023
f65cc72
Add rule E3046 to validate ECS log config when AWS (#2990)
kddejong Dec 27, 2023
0f2621f
Add uniqueKeys validation to jsonschema validation (#2992)
kddejong Dec 28, 2023
a69ee27
V1 iam/policy/validation (#2997)
kddejong Jan 4, 2024
9d9184a
V1 - Updates to IAM resource policy validations (#2998)
kddejong Jan 5, 2024
0cc7c74
Validate a resource type is str
kddejong Jan 5, 2024
982e665
Continue to add resources/params even if misconfigured
kddejong Jan 5, 2024
4f18a29
Fix path for parameters context
kddejong Jan 5, 2024
34f5dcb
Add dependentExcluded and cleanup (#3002)
kddejong Jan 7, 2024
b846904
Make context more effecient (#3007)
kddejong Jan 10, 2024
53a2fc5
Release v1.2.2.a1 (#3008)
kddejong Jan 10, 2024
9b2e785
Update resource specs to 2024/01/10
kddejong Jan 10, 2024
96c074a
Clean Resource policy validation (#3010)
kddejong Jan 11, 2024
9162515
V1 cleanup/template/schema (#3011)
kddejong Jan 16, 2024
71e0df6
Remove extra code in conditions (#3012)
kddejong Jan 17, 2024
3e865f4
Restructure more rules based on json schema validation (#3018)
kddejong Jan 18, 2024
11e5db5
Update ResourcePath Pattern to check for staring / (#3019)
kddejong Jan 19, 2024
dea4cef
Add rule E3019 to validate primaryIdentifiers are unique (#3023)
kddejong Jan 20, 2024
970db7c
Handle refs in REF type checks (#3024)
kddejong Jan 20, 2024
36e4d34
Make sure resource types are strings before assuming (#3025)
kddejong Jan 21, 2024
559c9b6
Add rules for security group validation (#3026)
kddejong Jan 22, 2024
04be5c1
V1 - Additional GetAtt support for non registry resources (#3027)
kddejong Jan 22, 2024
2597a4a
v1 - Add E3021 for validate tagging values (#3031)
kddejong Jan 23, 2024
c1bcda2
Ignore_checks was being ignored when the rule was a parent (#3032)
kddejong Jan 23, 2024
8539729
Release v1.2.3.a1 (#3034)
kddejong Jan 23, 2024
6203b9a
Start migration from node special functions
kddejong Jan 24, 2024
65d3f3c
Remove need for sub node
kddejong Jan 24, 2024
cb7721f
Rewrite a few more rules and cleanup
kddejong Jan 25, 2024
e9a8793
Update rule E3025 to validate RDS instance class by license
kddejong Jan 25, 2024
b8ea068
Update rule to W3037 for json schema based validation
kddejong Jan 26, 2024
e0ccba4
Switch to CfnLint keyword
kddejong Jan 29, 2024
c65b934
Move from cfnSchema to cfnLint
kddejong Jan 30, 2024
e57bb84
Bring in testing for cfnLint keyword
kddejong Feb 2, 2024
e1726ce
Clean up remaining node functions (#3048)
kddejong Feb 7, 2024
125355a
Release v1.2.4a1 (#3049)
kddejong Feb 7, 2024
53bb68e
Fix some discovered issues (#3050)
kddejong Feb 7, 2024
75a182d
Release v1.2.5a1 (#3051)
kddejong Feb 7, 2024
b14fae3
V1 - remove ContextManager and update specs (#3053)
kddejong Feb 8, 2024
eb8d837
V1 - Updates (#3055)
kddejong Feb 13, 2024
61222e3
V1 - clean function validation (#3056)
kddejong Feb 15, 2024
9e642da
Clean up fn tests (#3057)
kddejong Feb 15, 2024
d97f5c7
Merge upstream changes
kddejong Feb 16, 2024
37f8717
Remove some extra unneeded code (#3062)
kddejong Feb 19, 2024
d92db10
Release v1.2.5a2 (#3063)
kddejong Feb 19, 2024
3ffde58
V1 - Better dynamic reference support (#3064)
kddejong Feb 21, 2024
ab5fbca
Better NoEcho validation and Fn::Sub fixes (#3068)
kddejong Feb 22, 2024
9081fca
Even more appropriate dynamic references (#3071)
kddejong Feb 23, 2024
57df7db
add in more new rule testing (#3072)
kddejong Feb 23, 2024
a80d056
Validate GetAtts are strings in Join and Split (#3075)
kddejong Feb 26, 2024
08363a5
Add requiredXor for CloudFront distribution cache behavior (#3078)
kddejong Feb 26, 2024
829ad2e
Update pre-commit items and fixes
kddejong Feb 27, 2024
6301d23
update specs as of 2024/02/08 (#3081)
kddejong Feb 28, 2024
8d9da3a
Release v1.2.5a3 (#3082)
kddejong Feb 29, 2024
3714ca5
V1 - Update testing configuration and convert from codecov (#3083)
kddejong Feb 29, 2024
64ad6fd
Add more testing (#3087)
kddejong Mar 4, 2024
35595fd
Merge and fix upstream changes
kddejong Mar 4, 2024
097b07e
Cleanup of more rules (#3088)
kddejong Mar 6, 2024
e2d3534
new rule E3689 to validate DBCluster monitoring config (#3089)
kddejong Mar 7, 2024
176b444
V1 - Add rule E3690 and E3691 to validate RDS engine and versions (#3…
kddejong Mar 7, 2024
0baf7fc
Add back in coverage.io (#3091)
kddejong Mar 7, 2024
96d0190
New rules for RDS DBCluster E3692-4 (#3094)
kddejong Mar 10, 2024
d37dadd
Release v1.2.5a4 (#3096)
kddejong Mar 12, 2024
4f39e09
Show all context errors (#3097)
kddejong Mar 14, 2024
da4d0a6
Release v1.2.5a5 (#3098)
kddejong Mar 14, 2024
097eb91
V1 - cleanup/2024/03/14 (#3115)
kddejong Mar 22, 2024
89d1369
Update specs and add rule E3660 (#3117)
kddejong Mar 25, 2024
5de0ed9
Update specs and create rules W3689,W3688 (#3118)
kddejong Mar 25, 2024
860b9fe
Don't support resources in a FindInMap (#3120)
kddejong Mar 26, 2024
fdcb28d
Cleanup rule rewrite (#3122)
kddejong Mar 26, 2024
998f6dd
Fix upstream changes
kddejong Apr 4, 2024
3052378
Patch dynamodb tables to check schemas (#3133)
kddejong Apr 5, 2024
b29eacb
More cleanup to change APIs (#3144)
kddejong Apr 15, 2024
6af0ee2
Check for unsupported element combination (#3146)
kddejong Apr 15, 2024
4f4ad0b
Release v1.2.5.a6 (#3148)
kddejong Apr 16, 2024
2549fd2
Cleanup doc links in rules (#3152)
kddejong Apr 18, 2024
5470eb5
Sort more enum values to create more consistency (#3161)
kddejong Apr 23, 2024
de230f7
newline in script json dumps (#3162)
kddejong Apr 23, 2024
24e8472
V1 fix config of regions in TemplateRunner (#3164)
kddejong Apr 24, 2024
9767f5f
Update CloudFormation schemas to 2024-04-24 (#3159)
github-actions[bot] Apr 24, 2024
d4fa206
V1 cleanup tests (#3165)
kddejong Apr 24, 2024
6e4864e
Release v1.2.5.a7 (#3166)
kddejong Apr 24, 2024
f840550
Remove old il-central-1 cloudspec
kddejong Apr 25, 2024
b31e5a5
Clean up retention period on rds instance (#3172)
kddejong Apr 26, 2024
74d72a3
Clean up some rebase issues
kddejong Apr 26, 2024
9c60f9f
Fix a test that started failing after rebase (#3173)
kddejong Apr 26, 2024
dfd5c73
Clean docs and some rule links (#3175)
kddejong May 1, 2024
d434f37
chore(schemas) - Update CloudFormation schemas to 2024-05-01 (#3167)
github-actions[bot] May 1, 2024
9fde80f
Update some graph quoting issues
kddejong May 2, 2024
b1808c0
Update PR CI github action for v1
kddejong May 2, 2024
b49b0ad
Update tests based on updated ruff
kddejong May 2, 2024
53f3706
V1 - cleanup config and add more tests (#3204)
kddejong May 2, 2024
899c8b0
Update API documentation (#3206)
kddejong May 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 0 additions & 3 deletions .coveragerc

This file was deleted.

2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/1.bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ body:

For reference, the current version of cfn-lint is <img src="https://badge.fury.io/py/cfn-lint.svg" />.

Cfn-lint uses the [CloudFormation Resource Specifications](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-resource-specification.html) as the base to do validation. These files are included as part of the application version. Please update to the latest version of `cfn-lint` or update the spec files manually (`cfn-lint -u`)
Cfn-lint uses the [CloudFormation resource provider schemas](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resource-type-schemas.html) as the base to do validation. These files are included as part of the application version. Please update to the latest version of `cfn-lint` or update the spec files manually (`cfn-lint -u`)
- type: input
attributes:
label: CloudFormation Lint Version
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/cd-pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ jobs:
python-version: "3.x"
- name: Install dependencies
run: |
pip install --upgrade setuptools wheel twine
pip install --upgrade pip
pip install --upgrade setuptools build wheel twine
- name: Build and publish
run: |
python setup.py sdist bdist_wheel
python -m build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/ci-branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ jobs:
python-version: ${{ matrix.python }}
- name: Install Tox and any other packages
run: pip install tox
- name: Run Lint
run: |
pip install pre-commit
pre-commit run --all-files
- name: Run Tox
run: |
tox -e style
tox -e type
tox -e py
- uses: codecov/[email protected]
tox -e py -- -m "data or not data"
- uses: codecov/[email protected]
if: matrix.os == 'ubuntu-latest'
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down Expand Up @@ -71,3 +73,4 @@ jobs:
with:
ignore-vulns: |
GHSA-r9hx-vwmv-q579
PYSEC-2022-43012
9 changes: 6 additions & 3 deletions .github/workflows/ci-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ jobs:
python-version: ${{ matrix.python }}
- name: Install Tox and any other packages
run: pip install tox
- name: Run Lint
run: |
pip install pre-commit
pre-commit run --all-files
- name: Run Tox
run: |
tox -e style
tox -e type
tox -e py
tox -e py -- -m "data or not data"
mv coverage.xml coverage-${{ matrix.python }}.xml
- name: Store coverage file
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -78,3 +80,4 @@ jobs:
with:
ignore-vulns: |
GHSA-r9hx-vwmv-q579
PYSEC-2022-43012
5 changes: 3 additions & 2 deletions .github/workflows/maintenance-v0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: 3
-
-
id: maintenance
run: |
latest_sam_cli=`curl -s https://api.github.com/repos/aws/aws-sam-cli/releases/latest | jq -r .tag_name | cut -c 2-`
Expand All @@ -26,6 +26,7 @@ jobs:
scripts/update_specs_services_from_ssm.py
scripts/update_specs_from_pricing.py
scripts/update_serverless_aws_policies.py
scripts/update_schemas_from_aws_api.py
cfn-lint --update-specs
echo "specversion=$(jq -r .ResourceSpecificationVersion src/cfnlint/data/CloudSpecs/us-east-1.json)" >> $GITHUB_OUTPUT
echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
Expand All @@ -40,7 +41,7 @@ jobs:
body: |
- Update CloudFormation specs to ${{ steps.maintenance.outputs.specversion }}
- Update Specs from pricing data as of ${{ steps.maintenance.outputs.date }}

Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action
delete-branch: true
title: chore(specs) - Update CloudFormation specs to ${{ steps.maintenance.outputs.specversion }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ htmlcov/
.coverage
.coverage.*
.cache
.pytest_cache/
.ruff_cache/
nosetests.xml
coverage.xml
*.cover
Expand Down
44 changes: 44 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-ast
- id: check-json
exclude: "(test/fixtures/templates/bad/json_parse.json|test/fixtures/templates/bad/core/config_invalid_json.json|test/fixtures/templates/bad/duplicate.json)"
- id: check-toml
- id: check-vcs-permalinks
- id: check-yaml
exclude: "test/fixtures/templates/"
args: [--unsafe]
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
args: [--fix, auto]
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 24.2.0
hooks:
- id: black
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.2.2"
hooks:
- id: ruff
- repo: https://github.com/PyCQA/bandit
rev: "1.7.7"
hooks:
- id: bandit
additional_dependencies:
- "bandit[toml]"
args: ["-c", "pyproject.toml"]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.8.0"
hooks:
- id: mypy
additional_dependencies:
- "types-PyYAML"
- "types-regex"
- "types-requests"
Loading
Loading