Skip to content

Commit

Permalink
Merge pull request #42 from mitre/fix_41
Browse files Browse the repository at this point in the history
Update to pull data csvs by relative path
  • Loading branch information
rx294 authored Apr 7, 2020
2 parents d89cbc7 + f781c18 commit ef5377f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 3 additions & 1 deletion lib/heimdall_tools/burpsuite_mapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
require 'heimdall_tools/hdf'
require 'utilities/xml_to_hash'

CWE_NIST_MAPPING_FILE = './lib/data/cwe-nist-mapping.csv'.freeze
RESOURCE_DIR = Pathname.new(__FILE__).join('../../data')

CWE_NIST_MAPPING_FILE = File.join(RESOURCE_DIR, 'cwe-nist-mapping.csv')

IMPACT_MAPPING = {
High: 0.7,
Expand Down
6 changes: 4 additions & 2 deletions lib/heimdall_tools/sonarqube_mapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
require 'csv'
require 'heimdall_tools/hdf'

RESOURCE_DIR = Pathname.new(__FILE__).join('../../data')

MAPPING_FILES = {
cwe: './lib/data/cwe-nist-mapping.csv'.freeze,
owasp: './lib/data/owasp-nist-mapping.csv'.freeze
cwe: File.join(RESOURCE_DIR, 'cwe-nist-mapping.csv'),
owasp: File.join(RESOURCE_DIR, 'owasp-nist-mapping.csv')
}.freeze

IMPACT_MAPPING = {
Expand Down
4 changes: 3 additions & 1 deletion lib/heimdall_tools/zap_mapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
require 'heimdall_tools/hdf'


CWE_NIST_MAPPING_FILE = './lib/data/cwe-nist-mapping.csv'.freeze
RESOURCE_DIR = Pathname.new(__FILE__).join('../../data')

CWE_NIST_MAPPING_FILE = File.join(RESOURCE_DIR, 'cwe-nist-mapping.csv')

# rubocop:disable Metrics/AbcSize

Expand Down

0 comments on commit ef5377f

Please sign in to comment.