cfn-nag 0.4.52 → 0.4.53

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 118f5af5b9cc0753b163d3da8e37cf39e26896c59e4b073c5e70b6a4145c849a
4
- data.tar.gz: 41cb49bcbd84761346fa3dd103b4a97ad20a447c08c3a47adc4787d2f225714c
3
+ metadata.gz: a5879a914647027a3279e16ee24ce3a86c0aca1a92d7e045c9b839377477d8a4
4
+ data.tar.gz: 94ff330f8d6fc5f2e55732ed62b9b80881643a868cae1b73a5a34703b14467fd
5
5
  SHA512:
6
- metadata.gz: 61ef02b86708c5bd572a54b2fc8efdc7b7efc73fff0d2c7fdacd0a73004e9bdcd73ab0689253fb7b4d726728675bb5d9615ca6134494ffe9d5f462c82f11572f
7
- data.tar.gz: 9b99a0795120b3e2b28249182c4379dea008abc6b78b4b27c601ba5d0223f15a4eddfb34030f9be507d4dc5b5cc0c22d8238fb5d6ce4b0d522c11ed971caf246
6
+ metadata.gz: 360fa59f6f6cf013063a4f4283f6d5ed0ea72d6ccb45a1acfb90a5ad9b47d3fea2f5966bf2188dc02ff7c6aba600abdee6e640eddcb21472047165ce88f95163
7
+ data.tar.gz: 7a316065ca4413be9b11c868d9588177d7e2c273f083e030590ba2ef22a9881aa90bebf3ace78affddd124d26e716cc9dc017af7cdd5b3a3c2b40912cf8b1f16
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'cfn-nag/violation'
4
+ require_relative 'base'
5
+
6
+ class SnsTopicKmsMasterKeyIdRule < BaseRule
7
+ def rule_text
8
+ 'SNS Topic should specify KmsMasterKeyId property'
9
+ end
10
+
11
+ def rule_type
12
+ Violation::WARNING
13
+ end
14
+
15
+ def rule_id
16
+ 'W47'
17
+ end
18
+
19
+ def audit_impl(cfn_model)
20
+ violating_sns_topics = cfn_model.resources_by_type('AWS::SNS::Topic').select do |topic|
21
+ topic.kmsMasterKeyId.nil?
22
+ end
23
+
24
+ violating_sns_topics.map(&:logical_resource_id)
25
+ end
26
+ 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.4.52
4
+ version: 0.4.53
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Kascic
@@ -233,6 +233,7 @@ files:
233
233
  - lib/cfn-nag/custom_rules/SecurityGroupIngressPortRangeRule.rb
234
234
  - lib/cfn-nag/custom_rules/SecurityGroupMissingEgressRule.rb
235
235
  - lib/cfn-nag/custom_rules/SecurityGroupRuleDescriptionRule.rb
236
+ - lib/cfn-nag/custom_rules/SnsTopicKmsMasterKeyIdRule.rb
236
237
  - lib/cfn-nag/custom_rules/SnsTopicPolicyNotActionRule.rb
237
238
  - lib/cfn-nag/custom_rules/SnsTopicPolicyNotPrincipalRule.rb
238
239
  - lib/cfn-nag/custom_rules/SnsTopicPolicyWildcardPrincipalRule.rb