forked from aws-cloudformation/cfn-lint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhard_coded_arn_properties.yaml
79 lines (73 loc) · 2.14 KB
/
hard_coded_arn_properties.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
AWSTemplateFormatVersion: 2010-09-09
Resources:
S3BadBucket:
Type: AWS::S3::Bucket
Properties:
AccessControl: Private
NotificationConfiguration:
TopicConfigurations:
- Topic: !Sub arn:aws:sns:us-east-1:123456789012:TestTopic
Event: s3:ReducedRedundancyLostObject
SampleBadBucketPolicy:
Type: AWS::S3::BucketPolicy
Properties:
Bucket: !Ref S3BadBucket
PolicyDocument:
Statement:
- Action:
- s3:GetObject
Effect: Allow
Resource: !Sub arn:aws:s3:::${S3BadBucket}
Principal: "*"
SampleRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Principal:
Service:
- ec2.amazonaws.com
Action:
- 'sts:AssumeRole'
Path: /
SampleBadIAMPolicy1:
Type: AWS::IAM::ManagedPolicy
Properties:
PolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Action:
- sns:Publish
Resource: !Sub arn:${AWS::Partition}:sns:us-east-1:${AWS::AccountId}:TestTopic
Roles:
- !Ref SampleRole
SampleBadIAMPolicy2:
Type: AWS::IAM::ManagedPolicy
Properties:
PolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Action:
- sns:Publish
Resource:
- !Sub arn:${AWS::Partition}:sns:us-east-1:${AWS::AccountId}:TestTopic
- !Sub arn:${AWS::Partition}:sns:${AWS::Region}:${AWS::AccountId}:TestTopic
Roles:
- !Ref SampleRole
SampleBadIAMPolicy3:
Type: AWS::IAM::ManagedPolicy
Properties:
PolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Action:
- sns:Publish
Resource:
- !Sub arn:${AWS::Partition}:sns:${AWS::Partition}:${AWS::AccountId}:TestTopic
Roles:
- !Ref SampleRole