@mitre/hdf-converters 2.12.2 → 2.13.0
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.
- package/README.md +25 -24
- package/lib/data/converters/csv2json.d.ts +1 -0
- package/lib/data/converters/csv2json.d.ts.map +1 -0
- package/lib/data/converters/csv2json.js +1 -1
- package/lib/data/converters/csv2json.js.map +1 -1
- package/lib/data/converters/xml2json.d.ts +1 -0
- package/lib/data/converters/xml2json.d.ts.map +1 -0
- package/lib/data/converters/xml2json.js +6 -25
- package/lib/data/converters/xml2json.js.map +1 -1
- package/lib/data/reverse-html-mapper/convert-to-embedded-strings.d.ts +2 -0
- package/lib/data/reverse-html-mapper/convert-to-embedded-strings.d.ts.map +1 -0
- package/lib/data/reverse-html-mapper/convert-to-embedded-strings.js +13 -0
- package/lib/data/reverse-html-mapper/convert-to-embedded-strings.js.map +1 -0
- package/lib/index.d.ts +6 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +23 -8
- package/lib/index.js.map +1 -1
- package/lib/package.json +28 -45
- package/lib/src/anchore-grype-mapper.d.ts +1 -0
- package/lib/src/anchore-grype-mapper.d.ts.map +1 -0
- package/lib/src/anchore-grype-mapper.js +7 -1
- package/lib/src/anchore-grype-mapper.js.map +1 -1
- package/lib/src/asff-mapper/asff-mapper.d.ts +1 -0
- package/lib/src/asff-mapper/asff-mapper.d.ts.map +1 -0
- package/lib/src/asff-mapper/asff-mapper.js +276 -242
- package/lib/src/asff-mapper/asff-mapper.js.map +1 -1
- package/lib/src/asff-mapper/case-cms-inspec.d.ts +1 -0
- package/lib/src/asff-mapper/case-cms-inspec.d.ts.map +1 -0
- package/lib/src/asff-mapper/case-cms-inspec.js +18 -9
- package/lib/src/asff-mapper/case-cms-inspec.js.map +1 -1
- package/lib/src/asff-mapper/case-firewall-manager.d.ts +1 -0
- package/lib/src/asff-mapper/case-firewall-manager.d.ts.map +1 -0
- package/lib/src/asff-mapper/case-firewall-manager.js +18 -9
- package/lib/src/asff-mapper/case-firewall-manager.js.map +1 -1
- package/lib/src/asff-mapper/case-guardduty.d.ts +1 -0
- package/lib/src/asff-mapper/case-guardduty.d.ts.map +1 -0
- package/lib/src/asff-mapper/case-guardduty.js +18 -9
- package/lib/src/asff-mapper/case-guardduty.js.map +1 -1
- package/lib/src/asff-mapper/case-inspector.d.ts +1 -0
- package/lib/src/asff-mapper/case-inspector.d.ts.map +1 -0
- package/lib/src/asff-mapper/case-inspector.js +18 -9
- package/lib/src/asff-mapper/case-inspector.js.map +1 -1
- package/lib/src/asff-mapper/case-previously-hdf.d.ts +1 -0
- package/lib/src/asff-mapper/case-previously-hdf.d.ts.map +1 -0
- package/lib/src/asff-mapper/case-previously-hdf.js +28 -15
- package/lib/src/asff-mapper/case-previously-hdf.js.map +1 -1
- package/lib/src/asff-mapper/case-prowler.d.ts +1 -0
- package/lib/src/asff-mapper/case-prowler.d.ts.map +1 -0
- package/lib/src/asff-mapper/case-prowler.js +19 -9
- package/lib/src/asff-mapper/case-prowler.js.map +1 -1
- package/lib/src/asff-mapper/case-security-hub.d.ts +1 -0
- package/lib/src/asff-mapper/case-security-hub.d.ts.map +1 -0
- package/lib/src/asff-mapper/case-security-hub.js +24 -9
- package/lib/src/asff-mapper/case-security-hub.js.map +1 -1
- package/lib/src/asff-mapper/case-trivy.d.ts +1 -0
- package/lib/src/asff-mapper/case-trivy.d.ts.map +1 -0
- package/lib/src/asff-mapper/case-trivy.js +18 -9
- package/lib/src/asff-mapper/case-trivy.js.map +1 -1
- package/lib/src/aws-config-mapper.d.ts +1 -0
- package/lib/src/aws-config-mapper.d.ts.map +1 -0
- package/lib/src/aws-config-mapper.js +38 -22
- package/lib/src/aws-config-mapper.js.map +1 -1
- package/lib/src/base-converter.d.ts +2 -1
- package/lib/src/base-converter.d.ts.map +1 -0
- package/lib/src/base-converter.js +51 -33
- package/lib/src/base-converter.js.map +1 -1
- package/lib/src/burpsuite-mapper.d.ts +7 -0
- package/lib/src/burpsuite-mapper.d.ts.map +1 -0
- package/lib/src/burpsuite-mapper.js +115 -88
- package/lib/src/burpsuite-mapper.js.map +1 -1
- package/lib/src/checkov-mapper.d.ts +67 -0
- package/lib/src/checkov-mapper.d.ts.map +1 -0
- package/lib/src/checkov-mapper.js +240 -0
- package/lib/src/checkov-mapper.js.map +1 -0
- package/lib/src/ckl-mapper/checklist-jsonix-converter.d.ts +17 -0
- package/lib/src/ckl-mapper/checklist-jsonix-converter.d.ts.map +1 -0
- package/lib/src/ckl-mapper/checklist-jsonix-converter.js +59 -25
- package/lib/src/ckl-mapper/checklist-jsonix-converter.js.map +1 -1
- package/lib/src/ckl-mapper/checklist-mapper.d.ts +35 -0
- package/lib/src/ckl-mapper/checklist-mapper.d.ts.map +1 -0
- package/lib/src/ckl-mapper/checklist-mapper.js +264 -155
- package/lib/src/ckl-mapper/checklist-mapper.js.map +1 -1
- package/lib/src/ckl-mapper/checklist-metadata-utils.d.ts +1 -0
- package/lib/src/ckl-mapper/checklist-metadata-utils.d.ts.map +1 -0
- package/lib/src/ckl-mapper/checklist-metadata-utils.js +38 -16
- package/lib/src/ckl-mapper/checklist-metadata-utils.js.map +1 -1
- package/lib/src/ckl-mapper/checklistJsonix.d.ts +6 -0
- package/lib/src/ckl-mapper/checklistJsonix.d.ts.map +1 -0
- package/lib/src/ckl-mapper/checklistJsonix.js +8 -8
- package/lib/src/ckl-mapper/checklistJsonix.js.map +1 -1
- package/lib/src/ckl-mapper/jsonixMapping.d.ts +5 -0
- package/lib/src/ckl-mapper/jsonixMapping.d.ts.map +1 -0
- package/lib/src/ckl-mapper/jsonixMapping.js +4 -0
- package/lib/src/ckl-mapper/jsonixMapping.js.map +1 -1
- package/lib/src/converters-from-hdf/asff/asff-types.d.ts +1 -0
- package/lib/src/converters-from-hdf/asff/asff-types.d.ts.map +1 -0
- package/lib/src/converters-from-hdf/asff/asff-types.js +1 -0
- package/lib/src/converters-from-hdf/asff/asff-types.js.map +1 -1
- package/lib/src/converters-from-hdf/asff/reverse-asff-mapper.d.ts +1 -0
- package/lib/src/converters-from-hdf/asff/reverse-asff-mapper.d.ts.map +1 -0
- package/lib/src/converters-from-hdf/asff/reverse-asff-mapper.js +110 -84
- package/lib/src/converters-from-hdf/asff/reverse-asff-mapper.js.map +1 -1
- package/lib/src/converters-from-hdf/asff/transformers.d.ts +1 -0
- package/lib/src/converters-from-hdf/asff/transformers.d.ts.map +1 -0
- package/lib/src/converters-from-hdf/asff/transformers.js +82 -55
- package/lib/src/converters-from-hdf/asff/transformers.js.map +1 -1
- package/lib/src/converters-from-hdf/caat/reverse-caat-mapper.d.ts +1 -0
- package/lib/src/converters-from-hdf/caat/reverse-caat-mapper.d.ts.map +1 -0
- package/lib/src/converters-from-hdf/caat/reverse-caat-mapper.js +65 -38
- package/lib/src/converters-from-hdf/caat/reverse-caat-mapper.js.map +1 -1
- package/lib/src/converters-from-hdf/html/embedded-assets.d.ts +4 -0
- package/lib/src/converters-from-hdf/html/embedded-assets.d.ts.map +1 -0
- package/lib/src/converters-from-hdf/html/embedded-assets.js +8 -0
- package/lib/src/converters-from-hdf/html/embedded-assets.js.map +1 -0
- package/lib/src/converters-from-hdf/html/html-types.d.ts +1 -0
- package/lib/src/converters-from-hdf/html/html-types.d.ts.map +1 -0
- package/lib/src/converters-from-hdf/html/html-types.js +1 -0
- package/lib/src/converters-from-hdf/html/html-types.js.map +1 -1
- package/lib/src/converters-from-hdf/html/reverse-html-mapper.d.ts +3 -2
- package/lib/src/converters-from-hdf/html/reverse-html-mapper.d.ts.map +1 -0
- package/lib/src/converters-from-hdf/html/reverse-html-mapper.js +151 -107
- package/lib/src/converters-from-hdf/html/reverse-html-mapper.js.map +1 -1
- package/lib/src/converters-from-hdf/reverse-any-base-converter.d.ts +1 -0
- package/lib/src/converters-from-hdf/reverse-any-base-converter.d.ts.map +1 -0
- package/lib/src/converters-from-hdf/reverse-any-base-converter.js +3 -0
- package/lib/src/converters-from-hdf/reverse-any-base-converter.js.map +1 -1
- package/lib/src/converters-from-hdf/reverse-base-converter.d.ts +1 -0
- package/lib/src/converters-from-hdf/reverse-base-converter.d.ts.map +1 -0
- package/lib/src/converters-from-hdf/reverse-base-converter.js +29 -9
- package/lib/src/converters-from-hdf/reverse-base-converter.js.map +1 -1
- package/lib/src/converters-from-hdf/splunk/reverse-splunk-mapper.d.ts +1 -0
- package/lib/src/converters-from-hdf/splunk/reverse-splunk-mapper.d.ts.map +1 -0
- package/lib/src/converters-from-hdf/splunk/reverse-splunk-mapper.js +40 -16
- package/lib/src/converters-from-hdf/splunk/reverse-splunk-mapper.js.map +1 -1
- package/lib/src/converters-from-hdf/xccdf/reverse-xccdf-mapper.d.ts +1 -0
- package/lib/src/converters-from-hdf/xccdf/reverse-xccdf-mapper.d.ts.map +1 -0
- package/lib/src/converters-from-hdf/xccdf/reverse-xccdf-mapper.js +33 -12
- package/lib/src/converters-from-hdf/xccdf/reverse-xccdf-mapper.js.map +1 -1
- package/lib/src/conveyor-mapper.d.ts +1 -0
- package/lib/src/conveyor-mapper.d.ts.map +1 -0
- package/lib/src/conveyor-mapper.js +85 -40
- package/lib/src/conveyor-mapper.js.map +1 -1
- package/lib/src/cyclonedx-sbom-mapper.d.ts +1 -0
- package/lib/src/cyclonedx-sbom-mapper.d.ts.map +1 -0
- package/lib/src/cyclonedx-sbom-mapper.js +377 -309
- package/lib/src/cyclonedx-sbom-mapper.js.map +1 -1
- package/lib/src/dbprotect-mapper.d.ts +1 -0
- package/lib/src/dbprotect-mapper.d.ts.map +1 -0
- package/lib/src/dbprotect-mapper.js +74 -63
- package/lib/src/dbprotect-mapper.js.map +1 -1
- package/lib/src/dependency-track-mapper.d.ts +1 -0
- package/lib/src/dependency-track-mapper.d.ts.map +1 -0
- package/lib/src/dependency-track-mapper.js +144 -130
- package/lib/src/dependency-track-mapper.js.map +1 -1
- package/lib/src/fortify-mapper.d.ts +7 -0
- package/lib/src/fortify-mapper.d.ts.map +1 -0
- package/lib/src/fortify-mapper.js +118 -92
- package/lib/src/fortify-mapper.js.map +1 -1
- package/lib/src/gosec-mapper.d.ts +1 -0
- package/lib/src/gosec-mapper.d.ts.map +1 -0
- package/lib/src/gosec-mapper.js +90 -72
- package/lib/src/gosec-mapper.js.map +1 -1
- package/lib/src/ionchannel-mapper.d.ts +1 -0
- package/lib/src/ionchannel-mapper.d.ts.map +1 -0
- package/lib/src/ionchannel-mapper.js +130 -110
- package/lib/src/ionchannel-mapper.js.map +1 -1
- package/lib/src/jfrog-xray-mapper.d.ts +1 -0
- package/lib/src/jfrog-xray-mapper.d.ts.map +1 -0
- package/lib/src/jfrog-xray-mapper.js +92 -78
- package/lib/src/jfrog-xray-mapper.js.map +1 -1
- package/lib/src/jsonix-converter.d.ts +1 -0
- package/lib/src/jsonix-converter.d.ts.map +1 -0
- package/lib/src/jsonix-converter.js +1 -0
- package/lib/src/jsonix-converter.js.map +1 -1
- package/lib/src/jsonix-intermediate-converter.d.ts +1 -0
- package/lib/src/jsonix-intermediate-converter.d.ts.map +1 -0
- package/lib/src/jsonix-intermediate-converter.js.map +1 -1
- package/lib/src/mappings/AwsConfigMapping.d.ts +1 -0
- package/lib/src/mappings/AwsConfigMapping.d.ts.map +1 -0
- package/lib/src/mappings/AwsConfigMapping.js +19 -9
- package/lib/src/mappings/AwsConfigMapping.js.map +1 -1
- package/lib/src/mappings/AwsConfigMappingData.d.ts +1 -0
- package/lib/src/mappings/AwsConfigMappingData.d.ts.map +1 -0
- package/lib/src/mappings/AwsConfigMappingData.js.map +1 -1
- package/lib/src/mappings/CciNistMapping.d.ts +1 -0
- package/lib/src/mappings/CciNistMapping.d.ts.map +1 -0
- package/lib/src/mappings/CciNistMapping.js +6 -2
- package/lib/src/mappings/CciNistMapping.js.map +1 -1
- package/lib/src/mappings/CciNistMappingData.d.ts +1 -0
- package/lib/src/mappings/CciNistMappingData.d.ts.map +1 -0
- package/lib/src/mappings/CciNistMappingData.js.map +1 -1
- package/lib/src/mappings/CciNistMappingItem.d.ts +1 -0
- package/lib/src/mappings/CciNistMappingItem.d.ts.map +1 -0
- package/lib/src/mappings/CciNistMappingItem.js +2 -0
- package/lib/src/mappings/CciNistMappingItem.js.map +1 -1
- package/lib/src/mappings/CheckovToCciAndNistMappingData.d.ts +5 -0
- package/lib/src/mappings/CheckovToCciAndNistMappingData.d.ts.map +1 -0
- package/lib/src/mappings/CheckovToCciAndNistMappingData.js +2695 -0
- package/lib/src/mappings/CheckovToCciAndNistMappingData.js.map +1 -0
- package/lib/src/mappings/CweNistMapping.d.ts +1 -0
- package/lib/src/mappings/CweNistMapping.d.ts.map +1 -0
- package/lib/src/mappings/CweNistMapping.js +1 -0
- package/lib/src/mappings/CweNistMapping.js.map +1 -1
- package/lib/src/mappings/CweNistMappingData.d.ts +1 -0
- package/lib/src/mappings/CweNistMappingData.d.ts.map +1 -0
- package/lib/src/mappings/CweNistMappingData.js.map +1 -1
- package/lib/src/mappings/CweNistMappingItem.d.ts +1 -0
- package/lib/src/mappings/CweNistMappingItem.d.ts.map +1 -0
- package/lib/src/mappings/CweNistMappingItem.js +5 -0
- package/lib/src/mappings/CweNistMappingItem.js.map +1 -1
- package/lib/src/mappings/NessusPluginNistMappingData.d.ts +1 -0
- package/lib/src/mappings/NessusPluginNistMappingData.d.ts.map +1 -0
- package/lib/src/mappings/NessusPluginNistMappingData.js.map +1 -1
- package/lib/src/mappings/NessusPluginsNistMapping.d.ts +1 -0
- package/lib/src/mappings/NessusPluginsNistMapping.d.ts.map +1 -0
- package/lib/src/mappings/NessusPluginsNistMapping.js +1 -0
- package/lib/src/mappings/NessusPluginsNistMapping.js.map +1 -1
- package/lib/src/mappings/NessusPluginsNistMappingItem.d.ts +1 -0
- package/lib/src/mappings/NessusPluginsNistMappingItem.d.ts.map +1 -0
- package/lib/src/mappings/NessusPluginsNistMappingItem.js +4 -0
- package/lib/src/mappings/NessusPluginsNistMappingItem.js.map +1 -1
- package/lib/src/mappings/NiktoNistMapping.d.ts +1 -0
- package/lib/src/mappings/NiktoNistMapping.d.ts.map +1 -0
- package/lib/src/mappings/NiktoNistMapping.js.map +1 -1
- package/lib/src/mappings/NiktoNistMappingData.d.ts +1 -0
- package/lib/src/mappings/NiktoNistMappingData.d.ts.map +1 -0
- package/lib/src/mappings/NiktoNistMappingData.js.map +1 -1
- package/lib/src/mappings/NiktoNistMappingItem.d.ts +1 -0
- package/lib/src/mappings/NiktoNistMappingItem.d.ts.map +1 -0
- package/lib/src/mappings/NiktoNistMappingItem.js +4 -0
- package/lib/src/mappings/NiktoNistMappingItem.js.map +1 -1
- package/lib/src/mappings/NistCciMappingData.d.ts +1 -0
- package/lib/src/mappings/NistCciMappingData.d.ts.map +1 -0
- package/lib/src/mappings/NistCciMappingData.js.map +1 -1
- package/lib/src/mappings/OwaspNistMapping.d.ts +1 -0
- package/lib/src/mappings/OwaspNistMapping.d.ts.map +1 -0
- package/lib/src/mappings/OwaspNistMapping.js +19 -8
- package/lib/src/mappings/OwaspNistMapping.js.map +1 -1
- package/lib/src/mappings/OwaspNistMappingData.d.ts +1 -0
- package/lib/src/mappings/OwaspNistMappingData.d.ts.map +1 -0
- package/lib/src/mappings/OwaspNistMappingData.js.map +1 -1
- package/lib/src/mappings/OwaspNistMappingItem.d.ts +1 -0
- package/lib/src/mappings/OwaspNistMappingItem.d.ts.map +1 -0
- package/lib/src/mappings/OwaspNistMappingItem.js +5 -0
- package/lib/src/mappings/OwaspNistMappingItem.js.map +1 -1
- package/lib/src/mappings/ScoutsuiteNistMapping.d.ts +1 -0
- package/lib/src/mappings/ScoutsuiteNistMapping.d.ts.map +1 -0
- package/lib/src/mappings/ScoutsuiteNistMapping.js +1 -0
- package/lib/src/mappings/ScoutsuiteNistMapping.js.map +1 -1
- package/lib/src/mappings/ScoutsuiteNistMappingData.d.ts +1 -0
- package/lib/src/mappings/ScoutsuiteNistMappingData.d.ts.map +1 -0
- package/lib/src/mappings/ScoutsuiteNistMappingData.js.map +1 -1
- package/lib/src/mappings/ScoutsuiteNistMappingItem.d.ts +1 -0
- package/lib/src/mappings/ScoutsuiteNistMappingItem.d.ts.map +1 -0
- package/lib/src/mappings/ScoutsuiteNistMappingItem.js +2 -0
- package/lib/src/mappings/ScoutsuiteNistMappingItem.js.map +1 -1
- package/lib/src/msft-secure-score-mapper.d.ts +1 -0
- package/lib/src/msft-secure-score-mapper.d.ts.map +1 -0
- package/lib/src/msft-secure-score-mapper.js +202 -185
- package/lib/src/msft-secure-score-mapper.js.map +1 -1
- package/lib/src/nessus-mapper.d.ts +2 -1
- package/lib/src/nessus-mapper.d.ts.map +1 -0
- package/lib/src/nessus-mapper.js +122 -105
- package/lib/src/nessus-mapper.js.map +1 -1
- package/lib/src/netsparker-mapper.d.ts +7 -0
- package/lib/src/netsparker-mapper.d.ts.map +1 -0
- package/lib/src/netsparker-mapper.js +34 -9
- package/lib/src/netsparker-mapper.js.map +1 -1
- package/lib/src/neuvector-mapper.d.ts +1 -0
- package/lib/src/neuvector-mapper.d.ts.map +1 -0
- package/lib/src/neuvector-mapper.js +123 -124
- package/lib/src/neuvector-mapper.js.map +1 -1
- package/lib/src/nikto-mapper.d.ts +1 -0
- package/lib/src/nikto-mapper.d.ts.map +1 -0
- package/lib/src/nikto-mapper.js +85 -74
- package/lib/src/nikto-mapper.js.map +1 -1
- package/lib/src/prisma-mapper.d.ts +1 -0
- package/lib/src/prisma-mapper.d.ts.map +1 -0
- package/lib/src/prisma-mapper.js +138 -128
- package/lib/src/prisma-mapper.js.map +1 -1
- package/lib/src/sarif-mapper.d.ts +1 -0
- package/lib/src/sarif-mapper.d.ts.map +1 -0
- package/lib/src/sarif-mapper.js +116 -105
- package/lib/src/sarif-mapper.js.map +1 -1
- package/lib/src/scoutsuite-mapper.d.ts +1 -0
- package/lib/src/scoutsuite-mapper.d.ts.map +1 -0
- package/lib/src/scoutsuite-mapper.js +174 -163
- package/lib/src/scoutsuite-mapper.js.map +1 -1
- package/lib/src/snyk-mapper.d.ts +1 -0
- package/lib/src/snyk-mapper.d.ts.map +1 -0
- package/lib/src/snyk-mapper.js +112 -100
- package/lib/src/snyk-mapper.js.map +1 -1
- package/lib/src/sonarqube-mapper.d.ts +18 -5
- package/lib/src/sonarqube-mapper.d.ts.map +1 -0
- package/lib/src/sonarqube-mapper.js +526 -278
- package/lib/src/sonarqube-mapper.js.map +1 -1
- package/lib/src/splunk-mapper.d.ts +3 -2
- package/lib/src/splunk-mapper.d.ts.map +1 -0
- package/lib/src/splunk-mapper.js +72 -16
- package/lib/src/splunk-mapper.js.map +1 -1
- package/lib/src/trufflehog-mapper.d.ts +1 -0
- package/lib/src/trufflehog-mapper.d.ts.map +1 -0
- package/lib/src/trufflehog-mapper.js +72 -69
- package/lib/src/trufflehog-mapper.js.map +1 -1
- package/lib/src/twistlock-mapper.d.ts +1 -0
- package/lib/src/twistlock-mapper.d.ts.map +1 -0
- package/lib/src/twistlock-mapper.js +140 -126
- package/lib/src/twistlock-mapper.js.map +1 -1
- package/lib/src/utils/CCI_List.d.ts +1 -0
- package/lib/src/utils/CCI_List.d.ts.map +1 -0
- package/lib/src/utils/CCI_List.js.map +1 -1
- package/lib/src/utils/attestations.d.ts +1 -0
- package/lib/src/utils/attestations.d.ts.map +1 -0
- package/lib/src/utils/attestations.js +28 -13
- package/lib/src/utils/attestations.js.map +1 -1
- package/lib/src/utils/compliance.d.ts +1 -0
- package/lib/src/utils/compliance.d.ts.map +1 -0
- package/lib/src/utils/compliance.js +11 -3
- package/lib/src/utils/compliance.js.map +1 -1
- package/lib/src/utils/fingerprinting.d.ts +2 -0
- package/lib/src/utils/fingerprinting.d.ts.map +1 -0
- package/lib/src/utils/fingerprinting.js +28 -11
- package/lib/src/utils/fingerprinting.js.map +1 -1
- package/lib/src/utils/global.d.ts +3 -1
- package/lib/src/utils/global.d.ts.map +1 -0
- package/lib/src/utils/global.js +35 -17
- package/lib/src/utils/global.js.map +1 -1
- package/lib/src/utils/parseJson.d.ts +1 -0
- package/lib/src/utils/parseJson.d.ts.map +1 -0
- package/lib/src/utils/parseJson.js +7 -3
- package/lib/src/utils/parseJson.js.map +1 -1
- package/lib/src/utils/result.d.ts +1 -0
- package/lib/src/utils/result.d.ts.map +1 -0
- package/lib/src/utils/result.js.map +1 -1
- package/lib/src/utils/splunk-tools.d.ts +2 -1
- package/lib/src/utils/splunk-tools.d.ts.map +1 -0
- package/lib/src/utils/splunk-tools.js +52 -32
- package/lib/src/utils/splunk-tools.js.map +1 -1
- package/lib/src/veracode-mapper.d.ts +1 -0
- package/lib/src/veracode-mapper.d.ts.map +1 -0
- package/lib/src/veracode-mapper.js +50 -7
- package/lib/src/veracode-mapper.js.map +1 -1
- package/lib/src/xccdf-results-mapper.d.ts +7 -0
- package/lib/src/xccdf-results-mapper.d.ts.map +1 -0
- package/lib/src/xccdf-results-mapper.js +336 -301
- package/lib/src/xccdf-results-mapper.js.map +1 -1
- package/lib/src/zap-mapper.d.ts +8 -0
- package/lib/src/zap-mapper.d.ts.map +1 -0
- package/lib/src/zap-mapper.js +119 -90
- package/lib/src/zap-mapper.js.map +1 -1
- package/lib/tsconfig.build.tsbuildinfo +1 -0
- package/lib/types/neuvector-types.d.ts +1 -0
- package/lib/types/neuvector-types.d.ts.map +1 -0
- package/lib/types/neuvector-types.js +80 -0
- package/lib/types/neuvector-types.js.map +1 -1
- package/lib/types/splunk-config-types.d.ts +1 -0
- package/lib/types/splunk-config-types.d.ts.map +1 -0
- package/lib/types/splunk-config-types.js.map +1 -1
- package/lib/types/splunk-control-types.d.ts +1 -0
- package/lib/types/splunk-control-types.d.ts.map +1 -0
- package/lib/types/splunk-control-types.js.map +1 -1
- package/lib/types/splunk-profile-types.d.ts +1 -0
- package/lib/types/splunk-profile-types.d.ts.map +1 -0
- package/lib/types/splunk-profile-types.js.map +1 -1
- package/lib/types/splunk-report-types.d.ts +1 -0
- package/lib/types/splunk-report-types.d.ts.map +1 -0
- package/lib/types/splunk-report-types.js.map +1 -1
- package/package.json +29 -46
- package/lib/data/converters/csv2json.ts +0 -36
- package/lib/data/converters/xml2json.ts +0 -57
package/README.md
CHANGED
|
@@ -12,30 +12,31 @@ OHDF Converters supplies several methods to convert various types of security to
|
|
|
12
12
|
4. [**burpsuite-mapper**] - BurpSuite Pro XML file
|
|
13
13
|
5. [**caat-mapper**] - Compliance Assessment and Audit Tracking (CAAT) file
|
|
14
14
|
6. [**checklist-mapper**] - Checlist Mapper format
|
|
15
|
-
7. [**
|
|
16
|
-
8. [**
|
|
17
|
-
9. [**
|
|
18
|
-
10. [**
|
|
19
|
-
11. [**
|
|
20
|
-
12. [**
|
|
21
|
-
13. [**
|
|
22
|
-
14. [**
|
|
23
|
-
15. [**
|
|
24
|
-
16. [**
|
|
25
|
-
17. [**
|
|
26
|
-
18. [**
|
|
27
|
-
19. [**
|
|
28
|
-
20. [**
|
|
29
|
-
21. [**
|
|
30
|
-
22. [**
|
|
31
|
-
23. [**
|
|
32
|
-
24. [**
|
|
33
|
-
25. [**
|
|
34
|
-
26. [**
|
|
35
|
-
27. [**
|
|
36
|
-
28. [**
|
|
37
|
-
29. [**
|
|
38
|
-
30. [**
|
|
15
|
+
7. [**checkov-mapper**] - Convert checkov json output files
|
|
16
|
+
8. [**conveyor-mapper**] - Conveyor JSON file
|
|
17
|
+
9. [**cyclonedx-sbom-mapper**] - CycloneDX SBOM JSON file
|
|
18
|
+
10. [**dbprotect-mapper**] - DBProtect report in "Check Results Details" XML format
|
|
19
|
+
11. [**dependency-track-mapper**] - OWASP Dependency-Track Finding Packaging Format (FPF)
|
|
20
|
+
12. [**fortify-mapper**] - Fortify results FVDL file
|
|
21
|
+
13. [**gosec-mapper**] - gosec results JSON file
|
|
22
|
+
14. [**ionchannel-mapper**] - SBOM data from Ion Channel
|
|
23
|
+
15. [**jfrog-xray-mapper**] - JFrog Xray results JSON file
|
|
24
|
+
16. [**msft-secure-mapper**] - Microsoft Secure Score results file
|
|
25
|
+
17. [**nessus-mapper**] - Nessus XML results file
|
|
26
|
+
18. [**netsparker-mapper**] - Netsparker XML results file
|
|
27
|
+
19. [**neuvector-mapper**] - NeuVector JSON results file
|
|
28
|
+
20. [**nikto-mapper**] - Nikto results JSON file
|
|
29
|
+
21. [**prisma-mapper**] - Prisma Cloud Scan Report CSV file
|
|
30
|
+
22. [**sarif-mapper**] - SARIF JSON file
|
|
31
|
+
23. [**scoutsuite-mapper**] - ScoutSuite results from a Javascript object
|
|
32
|
+
24. [**snyk-mapper**] - Snyk results JSON file
|
|
33
|
+
25. [**sonarqube-mapper**] - SonarQube vulnerabilities for the specified project name and optional branch or pull/merge request ID name from an API
|
|
34
|
+
26. [**splunk-mapper**] - Splunk instance
|
|
35
|
+
27. [**trufflehog-mapper**] - Trufflehog results json file
|
|
36
|
+
28. [**twistlock-mapper**] - Twistlock CLI output file
|
|
37
|
+
29. [**veracode-mapper**] - Veracode Scan Results XML file
|
|
38
|
+
30. [**xccdf-results-mapper**] - SCAP client XCCDF-Results XML report
|
|
39
|
+
31. [**zap-mapper**] - OWASP ZAP results JSON
|
|
39
40
|
|
|
40
41
|
### NOTICE
|
|
41
42
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"csv2json.d.ts","sourceRoot":"","sources":["../../../data/converters/csv2json.ts"],"names":[],"mappings":""}
|
|
@@ -3,9 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const csv2json_1 = __importDefault(require("csv2json"));
|
|
7
6
|
const fs_1 = require("fs");
|
|
8
7
|
const path_1 = __importDefault(require("path"));
|
|
8
|
+
const csv2json_1 = __importDefault(require("csv2json"));
|
|
9
9
|
const files = [
|
|
10
10
|
'aws-config-mapping.csv',
|
|
11
11
|
'cwe-nist-mapping.csv',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"csv2json.js","sourceRoot":"","sources":["../../../data/converters/csv2json.ts"],"names":[],"mappings":";;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"csv2json.js","sourceRoot":"","sources":["../../../data/converters/csv2json.ts"],"names":[],"mappings":";;;;;AAAA,2BAAuD;AACvD,gDAAwB;AACxB,wDAAgC;AAEhC,MAAM,KAAK,GAAG;IACZ,wBAAwB;IACxB,sBAAsB;IACtB,iCAAiC;IACjC,wBAAwB;IACxB,wBAAwB;IACxB,6BAA6B;CAC9B,CAAC;AAEF,IAAI,CAAC;IACH,MAAM,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpC,IAAI,CAAC;QACH,MAAM,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACrC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YACrB,IAAA,qBAAgB,EAAC,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;iBAC3C,IAAI,CAAC,IAAA,kBAAQ,GAAE,CAAC;iBAChB,IAAI,CACH,IAAA,sBAAiB,EACf,cAAI,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CACvD,CACF,CAAC;QACN,CAAC,CAAC,CAAC;IACL,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,CAAC,KAAK,CAAC,gDAAgD,CAAC,CAAC;QAChE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAAC,MAAM,CAAC;IACP,OAAO,CAAC,KAAK,CACX,oDAAoD,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CACxE,CAAC;IACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC","sourcesContent":["import {createReadStream, createWriteStream} from 'fs';\nimport path from 'path';\nimport csv2json from 'csv2json';\n\nconst files = [\n 'aws-config-mapping.csv',\n 'cwe-nist-mapping.csv',\n 'nessus-plugins-nist-mapping.csv',\n 'nikto-nist-mapping.csv',\n 'owasp-nist-mapping.csv',\n 'scoutsuite-nist-mapping.csv'\n];\n\ntry {\n const pathToFiles = process.argv[2];\n try {\n const pathToOutput = process.argv[3];\n files.forEach((file) => {\n createReadStream(path.join(pathToFiles, file))\n .pipe(csv2json())\n .pipe(\n createWriteStream(\n path.join(pathToOutput, file.replace('.csv', '.json'))\n )\n );\n });\n } catch {\n console.error(`You must provide the path to an output folder.`);\n process.exit(1);\n }\n} catch {\n console.error(\n `You must provide the path to a folder containing ${files.join(', ')}.`\n );\n process.exit(1);\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xml2json.d.ts","sourceRoot":"","sources":["../../../data/converters/xml2json.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,QAAQ;IACvB,QAAQ,EAAE;QACR,SAAS,EAAE;YACT,QAAQ,EAAE;gBACR,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;gBAC1B,UAAU,EAAE;oBACV,SAAS,EAAE;wBACT,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;qBAC3B,EAAE,CAAC;iBACL,EAAE,CAAC;aACL,EAAE,CAAC;SACL,EAAE,CAAC;KACL,CAAC;CACH"}
|
|
@@ -1,33 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
4
|
};
|
|
28
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
6
|
const fs_1 = __importDefault(require("fs"));
|
|
30
|
-
const
|
|
7
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
31
8
|
const xml2js_1 = __importDefault(require("xml2js"));
|
|
32
9
|
const parser = new xml2js_1.default.Parser();
|
|
33
10
|
const pathToInfile = process.argv[2];
|
|
@@ -41,14 +18,18 @@ else {
|
|
|
41
18
|
console.error(`Failed to read ${pathToInfile}: ${readFileError}`);
|
|
42
19
|
}
|
|
43
20
|
else {
|
|
21
|
+
// Parse XML to JS Object
|
|
44
22
|
parser.parseString(data, (parseFileError, converted) => {
|
|
45
23
|
if (parseFileError) {
|
|
46
24
|
console.error(`Failed to parse ${pathToInfile}: ${parseFileError}`);
|
|
47
25
|
}
|
|
48
26
|
else {
|
|
27
|
+
// Stores our CCI->NIST mapping
|
|
49
28
|
const result = {};
|
|
29
|
+
// For all cci items
|
|
50
30
|
converted.cci_list.cci_items[0].cci_item.forEach((cciItem) => {
|
|
51
|
-
|
|
31
|
+
// Get the latest reference
|
|
32
|
+
const newestReference = lodash_1.default.maxBy(cciItem.references[0].reference, (item) => lodash_1.default.get(item, '$.version'));
|
|
52
33
|
if (newestReference) {
|
|
53
34
|
result[cciItem.$.id] = newestReference.$.index;
|
|
54
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xml2json.js","sourceRoot":"","sources":["../../../data/converters/xml2json.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"xml2json.js","sourceRoot":"","sources":["../../../data/converters/xml2json.ts"],"names":[],"mappings":";;;;;AAAA,4CAAoB;AACpB,oDAAuB;AACvB,oDAA4B;AAE5B,MAAM,MAAM,GAAG,IAAI,gBAAM,CAAC,MAAM,EAAE,CAAC;AACnC,MAAM,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACrC,MAAM,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAkBtC,IAAI,CAAC,YAAY,IAAI,CAAC,aAAa,EAAE,CAAC;IACpC,OAAO,CAAC,KAAK,CAAC,4DAA4D,CAAC,CAAC;AAC9E,CAAC;KAAM,CAAC;IACN,YAAE,CAAC,QAAQ,CAAC,YAAY,EAAE,UAAU,aAAa,EAAE,IAAI;QACrD,IAAI,aAAa,EAAE,CAAC;YAClB,OAAO,CAAC,KAAK,CAAC,kBAAkB,YAAY,KAAK,aAAa,EAAE,CAAC,CAAC;QACpE,CAAC;aAAM,CAAC;YACN,yBAAyB;YACzB,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,cAAmB,EAAE,SAAmB,EAAE,EAAE;gBACpE,IAAI,cAAc,EAAE,CAAC;oBACnB,OAAO,CAAC,KAAK,CAAC,mBAAmB,YAAY,KAAK,cAAc,EAAE,CAAC,CAAC;gBACtE,CAAC;qBAAM,CAAC;oBACN,+BAA+B;oBAC/B,MAAM,MAAM,GAA2B,EAAE,CAAC;oBAC1C,oBAAoB;oBACpB,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;wBAC3D,2BAA2B;wBAC3B,MAAM,eAAe,GAAG,gBAAC,CAAC,KAAK,CAC7B,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,EAC/B,CAAC,IAAI,EAAE,EAAE,CAAC,gBAAC,CAAC,GAAG,CAAC,IAAI,EAAE,WAAW,CAAC,CACnC,CAAC;wBACF,IAAI,eAAe,EAAE,CAAC;4BACpB,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC;wBACjD,CAAC;6BAAM,CAAC;4BACN,OAAO,CAAC,KAAK,CAAC,8BAA8B,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;wBAC9D,CAAC;oBACH,CAAC,CAAC,CAAC;oBACH,YAAE,CAAC,aAAa,CAAC,aAAa,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;gBAC1D,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import fs from 'fs';\nimport _ from 'lodash';\nimport xml2js from 'xml2js';\n\nconst parser = new xml2js.Parser();\nconst pathToInfile = process.argv[2];\nconst pathToOutfile = process.argv[3];\n\n// XML Structure after conversion\nexport interface ICCIList {\n cci_list: {\n cci_items: {\n cci_item: {\n $: Record<string, string>;\n references: {\n reference: {\n $: Record<string, string>;\n }[];\n }[];\n }[];\n }[];\n };\n}\n\nif (!pathToInfile || !pathToOutfile) {\n console.error(`You must provide the path to both an input and ouput file.`);\n} else {\n fs.readFile(pathToInfile, function (readFileError, data) {\n if (readFileError) {\n console.error(`Failed to read ${pathToInfile}: ${readFileError}`);\n } else {\n // Parse XML to JS Object\n parser.parseString(data, (parseFileError: any, converted: ICCIList) => {\n if (parseFileError) {\n console.error(`Failed to parse ${pathToInfile}: ${parseFileError}`);\n } else {\n // Stores our CCI->NIST mapping\n const result: Record<string, string> = {};\n // For all cci items\n converted.cci_list.cci_items[0].cci_item.forEach((cciItem) => {\n // Get the latest reference\n const newestReference = _.maxBy(\n cciItem.references[0].reference,\n (item) => _.get(item, '$.version')\n );\n if (newestReference) {\n result[cciItem.$.id] = newestReference.$.index;\n } else {\n console.error(`No NIST Controls found for ${cciItem.$.id}`);\n }\n });\n fs.writeFileSync(pathToOutfile, JSON.stringify(result));\n }\n });\n }\n });\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convert-to-embedded-strings.d.ts","sourceRoot":"","sources":["../../../data/reverse-html-mapper/convert-to-embedded-strings.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const fs_1 = require("fs");
|
|
4
|
+
const html = (0, fs_1.readFileSync)('data/reverse-html-mapper/template.html', 'utf8');
|
|
5
|
+
const js = (0, fs_1.readFileSync)('data/reverse-html-mapper/tw-elements.min.js', 'utf8');
|
|
6
|
+
const css = (0, fs_1.readFileSync)('data/reverse-html-mapper/style.css', 'utf8');
|
|
7
|
+
const out = `/* AUTO-GENERATED. DO NOT EDIT. */
|
|
8
|
+
export const html = ${JSON.stringify(html)} as const;
|
|
9
|
+
export const js = ${JSON.stringify(js)} as const;
|
|
10
|
+
export const css = ${JSON.stringify(css)} as const;`;
|
|
11
|
+
(0, fs_1.writeFileSync)('src/converters-from-hdf/html/embedded-assets.ts', out, 'utf8');
|
|
12
|
+
console.log('Successfully generated the embedded assets file');
|
|
13
|
+
//# sourceMappingURL=convert-to-embedded-strings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convert-to-embedded-strings.js","sourceRoot":"","sources":["../../../data/reverse-html-mapper/convert-to-embedded-strings.ts"],"names":[],"mappings":";;AAAA,2BAAiD;AAEjD,MAAM,IAAI,GAAG,IAAA,iBAAY,EAAC,wCAAwC,EAAE,MAAM,CAAC,CAAC;AAC5E,MAAM,EAAE,GAAG,IAAA,iBAAY,EAAC,6CAA6C,EAAE,MAAM,CAAC,CAAC;AAC/E,MAAM,GAAG,GAAG,IAAA,iBAAY,EAAC,oCAAoC,EAAE,MAAM,CAAC,CAAC;AAEvE,MAAM,GAAG,GAAG;sBACU,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;oBACtB,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;qBACjB,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,YAAY,CAAC;AAErD,IAAA,kBAAa,EAAC,iDAAiD,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;AAE9E,OAAO,CAAC,GAAG,CAAC,iDAAiD,CAAC,CAAC","sourcesContent":["import { readFileSync, writeFileSync } from 'fs';\n\nconst html = readFileSync('data/reverse-html-mapper/template.html', 'utf8');\nconst js = readFileSync('data/reverse-html-mapper/tw-elements.min.js', 'utf8');\nconst css = readFileSync('data/reverse-html-mapper/style.css', 'utf8');\n\nconst out = `/* AUTO-GENERATED. DO NOT EDIT. */\nexport const html = ${JSON.stringify(html)} as const;\nexport const js = ${JSON.stringify(js)} as const;\nexport const css = ${JSON.stringify(css)} as const;`;\n\nwriteFileSync('src/converters-from-hdf/html/embedded-assets.ts', out, 'utf8');\n\nconsole.log('Successfully generated the embedded assets file');\n"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { ASFFResults } from './src/asff-mapper/asff-mapper';
|
|
2
2
|
export * as AwsConfigMappingData from './src/mappings/AwsConfigMappingData';
|
|
3
3
|
export * as CciNistMappingData from './src/mappings/CciNistMappingData';
|
|
4
|
+
export * as CheckovToCciAndNistMappingData from './src/mappings/CheckovToCciAndNistMappingData';
|
|
4
5
|
export * as CweNistMappingData from './src/mappings/CweNistMappingData';
|
|
5
6
|
export * as NessusPluginNistMappingData from './src/mappings/NessusPluginNistMappingData';
|
|
6
7
|
export * as NiktoNistMappingData from './src/mappings/NiktoNistMappingData';
|
|
@@ -10,6 +11,7 @@ export * as ScoutsuiteNistMappingData from './src/mappings/ScoutsuiteNistMapping
|
|
|
10
11
|
export * from './src/anchore-grype-mapper';
|
|
11
12
|
export * from './src/aws-config-mapper';
|
|
12
13
|
export * from './src/burpsuite-mapper';
|
|
14
|
+
export * from './src/checkov-mapper';
|
|
13
15
|
export * from './src/ckl-mapper/checklist-jsonix-converter';
|
|
14
16
|
export * from './src/ckl-mapper/checklist-mapper';
|
|
15
17
|
export * from './src/ckl-mapper/checklist-metadata-utils';
|
|
@@ -43,6 +45,10 @@ export * from './src/twistlock-mapper';
|
|
|
43
45
|
export * from './src/utils/attestations';
|
|
44
46
|
export * from './src/utils/compliance';
|
|
45
47
|
export * from './src/utils/fingerprinting';
|
|
48
|
+
export * from './src/utils/result';
|
|
49
|
+
export * from './src/utils/splunk-tools';
|
|
46
50
|
export * from './src/veracode-mapper';
|
|
47
51
|
export * from './src/xccdf-results-mapper';
|
|
48
52
|
export * from './src/zap-mapper';
|
|
53
|
+
export * from './types/splunk-config-types';
|
|
54
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,+BAA+B,CAAC;AAC1D,OAAO,KAAK,oBAAoB,MAAM,qCAAqC,CAAC;AAC5E,OAAO,KAAK,kBAAkB,MAAM,mCAAmC,CAAC;AACxE,OAAO,KAAK,8BAA8B,MAAM,+CAA+C,CAAC;AAChG,OAAO,KAAK,kBAAkB,MAAM,mCAAmC,CAAC;AACxE,OAAO,KAAK,2BAA2B,MAAM,4CAA4C,CAAC;AAC1F,OAAO,KAAK,oBAAoB,MAAM,qCAAqC,CAAC;AAC5E,OAAO,KAAK,kBAAkB,MAAM,mCAAmC,CAAC;AACxE,OAAO,KAAK,oBAAoB,MAA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GED
|
@@ -15,22 +15,33 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
37
|
};
|
|
28
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.ScoutsuiteNistMappingData = exports.OwaspNistMappingData = exports.NistCciMappingData = exports.NiktoNistMappingData = exports.NessusPluginNistMappingData = exports.CweNistMappingData = exports.CciNistMappingData = exports.AwsConfigMappingData = exports.ASFFResults = void 0;
|
|
39
|
+
exports.ScoutsuiteNistMappingData = exports.OwaspNistMappingData = exports.NistCciMappingData = exports.NiktoNistMappingData = exports.NessusPluginNistMappingData = exports.CweNistMappingData = exports.CheckovToCciAndNistMappingData = exports.CciNistMappingData = exports.AwsConfigMappingData = exports.ASFFResults = void 0;
|
|
30
40
|
var asff_mapper_1 = require("./src/asff-mapper/asff-mapper");
|
|
31
41
|
Object.defineProperty(exports, "ASFFResults", { enumerable: true, get: function () { return asff_mapper_1.ASFFResults; } });
|
|
32
42
|
exports.AwsConfigMappingData = __importStar(require("./src/mappings/AwsConfigMappingData"));
|
|
33
43
|
exports.CciNistMappingData = __importStar(require("./src/mappings/CciNistMappingData"));
|
|
44
|
+
exports.CheckovToCciAndNistMappingData = __importStar(require("./src/mappings/CheckovToCciAndNistMappingData"));
|
|
34
45
|
exports.CweNistMappingData = __importStar(require("./src/mappings/CweNistMappingData"));
|
|
35
46
|
exports.NessusPluginNistMappingData = __importStar(require("./src/mappings/NessusPluginNistMappingData"));
|
|
36
47
|
exports.NiktoNistMappingData = __importStar(require("./src/mappings/NiktoNistMappingData"));
|
|
@@ -40,6 +51,7 @@ exports.ScoutsuiteNistMappingData = __importStar(require("./src/mappings/Scoutsu
|
|
|
40
51
|
__exportStar(require("./src/anchore-grype-mapper"), exports);
|
|
41
52
|
__exportStar(require("./src/aws-config-mapper"), exports);
|
|
42
53
|
__exportStar(require("./src/burpsuite-mapper"), exports);
|
|
54
|
+
__exportStar(require("./src/checkov-mapper"), exports);
|
|
43
55
|
__exportStar(require("./src/ckl-mapper/checklist-jsonix-converter"), exports);
|
|
44
56
|
__exportStar(require("./src/ckl-mapper/checklist-mapper"), exports);
|
|
45
57
|
__exportStar(require("./src/ckl-mapper/checklist-metadata-utils"), exports);
|
|
@@ -73,7 +85,10 @@ __exportStar(require("./src/twistlock-mapper"), exports);
|
|
|
73
85
|
__exportStar(require("./src/utils/attestations"), exports);
|
|
74
86
|
__exportStar(require("./src/utils/compliance"), exports);
|
|
75
87
|
__exportStar(require("./src/utils/fingerprinting"), exports);
|
|
88
|
+
__exportStar(require("./src/utils/result"), exports);
|
|
89
|
+
__exportStar(require("./src/utils/splunk-tools"), exports);
|
|
76
90
|
__exportStar(require("./src/veracode-mapper"), exports);
|
|
77
91
|
__exportStar(require("./src/xccdf-results-mapper"), exports);
|
|
78
92
|
__exportStar(require("./src/zap-mapper"), exports);
|
|
93
|
+
__exportStar(require("./types/splunk-config-types"), exports);
|
|
79
94
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6DAA0D;AAAlD,0GAAA,WAAW,OAAA;AACnB,4FAA4E;AAC5E,wFAAwE;AACxE,gHAAgG;AAChG,wFAAwE;AACxE,0GAA0F;AAC1F,4FAA4E;AAC5E,wFAAwE;AACxE,4FAA4E;AAC5E,sGAAsF;AACtF,6DAA2C;AAC3C,0DAAwC;AACxC,yDAAuC;AACvC,uDAAqC;AACrC,8EAA4D;AAC5D,oEAAkD;AAClD,4EAA0D;AAC1D,mEAAiD;AACjD,qFAAmE;AACnE,qFAAmE;AACnE,qFAAmE;AACnE,yFAAuE;AACvE,uFAAqE;AACrE,wDAAsC;AACtC,8DAA4C;AAC5C,yDAAuC;AACvC,gEAA8C;AAC9C,uDAAqC;AACrC,qDAAmC;AACnC,0DAAwC;AACxC,0DAAwC;AACxC,iEAA+C;AAC/C,sDAAoC;AACpC,0DAAwC;AACxC,yDAAuC;AACvC,qDAAmC;AACnC,sDAAoC;AACpC,qDAAmC;AACnC,0DAAwC;AACxC,oDAAkC;AAClC,yDAAuC;AACvC,sDAAoC;AACpC,0DAAwC;AACxC,yDAAuC;AACvC,2DAAyC;AACzC,yDAAuC;AACvC,6DAA2C;AAC3C,qDAAmC;AACnC,2DAAyC;AACzC,wDAAsC;AACtC,6DAA2C;AAC3C,mDAAiC;AACjC,8DAA4C","sourcesContent":["export {ASFFResults} from './src/asff-mapper/asff-mapper';\nexport * as AwsConfigMappingData from './src/mappings/AwsConfigMappingData';\nexport * as CciNistMappingData from './src/mappings/CciNistMappingData';\nexport * as CheckovToCciAndNistMappingData from './src/mappings/CheckovToCciAndNistMappingData';\nexport * as CweNistMappingData from './src/mappings/CweNistMappingData';\nexport * as NessusPluginNistMappingData from './src/mappings/NessusPluginNistMappingData';\nexport * as NiktoNistMappingData from './src/mappings/NiktoNistMappingData';\nexport * as NistCciMappingData from './src/mappings/NistCciMappingData';\nexport * as OwaspNistMappingData from './src/mappings/OwaspNistMappingData';\nexport * as ScoutsuiteNistMappingData from './src/mappings/ScoutsuiteNistMappingData';\nexport * from './src/anchore-grype-mapper';\nexport * from './src/aws-config-mapper';\nexport * from './src/burpsuite-mapper';\nexport * from './src/checkov-mapper';\nexport * from './src/ckl-mapper/checklist-jsonix-converter';\nexport * from './src/ckl-mapper/checklist-mapper';\nexport * from './src/ckl-mapper/checklist-metadata-utils';\nexport * from './src/ckl-mapper/checklistJsonix';\nexport * from './src/converters-from-hdf/asff/reverse-asff-mapper';\nexport * from './src/converters-from-hdf/caat/reverse-caat-mapper';\nexport * from './src/converters-from-hdf/html/reverse-html-mapper';\nexport * from './src/converters-from-hdf/splunk/reverse-splunk-mapper';\nexport * from './src/converters-from-hdf/xccdf/reverse-xccdf-mapper';\nexport * from './src/conveyor-mapper';\nexport * from './src/cyclonedx-sbom-mapper';\nexport * from './src/dbprotect-mapper';\nexport * from './src/dependency-track-mapper';\nexport * from './src/fortify-mapper';\nexport * from './src/gosec-mapper';\nexport * from './src/ionchannel-mapper';\nexport * from './src/jfrog-xray-mapper';\nexport * from './src/msft-secure-score-mapper';\nexport * from './src/nessus-mapper';\nexport * from './src/netsparker-mapper';\nexport * from './src/neuvector-mapper';\nexport * from './src/nikto-mapper';\nexport * from './src/prisma-mapper';\nexport * from './src/sarif-mapper';\nexport * from './src/scoutsuite-mapper';\nexport * from './src/snyk-mapper';\nexport * from './src/sonarqube-mapper';\nexport * from './src/splunk-mapper';\nexport * from './src/trufflehog-mapper';\nexport * from './src/twistlock-mapper';\nexport * from './src/utils/attestations';\nexport * from './src/utils/compliance';\nexport * from './src/utils/fingerprinting';\nexport * from './src/utils/result';\nexport * from './src/utils/splunk-tools';\nexport * from './src/veracode-mapper';\nexport * from './src/xccdf-results-mapper';\nexport * from './src/zap-mapper';\nexport * from './types/splunk-config-types';\n"]}
|
package/lib/package.json
CHANGED
|
@@ -1,93 +1,76 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mitre/hdf-converters",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.13.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Converter util library used to transform various scan results into HDF format",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/mitre/heimdall2",
|
|
9
|
+
"directory": "libs/hdf-converters"
|
|
10
|
+
},
|
|
6
11
|
"files": [
|
|
7
12
|
"lib"
|
|
8
13
|
],
|
|
9
14
|
"main": "src/index.ts",
|
|
10
|
-
"publishConfig": {
|
|
11
|
-
"main": "lib/index.js"
|
|
12
|
-
},
|
|
13
15
|
"scripts": {
|
|
14
|
-
"
|
|
15
|
-
"build
|
|
16
|
-
"
|
|
17
|
-
"lint": "eslint
|
|
18
|
-
"
|
|
19
|
-
"prepack": "yarn build &&
|
|
16
|
+
"prebuild": "tailwindcss -i data/reverse-html-mapper/tailwind.css -o data/reverse-html-mapper/style.css --minify && node data/reverse-html-mapper/convert-to-embedded-strings.ts",
|
|
17
|
+
"build": "tsc -p tsconfig.build.json",
|
|
18
|
+
"lint": "eslint --fix",
|
|
19
|
+
"lint:ci": "eslint --max-warnings 0",
|
|
20
|
+
"prepack": "run-script-os",
|
|
21
|
+
"prepack:darwin:linux": "yarn build && cp package.json package.json.orig && cat package.json.orig | jq '.main = \"lib/index.js\"' > package.json",
|
|
22
|
+
"prepack:win32": "yarn build && copy package.json package.json.orig && type package.json.orig | jq \".main = \\\"lib/index.js\\\"\" > package.json",
|
|
20
23
|
"postpack": "run-script-os",
|
|
21
24
|
"postpack:darwin:linux": "mv package.json.orig package.json",
|
|
22
25
|
"postpack:win32": "move package.json.orig package.json",
|
|
23
|
-
"test": "
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
+
"test": "vitest",
|
|
27
|
+
"test:ci": "vitest run",
|
|
28
|
+
"csv2json": "node data/converters/csv2json.ts",
|
|
29
|
+
"xml2json": "node data/converters/xml2json.ts"
|
|
26
30
|
},
|
|
27
31
|
"dependencies": {
|
|
28
|
-
"@aws-sdk/client-config-service": "3.
|
|
32
|
+
"@aws-sdk/client-config-service": "3.1028.0",
|
|
29
33
|
"@e965/xlsx": "^0.20.0",
|
|
30
34
|
"@mdi/js": "^7.0.96",
|
|
31
35
|
"@microsoft/microsoft-graph-types": "^2.40.0",
|
|
32
36
|
"@mitre/jsonix": "^3.0.7",
|
|
33
37
|
"@smithy/node-http-handler": "^4.0.0",
|
|
38
|
+
"@tailwindcss/cli": "^4.0.6",
|
|
34
39
|
"@types/csv2json": "^1.4.2",
|
|
35
|
-
"@types/ms": "^0.7.31",
|
|
36
40
|
"@types/mustache": "^4.1.2",
|
|
37
41
|
"@types/papaparse": "^5.3.2",
|
|
38
42
|
"@types/revalidator": "^0.3.12",
|
|
43
|
+
"@types/sanitize-html": "^2.3.1",
|
|
39
44
|
"@types/semver": "^7.7.0",
|
|
40
|
-
"@types/triple-beam": "^1.3.2",
|
|
41
45
|
"@types/validator": "^13.12.0",
|
|
42
46
|
"@types/xml2js": "^0.4.9",
|
|
43
47
|
"axios": "^1.3.5",
|
|
44
48
|
"compare-versions": "^6.0.0",
|
|
45
49
|
"csv2json": "^2.0.2",
|
|
46
|
-
"fast-xml-parser": "5.
|
|
50
|
+
"fast-xml-parser": "5.5.11",
|
|
47
51
|
"html-entities": "^2.3.2",
|
|
48
|
-
"htmlparser2": "^
|
|
49
|
-
"inspecjs": "^2.
|
|
52
|
+
"htmlparser2": "^12.0.0",
|
|
53
|
+
"inspecjs": "^2.13.0",
|
|
50
54
|
"lodash": "^4.17.21",
|
|
51
55
|
"moment": "^2.29.1",
|
|
52
|
-
"ms": "^2.1.3",
|
|
53
56
|
"mustache": "^4.2.0",
|
|
54
57
|
"papaparse": "^5.3.1",
|
|
58
|
+
"retry-axios": "^4.0.2",
|
|
55
59
|
"revalidator": "^0.3.1",
|
|
56
60
|
"run-script-os": "^1.1.6",
|
|
61
|
+
"sanitize-html": "^2.17.2",
|
|
57
62
|
"semver": "^7.6.0",
|
|
58
63
|
"tailwindcss": "^4.0.6",
|
|
59
|
-
"tw-elements": "^
|
|
64
|
+
"tw-elements": "^2.0.0",
|
|
60
65
|
"validator": "^13.12.0",
|
|
61
66
|
"winston": "^3.6.0",
|
|
62
67
|
"xml-formatter": "^3.6.2",
|
|
63
68
|
"yaml": "^2.1.1"
|
|
64
69
|
},
|
|
65
70
|
"devDependencies": {
|
|
66
|
-
"@types/jest": "^27.0.0",
|
|
67
71
|
"@types/lodash": "^4.14.161",
|
|
68
|
-
"@types/node": "^
|
|
69
|
-
"
|
|
70
|
-
"quicktype": "^15.0.260",
|
|
71
|
-
"ts-jest": "^29.1.0",
|
|
72
|
-
"tsx": "^4.7.1",
|
|
73
|
-
"typedoc": "^0.28.12",
|
|
72
|
+
"@types/node": "^25.0.0",
|
|
73
|
+
"vitest": "^4.0.18",
|
|
74
74
|
"xml2js": "^0.6.0"
|
|
75
|
-
},
|
|
76
|
-
"jest": {
|
|
77
|
-
"moduleFileExtensions": [
|
|
78
|
-
"js",
|
|
79
|
-
"json",
|
|
80
|
-
"ts",
|
|
81
|
-
"d.ts",
|
|
82
|
-
"node"
|
|
83
|
-
],
|
|
84
|
-
"moduleNameMapper": {
|
|
85
|
-
"axios": "axios/dist/node/axios.cjs"
|
|
86
|
-
},
|
|
87
|
-
"rootDir": ".",
|
|
88
|
-
"testTimeout": 10000000,
|
|
89
|
-
"transform": {
|
|
90
|
-
"^.+\\.ts$": "ts-jest"
|
|
91
|
-
}
|
|
92
75
|
}
|
|
93
76
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anchore-grype-mapper.d.ts","sourceRoot":"","sources":["../../src/anchore-grype-mapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,UAAU,CAAC;AAGlC,OAAO,EACL,aAAa,EACb,WAAW,EAEX,eAAe,EAChB,MAAM,kBAAkB,CAAC;AAiD1B,qBAAa,kBAAmB,SAAQ,aAAa;IACnD,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAElC,cAAc,CACZ,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,OAAO,EACtC,iBAAiB,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,OAAO,EAC1C,wBAAwB,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,OAAO,GAChD,eAAe,CAAC,QAAQ,CAAC,OAAO,GAAG,WAAW,EAAE,WAAW,CAAC;IA+F/D,OAAO,IAAI,eAAe,CACxB,QAAQ,CAAC,SAAS,GAAG;QAAC,WAAW,EAAE,OAAO,CAAA;KAAC,EAC3C,WAAW,CACZ;gBA6DW,UAAU,EAAE,MAAM,EAAE,OAAO,UAAQ;CAOhD"}
|
|
@@ -16,13 +16,17 @@ const IMPACT_MAPPING = new Map([
|
|
|
16
16
|
['negligible', 0.0],
|
|
17
17
|
['unknown', 0.5]
|
|
18
18
|
]);
|
|
19
|
+
// If the highest rating severity for a control is `negligible` or `unknown`, set the results to skipped and request a manual review
|
|
19
20
|
function skipSeverityNegligibleOrUnknown(controls) {
|
|
20
21
|
if (controls) {
|
|
21
22
|
controls
|
|
23
|
+
// Filter to controls whose highest rating severity is either `negligible` or `unknown`
|
|
22
24
|
.filter((control) => {
|
|
23
25
|
const rating = lodash_1.default.get(control, 'tags.severity', '');
|
|
26
|
+
//console.log(rating)
|
|
24
27
|
return rating === 'Negligible' || rating === 'Unknown';
|
|
25
28
|
})
|
|
29
|
+
// For every result contained by that control, set the status to skipped and request a manual review
|
|
26
30
|
.map((control) => control.results.map((result) => {
|
|
27
31
|
result.status = inspecjs_1.ExecJSON.ControlResultStatus.Skipped;
|
|
28
32
|
result.skip_message =
|
|
@@ -43,6 +47,8 @@ function description(data) {
|
|
|
43
47
|
return 'no description found';
|
|
44
48
|
}
|
|
45
49
|
class AnchoreGrypeMapper extends base_converter_1.BaseConverter {
|
|
50
|
+
withRaw;
|
|
51
|
+
metadata;
|
|
46
52
|
controlMatches(matchesPath, idTransformer, impactTransformer, resultMessageTransformer) {
|
|
47
53
|
return {
|
|
48
54
|
path: matchesPath,
|
|
@@ -153,7 +159,7 @@ class AnchoreGrypeMapper extends base_converter_1.BaseConverter {
|
|
|
153
159
|
passthrough: {
|
|
154
160
|
transformer: (data) => {
|
|
155
161
|
return {
|
|
156
|
-
auxiliary_data: [{ name: '', data: lodash_1.default.omit([]) }],
|
|
162
|
+
auxiliary_data: [{ name: '', data: lodash_1.default.omit([]) }], //Insert service name and mapped fields to be removed
|
|
157
163
|
...(this.withRaw && { raw: data })
|
|
158
164
|
};
|
|
159
165
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anchore-grype-mapper.js","sourceRoot":"","sources":["../../src/anchore-grype-mapper.ts"],"names":[],"mappings":";;;;;;AAAA,uCAAkC;AAClC,oDAAuB;AACvB,kDAAgE;AAChE,qDAK0B;AAE1B,MAAM,cAAc,GAAwB,IAAI,GAAG,CAAC;IAClD,CAAC,UAAU,EAAE,GAAG,CAAC;IACjB,CAAC,MAAM,EAAE,GAAG,CAAC;IACb,CAAC,QAAQ,EAAE,GAAG,CAAC;IACf,CAAC,KAAK,EAAE,GAAG,CAAC;IACZ,CAAC,YAAY,EAAE,GAAG,CAAC;IACnB,CAAC,SAAS,EAAE,GAAG,CAAC;CACjB,CAAC,CAA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AqD;wBACrG,GAAG,CAAC,IAAI,CAAC,OAAO,IAAI,EAAC,GAAG,EAAE,IAAI,EAAC,CAAC;qBACjC,CAAC;gBACJ,CAAC;aACF;SACF,CAAC;IACJ,CAAC;IACD,YAAY,UAAkB,EAAE,OAAO,GAAG,KAAK;QAC7C,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QACpC,KAAK,CAAC,EAAC,OAAO,EAAE,gBAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC,EAAC,CAAC,CAAC;QAC9D,IAAI,CAAC,QAAQ,GAAG,gBAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC,CAAC;QAC5D,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;IACnC,CAAC;CACF;AA/KD,gDA+KC","sourcesContent":["import {ExecJSON} from 'inspecjs';\nimport _ from 'lodash';\nimport {version as HeimdallToolsVersion} from '../package.json';\nimport {\n BaseConverter,\n ILookupPath,\n impactMapping,\n MappedTransform\n} from './base-converter';\n\nconst IMPACT_MAPPING: Map<string, number> = new Map([\n ['critical', 0.9],\n ['high', 0.7],\n ['medium', 0.5],\n ['low', 0.3],\n ['negligible', 0.0],\n ['unknown', 0.5]\n]);\n\n// If the highest rating severity for a control is `negligible` or `unknown`, set the results to skipped and request a manual review\nfunction skipSeverityNegligibleOrUnknown(controls: unknown[]): unknown[] {\n if (controls) {\n (controls as ExecJSON.Control[])\n // Filter to controls whose highest rating severity is either `negligible` or `unknown`\n .filter((control) => {\n const rating = _.get(control, 'tags.severity', '') as string;\n //console.log(rating)\n return rating === 'Negligible' || rating === 'Unknown';\n })\n // For every result contained by that control, set the status to skipped and request a manual review\n .map((control) =>\n control.results.map((result) => {\n result.status = ExecJSON.ControlResultStatus.Skipped;\n result.skip_message =\n 'Manual review required because a Anchore Grype rating severity is set to `negligible` or `unknown`.';\n })\n );\n }\n return controls;\n}\n\nfunction description(data: Record<string, unknown>): string {\n const vulnerability = data.vulnerability as Record<string, unknown>;\n const relatedVulnerabilities = data.relatedVulnerabilities as Record<\n string,\n unknown\n >[];\n if (!vulnerability.description && relatedVulnerabilities.length > 0) {\n return relatedVulnerabilities.filter(\n (relatedVulnerability) => relatedVulnerability.id === vulnerability.id\n )[0].description as string;\n } else if (vulnerability.description) {\n return vulnerability.description as string;\n }\n return 'no description found';\n}\n\nexport class AnchoreGrypeMapper extends BaseConverter {\n withRaw: boolean;\n metadata: Record<string, unknown>;\n\n controlMatches(\n matchesPath: string,\n idTransformer: (value: any) => unknown,\n impactTransformer: (value: any) => unknown,\n resultMessageTransformer: (value: any) => unknown\n ): MappedTransform<ExecJSON.Control & ILookupPath, ILookupPath> {\n return {\n path: matchesPath,\n key: 'id',\n tags: {\n nist: ['SA-11', 'RA-5'],\n cveid: {path: 'vulnerability.id'},\n severity: {path: 'vulnerability.severity'}\n },\n descriptions: [\n {\n data: {\n path: 'vulnerability.fix',\n transformer: (data: Record<string, unknown>): string =>\n data.state == 'fixed'\n ? `vulnerability is ${_.get(data, 'state')} for versions ${(_.get(data, 'versions') as string[]).join(', ')}`\n : `vulnerability is not known to be fixed in any versions`\n },\n label: 'fix'\n },\n {\n data: {\n path: 'relatedVulnerabilities',\n transformer: (data: Record<string, unknown>): string =>\n `${JSON.stringify(_.get(data, 'cvss'), null, 2)}`\n },\n label: 'check'\n }\n ],\n refs: {\n transformer: (data: Record<string, unknown>) => {\n const vuln_urls = _.get(data, 'vulnerability.urls') as Record<\n string,\n unknown\n >[];\n const relatedVulnerabilities = _.get(data, 'relatedVulnerabilities');\n let relatedVulnerabilitiesUrls = [] as unknown as Record<\n string,\n unknown\n >[];\n if (relatedVulnerabilities) {\n relatedVulnerabilitiesUrls = (\n relatedVulnerabilities as Record<string, unknown>[]\n ).map((element) => element.urls) as Record<string, unknown>[];\n }\n return (\n vuln_urls.concat(\n ...relatedVulnerabilitiesUrls\n ) as unknown as Record<string, unknown>[]\n ).map((element) => ({url: element}));\n }\n } as unknown as ExecJSON.Reference[],\n source_location: {},\n title: {\n transformer: (data: Record<string, unknown>): string =>\n `Grype found a vulnerability to ${_.get(data, 'vulnerability.id')} in ${_.get(this.metadata, 'source.target.userInput') as string}`\n },\n id: {\n transformer: idTransformer\n },\n desc: {\n transformer: description\n },\n impact: {\n path: 'vulnerability.severity',\n transformer: impactTransformer\n },\n code: {\n transformer: (data: Record<string, unknown>): string =>\n `${JSON.stringify(\n _.omitBy(\n _.pick(data, ['vulnerability', 'relatedVulnerabilities']),\n (value) => value === null || value === ''\n ),\n null,\n 2\n )}`\n },\n arrayTransformer: skipSeverityNegligibleOrUnknown,\n results: [\n {\n status: ExecJSON.ControlResultStatus.Failed,\n code_desc: {\n transformer: (data: Record<string, unknown>): string =>\n `${JSON.stringify(_.get(data, 'matchDetails'), null, 2)}`\n },\n message: {\n transformer: resultMessageTransformer\n },\n start_time: _.get(this.metadata, 'descriptor.timestamp') as string\n }\n ]\n };\n }\n\n mapping(): MappedTransform<\n ExecJSON.Execution & {passthrough: unknown},\n ILookupPath\n > {\n return {\n platform: {\n name: 'Heimdall Tools',\n release: HeimdallToolsVersion,\n target_id: null\n },\n version: HeimdallToolsVersion,\n statistics: {\n duration: null\n },\n profiles: [\n {\n name: 'Anchore - Grype',\n title: 'Anchore Grype Matches',\n version: _.get(this.metadata, 'descriptor.version') as string,\n maintainer: null,\n summary: null,\n license: null,\n copyright: null,\n copyright_email: null,\n supports: [],\n attributes: [],\n depends: [],\n groups: [],\n status: 'loaded',\n controls: [\n {\n ...this.controlMatches(\n 'wrapper.matches',\n (data: Record<string, unknown>): string =>\n `Grype/${_.get(data, 'vulnerability.id')}`,\n impactMapping(IMPACT_MAPPING),\n (data: Record<string, unknown>): string =>\n `${JSON.stringify(_.get(data, 'artifact'), null, 2)}`\n )\n },\n {\n ...this.controlMatches(\n 'wrapper.ignoredMatches',\n (data: Record<string, unknown>): string =>\n `Grype-Ignored-Match/${_.get(data, 'vulnerability.id')}`,\n () => 0,\n (data: Record<string, unknown>): string =>\n `This finding is ignored due to the following applied ignored rules:\\n${JSON.stringify(_.get(data, 'appliedIgnoreRules'), null, 2)}\\nArtifact Information:\\n${JSON.stringify(_.get(data, 'artifact'), null, 2)}`\n )\n }\n ],\n sha256: ''\n }\n ],\n passthrough: {\n transformer: (data: Record<string, any>): Record<string, unknown> => {\n return {\n auxiliary_data: [{name: '', data: _.omit([])}], //Insert service name and mapped fields to be removed\n ...(this.withRaw && {raw: data})\n };\n }\n }\n };\n }\n constructor(exportJson: string, withRaw = false) {\n const temp = JSON.parse(exportJson);\n super({wrapper: _.pick(temp, ['matches', 'ignoredMatches'])});\n this.metadata = _.omit(temp, ['matches', 'ignoredMatches']);\n this.withRaw = withRaw;\n this.setMappings(this.mapping());\n }\n}\n"]}
|
|
@@ -109,3 +109,4 @@ export declare class ASFFResults {
|
|
|
109
109
|
constructor(asffJson: string, securityhubStandardsJsonArray?: undefined | string[], meta?: Record<string, string | undefined> | undefined);
|
|
110
110
|
toHdf(): Record<string, ExecJSON.Execution>;
|
|
111
111
|
}
|
|
112
|
+
//# sourceMappingURL=asff-mapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"asff-mapper.d.ts","sourceRoot":"","sources":["../../../src/asff-mapper/asff-mapper.ts"],"names":[],"mappings":"AAKA,OAAO,EAAC,QAAQ,EAAC,MAAM,UAAU,CAAC;AAGlC,OAAO,EAAC,aAAa,EAA+B,MAAM,mBAAmB,CAAC;AA0B9E,oBAAY,aAAa;IACvB,SAAS,oBAAoB;IAC7B,eAAe,yBAAyB;IACxC,SAAS,kBAAkB;IAC3B,SAAS,kBAAkB;IAC3B,OAAO,YAAY;IACnB,WAAW,qBAAqB;IAChC,KAAK,eAAe;IACpB,aAAa,uBAAuB;IACpC,OAAO,YAA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