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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1f0e3b89a32d7c3c3a90b79917cadfcfe9ea7fcd6f764b92d4d253bcb9339bae
4
- data.tar.gz: 15c3e11374997b71796bf354211e9fa1d65207138018c04d7ecf390d3ee98a9d
3
+ metadata.gz: '038caece854c50f7ebec0952dbc3cc0f5e1c927cda89dd2bdef8215b99227472'
4
+ data.tar.gz: 350cfc8557373e05b8fa8b8e6e7ba44eb47108ae6754ad140718fb660892479c
5
5
  SHA512:
6
- metadata.gz: 41897e1c74bd5720e431e812a712bc29514854ad6ca346dfddacae77f59d54dc3c9398a412face48b9122cf29c5e6d137e217a6fbb373a77f36c1072eae8f380
7
- data.tar.gz: fdcf949f1fa67da2dbc3a84c9fb934f8b06ec0150f3780d03aa0f22b1695024f74343839ccacfd74f588b1dac5487bb5b57f4380211face2b0ecc802237b6c8e
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.21
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-22 00:00:00.000000000 Z
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