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

[IT-3326] Update python version for PyPlate #405

Merged
merged 3 commits into from
Feb 29, 2024
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
2 changes: 2 additions & 0 deletions .cfnlintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@ ignore_checks:
- E1001
- E2531
- E3001
- W2001
- W3045
ignore_templates:
- templates/tags/*.json
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.5.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-ast
- repo: https://github.com/adrienverge/yamllint
rev: v1.28.0
rev: v1.34.0
hooks:
- id: yamllint
- repo: https://github.com/awslabs/cfn-python-lint
rev: v0.68.0
rev: v0.85.1
hooks:
- id: cfn-python-lint
files: templates/.*\.(json|yml|yaml)$
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.3.1
rev: v1.5.4
hooks:
- id: remove-tabs
10 changes: 3 additions & 7 deletions templates/Config/config.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
# From https://github.com/org-formation/org-formation-reference/blob/master/src/templates/080-aws-config-inventory/config.yml
AWSTemplateFormatVersion: '2010-09-09'

# This is an org-formation file, not a cloudformation file therefore some cfn-lint rules do not apply
# rules reference: https://github.com/aws-cloudformation/cfn-python-lint/blob/master/docs/rules.md#rules-1
Metadata:
cfn-lint:
config:
ignore_checks: [W2001]

Parameters:
resourcePrefix:
Type: String
Expand All @@ -34,6 +27,9 @@ Resources:
BlockPublicPolicy: true
IgnorePublicAcls: true
RestrictPublicBuckets: true
OwnershipControls:
Rules:
- ObjectOwnership: BucketOwnerEnforced
BucketEncryption:
ServerSideEncryptionConfiguration:
- ServerSideEncryptionByDefault:
Expand Down
3 changes: 3 additions & 0 deletions templates/GuardDuty/guard-duty.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ Resources:
Properties:
BucketName: !Sub '${resourcePrefix}-guardduty-finding'
AccessControl: Private
OwnershipControls:
Rules:
- ObjectOwnership: BucketOwnerEnforced
PublicAccessBlockConfiguration:
BlockPublicAcls: true
BlockPublicPolicy: true
Expand Down
5 changes: 0 additions & 5 deletions templates/GuardDuty/trusted-ips-bucket.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
# From https://github.com/org-formation/org-formation-reference/tree/master/src/templates/070-guard-duty
AWSTemplateFormatVersion: '2010-09-09'

Metadata:
cfn-lint:
config:
ignore_checks: [W2001]

Parameters:
resourcePrefix:
Type: String
Expand Down
2 changes: 1 addition & 1 deletion templates/PyPlate/python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Resources:
return macro_response

Handler: index.handler
Runtime: python3.6
Runtime: python3.9
Role: !GetAtt TransformExecutionRole.Arn
TransformFunctionPermissions:
Type: AWS::Lambda::Permission
Expand Down
3 changes: 3 additions & 0 deletions templates/S3/public-bucket.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ Resources:
DeletionPolicy: Delete
Properties:
AccessControl: PublicRead
OwnershipControls:
Rules:
- ObjectOwnership: BucketOwnerEnforced
BucketPolicy:
Type: "AWS::S3::BucketPolicy"
Properties:
Expand Down
6 changes: 6 additions & 0 deletions templates/managed-s3Web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,19 @@ Resources:
Type: 'AWS::S3::Bucket'
Properties:
AccessControl: LogDeliveryWrite
OwnershipControls:
Rules:
- ObjectOwnership: BucketOwnerEnforced
BucketName: !Join
- '.'
- [!Ref SubDomainName, !Ref DomainName, 'logs']
WebsiteBucket:
Type: AWS::S3::Bucket
Properties:
AccessControl: PublicRead
OwnershipControls:
Rules:
- ObjectOwnership: BucketOwnerEnforced
BucketName: !Join
- '.'
- [!Ref SubDomainName, !Ref DomainName]
Expand Down
6 changes: 6 additions & 0 deletions templates/managed-s3WebCloudfront.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,19 @@ Resources:
Type: 'AWS::S3::Bucket'
Properties:
AccessControl: LogDeliveryWrite
OwnershipControls:
Rules:
- ObjectOwnership: BucketOwnerEnforced
BucketName: !Join
- '.'
- [!Ref SubDomainName, !Ref DomainName, 'logs']
WebsiteBucket:
Type: AWS::S3::Bucket
Properties:
AccessControl: PublicRead
OwnershipControls:
Rules:
- ObjectOwnership: BucketOwnerEnforced
BucketName: !Join
- '.'
- [!Ref SubDomainName, !Ref DomainName]
Expand Down
3 changes: 3 additions & 0 deletions templates/s3-redirector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ Resources:
Type: AWS::S3::Bucket
Properties:
AccessControl: PublicRead
OwnershipControls:
Rules:
- ObjectOwnership: BucketOwnerEnforced
BucketName: !Ref SourceHostName
WebsiteConfiguration:
IndexDocument: index.html
Expand Down
Loading