class Control
Constants
- KNOWN_BAD_RULES
These rules don't have the cert/cwe number in description or have other problems If there is an error with them, ignore it since we know they have problems.
- TAG_DATA
rubocop:disable Style/MutableConstant
Public Class Methods
new(control_key, findings, sonar_api, mappings)
click to toggle source
@param [SonarQubeApi] sonar_api
# File lib/heimdall_tools/sonarqube_mapper.rb, line 193 def initialize(control_key, findings, sonar_api, mappings) @key = control_key @findings = findings @api = sonar_api @mappings = mappings @data = @api.query_rule(@key) end
Public Instance Methods
hdf()
click to toggle source
# File lib/heimdall_tools/sonarqube_mapper.rb, line 251 def hdf # NOTE: Structure is based on fortify -> HDF converter output { title: @data['name'], desc: @data['htmlDesc'], impact: IMPACT_MAPPING[@data['severity'].to_sym], tags: { nist: get_nist_tags }, results: @findings.map(&:get_result), code: NA_TAG, # This should be the inspec code for the control, which we don't have id: @key, descriptions: NA_ARRAY, refs: NA_ARRAY, source_location: NA_HASH } end