Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cwe_entries as available Issue field #67

Merged
merged 3 commits into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
v4.13.0 (XXXX 2024)
- Support the new vulnerability_priority_rating tag
v4.13.0 (Mmmm 2024)
- Add `cwe_entries` as an available Issue field
- Add `vulnerability_priority_rating` as an available Issue field

v4.12.0 (May 2024)
- Migrate integration to use Mappings Manager
Expand Down
2 changes: 1 addition & 1 deletion lib/dradis/plugins/nessus/gem_version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def self.gem_version

module VERSION
MAJOR = 4
MINOR = 12
MINOR = 13
TINY = 0
PRE = nil

Expand Down
1 change: 1 addition & 0 deletions lib/dradis/plugins/nessus/mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ module Mapping
'report_item.age_of_vuln',
'report_item.bid_entries',
'report_item.cve_entries',
'report_item.cwe_entries',
'report_item.cvss3_base_score',
'report_item.cvss3_impact_score',
'report_item.cvss3_temporal_score',
Expand Down
3 changes: 2 additions & 1 deletion lib/nessus/report_item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def supported_tags
:risk_factor, :solution, :synopsis, :threat_intensity_last_28, :threat_recency,
:threat_sources_last_28, :vpr_score, :vuln_publication_date,
# multiple tags
:bid_entries, :cve_entries, :see_also_entries, :xref_entries,
:bid_entries, :cve_entries, :cwe_entries, :see_also_entries, :xref_entries,
# compliance tags
:cm_actual_value, :cm_audit_file, :cm_check_id, :cm_check_name, :cm_info,
:cm_output, :cm_policy_value, :cm_reference, :cm_result, :cm_see_also,
Expand Down Expand Up @@ -113,6 +113,7 @@ def method_missing(method, *args)
translations_table = {
:bid_entries => 'bid',
:cve_entries => 'cve',
:cwe_entries => 'cwe',
:see_also_entries => 'see_also',
:xref_entries => 'xref'
}
Expand Down
8 changes: 3 additions & 5 deletions spec/dradis/plugins/nessus/importer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
require 'ostruct'

describe Dradis::Plugins::Nessus::Importer do

before(:each) do
# Stub template service
templates_dir = File.expand_path('../../../../../templates', __FILE__)
expect_any_instance_of(Dradis::Plugins::TemplateService)
.to receive(:default_templates_dir).and_return(templates_dir)
mapping_service = double('Dradis::Plugins::MappingService')
allow(mapping_service).to receive(:apply_mapping).and_return('')
allow(Dradis::Plugins::MappingService).to receive(:new).and_return(mapping_service)

# Init services
plugin = Dradis::Plugins::Nessus
Expand Down
1 change: 1 addition & 0 deletions templates/report_item.sample
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ If safe checks are enabled, this may be a false positive since it is based on th
<product_coverage>Low</product_coverage>
<canvas_package>CANVAS</canvas_package>
<cve>CVE-2002-0392</cve>
<cwe>123</cwe>
<bid>5033</bid>
<xref>IAVA:2002-a-0003</xref>
<xref>OSVDB:838</xref>
Expand Down