cfn-nag 0.4.21 → 0.4.22
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/DMSEndpointPasswordRule.rb +35 -0
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '038caece854c50f7ebec0952dbc3cc0f5e1c927cda89dd2bdef8215b99227472'
|
|
4
|
+
data.tar.gz: 350cfc8557373e05b8fa8b8e6e7ba44eb47108ae6754ad140718fb660892479c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d85175a322115a26297b5f6e4e0e9ed4fe83ec80ba1abafadc85d2b02679d1b215691b722228b540b964b7df9aa2c47caac3b146673b9c216a53f982dccc7902
|
|
7
|
+
data.tar.gz: ff1d1f38cc89924fa0b9471c0bf070be4bc664c53ede824ea52f191b2bea3fe2a9956101478c9a9fd3544894266b7f7090531d21fe1ea9465f05b2b00b15aa48
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'cfn-nag/violation'
|
|
4
|
+
require 'cfn-nag/util/enforce_reference_parameter'
|
|
5
|
+
require 'cfn-nag/util/enforce_string_or_dynamic_reference'
|
|
6
|
+
require_relative 'base'
|
|
7
|
+
|
|
8
|
+
class DMSEndpointPasswordRule < BaseRule
|
|
9
|
+
def rule_text
|
|
10
|
+
'DMS Endpoint must not be a plaintext string or a Ref to a NoEcho ' \
|
|
11
|
+
'Parameter with a Default value.'
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def rule_type
|
|
15
|
+
Violation::FAILING_VIOLATION
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def rule_id
|
|
19
|
+
'F37'
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def audit_impl(cfn_model)
|
|
23
|
+
dms_endpoints = cfn_model.resources_by_type('AWS::DMS::Endpoint')
|
|
24
|
+
violating_dms_endpoints = dms_endpoints.select do |endpoint|
|
|
25
|
+
if endpoint.password.nil?
|
|
26
|
+
false
|
|
27
|
+
else
|
|
28
|
+
insecure_parameter?(cfn_model, endpoint.password) ||
|
|
29
|
+
insecure_string_or_dynamic_reference?(cfn_model, endpoint.password)
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
violating_dms_endpoints.map(&:logical_resource_id)
|
|
34
|
+
end
|
|
35
|
+
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.
|
|
4
|
+
version: 0.4.22
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Eric Kascic
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-06-
|
|
11
|
+
date: 2019-06-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|
|
@@ -174,6 +174,7 @@ files:
|
|
|
174
174
|
- lib/cfn-nag/custom_rules/CloudFormationAuthenticationRule.rb
|
|
175
175
|
- lib/cfn-nag/custom_rules/CloudFrontDistributionAccessLoggingRule.rb
|
|
176
176
|
- lib/cfn-nag/custom_rules/CodeBuildEncryptionKeyRule.rb
|
|
177
|
+
- lib/cfn-nag/custom_rules/DMSEndpointPasswordRule.rb
|
|
177
178
|
- lib/cfn-nag/custom_rules/DirectoryServiceSimpleADPasswordRule.rb
|
|
178
179
|
- lib/cfn-nag/custom_rules/EC2SubnetMapPublicIpOnLaunchRule.rb
|
|
179
180
|
- lib/cfn-nag/custom_rules/EFSFileSystemEncryptedRule.rb
|