-
Notifications
You must be signed in to change notification settings - Fork 116
/
no_plaintext_secrets.cf.go
88 lines (84 loc) · 2.19 KB
/
no_plaintext_secrets.cf.go
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
80
81
82
83
84
85
86
87
88
package ecs
var cloudFormationNoPlaintextSecretsGoodExamples = []string{
`---
Resources:
GoodExample:
Type: 'AWS::ECS::Cluster'
Properties:
ClusterName: MyCluster
ClusterSettings:
- Name: containerInsights
Value: enabled
GoodTask:
Type: AWS::ECS::TaskDefinition
Properties:
Family: "CFSec scan"
Cpu: 512
Memory: 1024
NetworkMode: awsvpc
RequiresCompatibilities:
- FARGATE
- EC2
ContainerDefinitions:
- Name: cfsec
Image: cfsec/cfsec:latest
MountPoints:
- SourceVolume: src
ContainerPath: /src
LogConfiguration:
LogDriver: awslogs
Options:
awslogs-group: "cfsec-logs"
awslogs-region: !Ref AWS::Region
awslogs-stream-prefix: "cfsec"
Volumes:
- Name: jenkins-home
EFSVolumeConfiguration:
FilesystemId: "fs1"
TransitEncryption: ENABLED
`,
}
var cloudFormationNoPlaintextSecretsBadExamples = []string{
`---
Resources:
BadExample:
Type: 'AWS::ECS::Cluster'
Properties:
ClusterName: MyCluster
ClusterSettings:
- Name: containerInsights
Value: enabled
BadTask:
Type: AWS::ECS::TaskDefinition
Properties:
Family: "CFSec scan"
Cpu: 512
Memory: 1024
NetworkMode: awsvpc
RequiresCompatibilities:
- FARGATE
- EC2
ContainerDefinitions:
- Name: cfsec
Image: cfsec/cfsec:latest
Environment:
- Name: AWS_ACCESS_KEY_ID
Value: AIPA8YOHGIS58IBFDU3E
MountPoints:
- SourceVolume: src
ContainerPath: /src
LogConfiguration:
LogDriver: awslogs
Options:
awslogs-group: "cfsec-logs"
awslogs-region: !Ref AWS::Region
awslogs-stream-prefix: "cfsec"
Volumes:
- Name: jenkins-home
EFSVolumeConfiguration:
FilesystemId: "fs1"
TransitEncryption: DISABLED
`,
}
var cloudFormationNoPlaintextSecretsLinks = []string{}
var cloudFormationNoPlaintextSecretsRemediationMarkdown = ``