cfn-nag 0.6.19 → 0.7.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5bab5df0a11168002cb70199493b3de0efd6255d8344c07f919717dffa3f0e24
|
4
|
+
data.tar.gz: 6a82a1c29f40b1cbe2be3349ef3f1e0e750e50c3a48b8956a1c1a8781a6f8993
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d91b025958b18d897344dd641a7e62271e6d7fdcd3a9dc55dd2111eb06b79f728382767855e9353719956479db3e4ad62e7e020144f729a68d1fc6275517a49
|
7
|
+
data.tar.gz: 82409f7caf323b64566834e92a50e496514375ca0b5d218cd29ebc74cca13f51b4742820d60b5a7b3ef3e41b08b1c54c573dea79d38bf16fe350959ec9c7d22b
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'cfn-nag/violation'
|
4
|
+
require 'cfn-nag/util/truthy'
|
5
|
+
require_relative 'base'
|
6
|
+
|
7
|
+
class DLMLifecyclePolicyCrossRegionCopyEncryptionRule < BaseRule
|
8
|
+
def rule_text
|
9
|
+
'DLM LifecyclePolicy PolicyDetails Actions CrossRegionCopy EncryptionConfiguration should enable Encryption'
|
10
|
+
end
|
11
|
+
|
12
|
+
def rule_type
|
13
|
+
Violation::WARNING
|
14
|
+
end
|
15
|
+
|
16
|
+
def rule_id
|
17
|
+
'W81'
|
18
|
+
end
|
19
|
+
|
20
|
+
def audit_impl(cfn_model)
|
21
|
+
violating_policies = cfn_model.resources_by_type('AWS::DLM::LifecyclePolicy').select do |policy|
|
22
|
+
if policy.policyDetails['Actions'].nil?
|
23
|
+
false
|
24
|
+
else
|
25
|
+
violating_actions = policy.policyDetails['Actions'].select do |action|
|
26
|
+
violating_copies = action['CrossRegionCopy'].select do |copy|
|
27
|
+
!truthy?(copy['EncryptionConfiguration']['Encrypted'].to_s)
|
28
|
+
end
|
29
|
+
!violating_copies.empty?
|
30
|
+
end
|
31
|
+
!violating_actions.empty?
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
violating_policies.map(&:logical_resource_id)
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'cfn-nag/violation'
|
4
|
+
require_relative 'base'
|
5
|
+
|
6
|
+
class KendraIndexServerSideEncryptionConfigurationKmsKeyIdRule < BaseRule
|
7
|
+
def rule_text
|
8
|
+
'Kendra Index ServerSideEncryptionConfiguration should specify a KmsKeyId value.'
|
9
|
+
end
|
10
|
+
|
11
|
+
def rule_type
|
12
|
+
Violation::WARNING
|
13
|
+
end
|
14
|
+
|
15
|
+
def rule_id
|
16
|
+
'W80'
|
17
|
+
end
|
18
|
+
|
19
|
+
def audit_impl(cfn_model)
|
20
|
+
violating_indices = cfn_model.resources_by_type('AWS::Kendra::Index').select do |index|
|
21
|
+
index.serverSideEncryptionConfiguration.nil? ||
|
22
|
+
index.serverSideEncryptionConfiguration['KmsKeyId'].nil?
|
23
|
+
end
|
24
|
+
|
25
|
+
violating_indices.map(&:logical_resource_id)
|
26
|
+
end
|
27
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cfn-nag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Kascic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01-
|
11
|
+
date: 2021-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -58,28 +58,28 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0.
|
61
|
+
version: '0.21'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0.
|
68
|
+
version: '0.21'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: cfn-model
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - '='
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.
|
75
|
+
version: 0.6.0
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - '='
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.
|
82
|
+
version: 0.6.0
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: logging
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -199,6 +199,7 @@ files:
|
|
199
199
|
- lib/cfn-nag/custom_rules/CognitoIdentityPoolAllowUnauthenticatedIdentitiesRule.rb
|
200
200
|
- lib/cfn-nag/custom_rules/CognitoUserPoolMfaConfigurationOnorOptionalRule.rb
|
201
201
|
- lib/cfn-nag/custom_rules/DAXClusterEncryptionRule.rb
|
202
|
+
- lib/cfn-nag/custom_rules/DLMLifecyclePolicyCrossRegionCopyEncryptionRule.rb
|
202
203
|
- lib/cfn-nag/custom_rules/DMSEndpointMongoDbSettingsPasswordRule.rb
|
203
204
|
- lib/cfn-nag/custom_rules/DMSEndpointPasswordRule.rb
|
204
205
|
- lib/cfn-nag/custom_rules/DirectoryServiceMicrosoftADPasswordRule.rb
|
@@ -259,6 +260,7 @@ files:
|
|
259
260
|
- lib/cfn-nag/custom_rules/IotPolicyWildcardResourceRule.rb
|
260
261
|
- lib/cfn-nag/custom_rules/KMSKeyRotationRule.rb
|
261
262
|
- lib/cfn-nag/custom_rules/KMSKeyWildcardPrincipalRule.rb
|
263
|
+
- lib/cfn-nag/custom_rules/KendraIndexServerSideEncryptionConfigurationKmsKeyIdRule.rb
|
262
264
|
- lib/cfn-nag/custom_rules/KinesisFirehoseDeliveryStreamRedshiftDestinationConfigurationPasswordRule.rb
|
263
265
|
- lib/cfn-nag/custom_rules/KinesisFirehoseDeliveryStreamSplunkDestinationConfigurationHECTokenRule.rb
|
264
266
|
- lib/cfn-nag/custom_rules/KinesisStreamStreamEncryptionRule.rb
|
@@ -381,7 +383,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
381
383
|
requirements:
|
382
384
|
- - ">="
|
383
385
|
- !ruby/object:Gem::Version
|
384
|
-
version: '2.
|
386
|
+
version: '2.5'
|
385
387
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
386
388
|
requirements:
|
387
389
|
- - ">="
|