cfn-nag 0.3.60 → 0.3.61
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cfn-nag/custom_rules/EFSFileSystemEncryptedRule.rb +27 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62ec69f7d4e3a1a4dd76dff2eabf4e70cb41829ee46769edbc0670b9e7005b90
|
4
|
+
data.tar.gz: 3a2bfeeb60175489434468ed278f7d53911563bd6c943645f2b5c09a3bf32b51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17d17137afd557fb937802c8759c68b7e6d1f144348d3e8fe3e0e26e5c37ed6cb953a1c041330feecf3425308c6e9f9086f8c79889bfe6309202c9139e189efa
|
7
|
+
data.tar.gz: 1c1eec32449461063daa962b56934a9005905debff951941f77241077e9a6c332c64dd816f2978a17963af7f3c53477bfe829dc95a76d4147a5efb11e814f74a
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'cfn-nag/violation'
|
2
|
+
require_relative 'base'
|
3
|
+
|
4
|
+
class EFSFileSystemEncryptedRule < BaseRule
|
5
|
+
def rule_text
|
6
|
+
'EFS FileSystem should have encryption enabled'
|
7
|
+
end
|
8
|
+
|
9
|
+
def rule_type
|
10
|
+
Violation::FAILING_VIOLATION
|
11
|
+
end
|
12
|
+
|
13
|
+
def rule_id
|
14
|
+
'F27'
|
15
|
+
end
|
16
|
+
|
17
|
+
def audit_impl(cfn_model)
|
18
|
+
resources = cfn_model.resources_by_type('AWS::EFS::FileSystem')
|
19
|
+
|
20
|
+
violating_filesystems = resources.select do |filesystem|
|
21
|
+
filesystem.encrypted.nil? ||
|
22
|
+
filesystem.encrypted.to_s.casecmp('false').zero?
|
23
|
+
end
|
24
|
+
|
25
|
+
violating_filesystems.map(&:logical_resource_id)
|
26
|
+
end
|
27
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cfn-nag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.61
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Kascic
|
@@ -139,6 +139,7 @@ files:
|
|
139
139
|
- lib/cfn-nag/custom_rule_loader.rb
|
140
140
|
- lib/cfn-nag/custom_rules/CloudFormationAuthenticationRule.rb
|
141
141
|
- lib/cfn-nag/custom_rules/CloudFrontDistributionAccessLoggingRule.rb
|
142
|
+
- lib/cfn-nag/custom_rules/EFSFileSystemEncryptedRule.rb
|
142
143
|
- lib/cfn-nag/custom_rules/EbsVolumeHasSseRule.rb
|
143
144
|
- lib/cfn-nag/custom_rules/ElastiCacheReplicationGroupAtRestEncryptionRule.rb
|
144
145
|
- lib/cfn-nag/custom_rules/ElastiCacheReplicationGroupTransitEncryptionRule.rb
|