cfn-nag 0.3.77 → 0.3.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/cfn-nag/custom_rules/CodeBuildEncryptionKeyRule.rb +28 -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: f8be8ea425d6d941062f543d9ce0435d99bdeeca7a37c74a748dc758b45c0351
|
4
|
+
data.tar.gz: d5967ff7c8c0322db52e9538ce6906b20d4f49d9875a8dae21adb2567cbde0c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00e18fc68390d9d85c6e4c7dbf129e07dcbeffad24838567e7577748beb5b7bc433cb2d6a06b7cd847c08685d5d6dac0353baa5807df72d50769085b003dad7e
|
7
|
+
data.tar.gz: dfa39f437718e75f411cc4629e1fa3996291487b87d1a635674ac9ab39229510fddb248bdfd23ade120c2afbef464a35b8bc4e4866fa52d2cd4159a1adb0d637
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'cfn-nag/violation'
|
4
|
+
require_relative 'base'
|
5
|
+
|
6
|
+
# Rule class to warn on CodeBuild::Project without an EncryptionKey specified
|
7
|
+
class CodeBuildEncryptionKeyRule < BaseRule
|
8
|
+
def rule_text
|
9
|
+
'CodeBuild project should specify an EncryptionKey value'
|
10
|
+
end
|
11
|
+
|
12
|
+
def rule_type
|
13
|
+
Violation::WARNING
|
14
|
+
end
|
15
|
+
|
16
|
+
def rule_id
|
17
|
+
'W32'
|
18
|
+
end
|
19
|
+
|
20
|
+
def audit_impl(cfn_model)
|
21
|
+
violating_projects = cfn_model.resources_by_type('AWS::CodeBuild::Project')
|
22
|
+
.select do |project|
|
23
|
+
project.encryptionKey.nil?
|
24
|
+
end
|
25
|
+
|
26
|
+
violating_projects.map(&:logical_resource_id)
|
27
|
+
end
|
28
|
+
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.78
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Kascic
|
@@ -141,6 +141,7 @@ files:
|
|
141
141
|
- lib/cfn-nag/custom_rule_loader.rb
|
142
142
|
- lib/cfn-nag/custom_rules/CloudFormationAuthenticationRule.rb
|
143
143
|
- lib/cfn-nag/custom_rules/CloudFrontDistributionAccessLoggingRule.rb
|
144
|
+
- lib/cfn-nag/custom_rules/CodeBuildEncryptionKeyRule.rb
|
144
145
|
- lib/cfn-nag/custom_rules/EFSFileSystemEncryptedRule.rb
|
145
146
|
- lib/cfn-nag/custom_rules/EbsVolumeHasSseRule.rb
|
146
147
|
- lib/cfn-nag/custom_rules/ElastiCacheReplicationGroupAtRestEncryptionRule.rb
|