cfn-nag 0.4.53 → 0.4.54

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: a5879a914647027a3279e16ee24ce3a86c0aca1a92d7e045c9b839377477d8a4
4
- data.tar.gz: 94ff330f8d6fc5f2e55732ed62b9b80881643a868cae1b73a5a34703b14467fd
3
+ metadata.gz: 9f1ec99e81c1cb40eb73ada73058cefaa7ca8f5971e9758185151d6d5024cf96
4
+ data.tar.gz: 429177c30d6994c2729fbf8a7b33f160ceb00c63e1e5037ef19e75cdcbd618a6
5
5
  SHA512:
6
- metadata.gz: 360fa59f6f6cf013063a4f4283f6d5ed0ea72d6ccb45a1acfb90a5ad9b47d3fea2f5966bf2188dc02ff7c6aba600abdee6e640eddcb21472047165ce88f95163
7
- data.tar.gz: 7a316065ca4413be9b11c868d9588177d7e2c273f083e030590ba2ef22a9881aa90bebf3ace78affddd124d26e716cc9dc017af7cdd5b3a3c2b40912cf8b1f16
6
+ metadata.gz: 0fd6d418f467e7d2a96de56ee13aba8ff3c2151f5a740a3e78184cf53fcac18d1c54f24f6d521d7897230e66f86d2b6161d9c0b670a805692e6664f7c080b330
7
+ data.tar.gz: 329f13656def76e5490e65bfaa16f75012fee1201de587c727b5b274b2f90a6f4417cc8535d71f6845e291c6fbf0b28ce40c3fe3b43e9955b7c3dfbe68ae23e4
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'cfn-nag/violation'
4
+ require_relative 'base'
5
+
6
+ class SqsQueueKmsMasterKeyIdRule < BaseRule
7
+ def rule_text
8
+ 'SQS Queue should specify KmsMasterKeyId property'
9
+ end
10
+
11
+ def rule_type
12
+ Violation::WARNING
13
+ end
14
+
15
+ def rule_id
16
+ 'W48'
17
+ end
18
+
19
+ def audit_impl(cfn_model)
20
+ violating_sqs_queues = cfn_model.resources_by_type('AWS::SQS::Queue').select do |sqs_queue|
21
+ sqs_queue.kmsMasterKeyId.nil?
22
+ end
23
+
24
+ violating_sqs_queues.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.53
4
+ version: 0.4.54
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Kascic
@@ -237,6 +237,7 @@ files:
237
237
  - lib/cfn-nag/custom_rules/SnsTopicPolicyNotActionRule.rb
238
238
  - lib/cfn-nag/custom_rules/SnsTopicPolicyNotPrincipalRule.rb
239
239
  - lib/cfn-nag/custom_rules/SnsTopicPolicyWildcardPrincipalRule.rb
240
+ - lib/cfn-nag/custom_rules/SqsQueueKmsMasterKeyIdRule.rb
240
241
  - lib/cfn-nag/custom_rules/SqsQueuePolicyNotActionRule.rb
241
242
  - lib/cfn-nag/custom_rules/SqsQueuePolicyNotPrincipalRule.rb
242
243
  - lib/cfn-nag/custom_rules/SqsQueuePolicyWildcardActionRule.rb