cfn-nag 0.4.53 → 0.4.54
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/SqsQueueKmsMasterKeyIdRule.rb +26 -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: 9f1ec99e81c1cb40eb73ada73058cefaa7ca8f5971e9758185151d6d5024cf96
|
4
|
+
data.tar.gz: 429177c30d6994c2729fbf8a7b33f160ceb00c63e1e5037ef19e75cdcbd618a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
|