lib/cfn-nag/custom_rules/RDSInstanceMasterUserPasswordRule.rb
def audit_impl(cfn_model)
    violating_rdsinstances = cfn_model.resources_by_type('AWS::RDS::DBInstance').select do |instance|
      if instance.masterUserPassword.nil?
        false
      else
        !references_no_echo_parameter_without_default?(cfn_model, instance.masterUserPassword)
      end
    end

    violating_rdsinstances.map(&:logical_resource_id)
  end
# one word of warning... if somebody applies parameter values via JSON.... this will compare that....
# probably shouldn't be doing that though - if it's NoEcho there's a good reason
# bother checking synthesized_value? that would be the indicator.....
one word of warning... if somebody applies parameter values via JSON.... this will compare that
probably shouldn't be doing that though - if it's NoEcho there's a good reason
bother checking synthesized_value. that would be the indicator
one word of warning ... if somebody applies parameter values via JSON .... this will compare that probably shouldn ' t be doing that though - if it ' s NoEcho there ' s a good reason bother checking synthesized_value . that would be the indicator
def audit_impl(cfn_model)
    violating_rdsinstances = cfn_model.resources_by_type('AWS::RDS::DBInstance').select do |instance|
      if instance.masterUserPassword.nil?
        false
      else
        !references_no_echo_parameter_without_default?(cfn_model, instance.masterUserPassword)
      end
    end
    violating_rdsinstances.map(&:logical_resource_id)
  end
def audit_impl ( cfn_model ) violating_rdsinstances = cfn_model . resources_by_type ( 'AWS::RDS::DBInstance' ) . select do | instance | if instance . masterUserPassword . nil? false else ! references_no_echo_parameter_without_default? ( cfn_model , instance . masterUserPassword ) end end violating_rdsinstances . map ( & :logical_resource_id ) end
one word of warning... if somebody applies parameter values via JSON.... this will compare that....
probably shouldn't be doing that though - if it's NoEcho there's a good reason
bother checking synthesized_value?
one word of warning ... if somebody applies parameter values via JSON .... this will compare that .... probably shouldn ' t be doing that though - if it ' s NoEcho there ' s a good reason bother checking synthesized_value?
cfn_model