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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d4eacba2d71f8eb632f29c28caff7581ebb1cf71feeaa19dba7862374158d9a3
4
- data.tar.gz: d88d3e7a663382e0f752a97007a9d77ca438ad5c52b3d33617ed410010afd1f5
3
+ metadata.gz: 62ec69f7d4e3a1a4dd76dff2eabf4e70cb41829ee46769edbc0670b9e7005b90
4
+ data.tar.gz: 3a2bfeeb60175489434468ed278f7d53911563bd6c943645f2b5c09a3bf32b51
5
5
  SHA512:
6
- metadata.gz: 70637b52376a724b66acb967be404dcb909533ccf917dcfbfcf9e9661eefc76753b52a7af11087162111ba17697ea6da60ac0ff44fbab3fb19dd0389d207e9f0
7
- data.tar.gz: 1a3b52785ef6a0f81f33f88fb8a24eb1223cfc126bd7fb968fac173bab7e0983500a9bab220e7d654e3551774e6cf9d2cf4788614471414797ae95aadc2fbdd1
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.60
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