Wiz Scanner Parser

Wiz Scanner Parser Documentation

Overview

The Wiz parser for DefectDojo supports imports from both Wiz Scanner Standard and SCA (Software Composition Analysis) .csv output from Wiz.io. This document details the parsing of both formats into DefectDojo field mappings, unmapped fields, and location of each field’s parsing code for easier troubleshooting and analysis.

Supported File Types

The Wiz parser accepts CSV file format. There are two primary formats supported:

  1. Standard Format - Issues exports with “Title” field (processed by WizParserByTitle class)
  2. SCA Format - Vulnerability exports with “Name” and “DetailedName” fields (processed by WizParserByDetailedName class)

To generate these files, export the findings from the Wiz platform by:

  • Standard Format: Select “Export to CSV” option from the Issues view in the Wiz.io platform
  • SCA Format: Select “Export to CSV” option from the Vulnerability view in the Wiz.io platform

Standard Format CSV (WizParserByTitle)

Total Fields in Standard Format CSV

  • Total data fields: 32
  • Total data fields parsed: 32
  • Total data fields NOT parsed: 0

Standard Format Field Mapping Details

CSV Field #CSV FieldFinding FieldParser Line #Notes
1Created Atdate68Parsed using the parse_wiz_datetime function to convert to datetime object
2Titletitle67Direct mapping to Finding title
3Severityseverity69Converted to lowercase then capitalized to match DefectDojo’s severity format
4Statusactive, is_mitigated, mitigated65Converted through WizcliParsers.convert_status function to determine active status and mitigation status
5Descriptiondescription (partial)79-81Added to description with “Description:” prefix
6Resource Typedescription (partial)79-81Added to description with “Resource Type:” prefix
7Resource external IDdescription (partial)79-81Added to description with “Resource external ID:” prefix
8Subscription IDdescription (partial)79-81Added to description with “Subscription ID:” prefix
9Project IDsdescription (partial)79-81Added to description with “Project IDs:” prefix
10Project Namesdescription (partial)79-81Added to description with “Project Names:” prefix
11Resolved Timemitigated71-74Used to set mitigated timestamp if finding is marked as mitigated
12Resolutionmitigation (partial)62-63Added to mitigation text with “Resolution:” prefix
13Control IDdescription (partial)79-81Added to description with “Control ID:” prefix
14Resource Namedescription (partial)79-81Added to description with “Resource Name:” prefix
15Resource Regiondescription (partial)79-81Added to description with “Resource Region:” prefix
16Resource Statusdescription (partial)79-81Added to description with “Resource Status:” prefix
17Resource Platformdescription (partial)79-81Added to description with “Resource Platform:” prefix
18Resource OSdescription (partial)79-81Added to description with “Resource OS:” prefix
19Resource original JSONdescription (partial)79-81Added to description with “Resource original JSON:” prefix
20Issue IDunique_id_from_tool85Used as unique identifier for the finding
21Resource vertex IDdescription (partial)79-81Added to description with “Resource vertex ID:” prefix
22Ticket URLsdescription (partial)79-81Added to description with “Ticket URLs:” prefix
23Notedescription (partial)79-81Added to description with “Note:” prefix
24Due Atdescription (partial)79-81Added to description with “Due At:” prefix
25Remediation Recommendationmitigation61Direct mapping to mitigation field
26Subscription Namedescription (partial)79-81Added to description with “Subscription Name:” prefix
27Wiz URLdescription (partial)79-81Added to description with “Wiz URL:” prefix
28Cloud Provider URLdescription (partial)79-81Added to description with “Cloud Provider URL:” prefix
29Resource Tagsdescription (partial)79-81Added to description with “Resource Tags:” prefix
30Kubernetes Clusterdescription (partial)79-81Added to description with “Kubernetes Cluster:” prefix
31Kubernetes Namespacedescription (partial)79-81Added to description with “Kubernetes Namespace:” prefix
32Container Servicedescription (partial)79-81Added to description with “Container Service:” prefix

Additional Finding Field Settings (Standard Format)

Finding FieldDefault ValueParser Line #Notes
static_findingFalse84Set to False for all findings
dynamic_findingTrue84Set to True for all findings

SCA Format (WizParserByDetailedName)

Total Fields in SCA CSV

  • Total data fields: 41
  • Total data fields parsed: 36
  • Total data fields NOT parsed: 5

SCA Format Field Mapping Details

CSV Field #CSV FieldFinding FieldParser Line #Notes
1IDunique_id_from_tool182Used as unique identifier for the finding
2WizURLdescription150-154Added to description with “Wiz URL” prefix
3Nametitle, vulnerability_ids169, 182-184Used in title format as vulnerability ID and added to vulnerability_ids list
4CVSSSeverityNot parsed-Not used in mapping
5HasExploitdescription150-154Added to description with “Has Exploit” prefix
6HasCisaKevExploitdescription150-154Added to description with “Has Cisa Kev Exploit” prefix
7FindingStatusactive, is_mitigated180Mapped through convert_status function to determine active state
8VendorSeverityseverity181Mapped through _validate_severities to convert to DefectDojo severity format
9FirstDetecteddate185Parsed into date object using date_parser
10LastDetectedNot parsed-Not used in mapping
11ResolvedAtNot parsed-Not used in mapping
12ResolutionReasonNot parsed-Not used in mapping
13Remediationmitigation155-159Added to mitigation with “Remediation” prefix
14LocationPathdescription, mitigation150-159Added to both description and mitigation with “Location Path” prefix
15DetailedNametitle, component_name169, 183Used in title format and mapped to component_name
16Versiondescription, component_version150-154, 184Added to description with “Version” prefix and mapped to component_version
17FixedVersionmitigation155-159Added to mitigation with “Fixed Version” prefix
18DetectionMethoddescription150-154Added to description with “Detection Method” prefix
19Linkdescription150-154Added to description with “Link” prefix
20Projectsdescription150-154Added to description with “Projects” prefix
21AssetIDdescription150-154Added to description with “Asset ID” prefix
22AssetNamedescription150-154Added to description with “Asset Name” prefix
23AssetRegiondescription150-154Added to description with “Asset Region” prefix
24ProviderUniqueIddescription150-154Added to description with “Provider Unique Id” prefix
25CloudProviderURLdescription150-154Added to description with “Cloud Provider URL” prefix
26CloudPlatformdescription150-154Added to description with “Cloud Platform” prefix
27StatusNot parsed-Not directly used (FindingStatus is used instead)
28SubscriptionExternalIddescription150-154Added to description with “Subscription External Id” prefix
29SubscriptionIddescription150-154Added to description with “Subscription Id” prefix
30SubscriptionNamedescription150-154Added to description with “Subscription Name” prefix
31Tagsunsaved_tags186Parsed into tags list using _parse_tags function
32ExecutionControllersdescription150-154Added to description with “Execution Controllers” prefix
33ExecutionControllersSubscriptionExternalIdsdescription150-154Added to description with “Execution Controllers Subscription External Ids” prefix
34ExecutionControllersSubscriptionNamesdescription150-154Added to description with “Execution Controllers Subscription Names” prefix
35CriticalRelatedIssuesCountNot parsed-Not used in mapping
36HighRelatedIssuesCountNot parsed-Not used in mapping
37MediumRelatedIssuesCountNot parsed-Not used in mapping
38LowRelatedIssuesCountNot parsed-Not used in mapping
39InfoRelatedIssuesCountNot parsed-Not used in mapping
40OperatingSystemdescription150-154Added to description with “Operating System” prefix
41IpAddressesdescription150-154Added to description with “Ip Addresses” prefix

Additional Finding Field Settings (SCA Format)

Finding FieldDefault ValueParser Line #Notes
static_findingTrue182Set to True for SCA format findings
Severity“Info”210Default if not a valid severity

Special Processing Notes

Date Processing

  • Parser uses function parse_wiz_datetime() (lines 207-246) to handle different date formats from Wiz
  • Handles both ISO8601 and custom Wiz timestamp formats

Status Conversion

  • Both parser formats use WizcliParsers.convert_status() function to determine finding status (active, mitigated, etc.)
  • Standard format - if a finding is mitigated, the Resolved Time is used as the mitigated timestamp

Description Construction

  • Most CSV fields maintain field name as a prefix when added to the Finding description
  • Description generated by iterating through predefined list of fields and adding data if present

Title Format

  • Standard format: Used directly from the “Title” field
  • SCA format: Combines package name (DetailedName) and vulnerability ID (Name) in format “{package_name}: {vulnerability_id}”

Mitigation Construction

  • Standard format: Primary source is “Remediation Recommendation” field with optional “Resolution” field
  • SCA format: Combines “Remediation”, “LocationPath”, and “FixedVersion” fields

Deduplication

  • Both formats use the respective ID field as the unique_id_from_tool for deduplication

Tags Handling (SCA Format)

  • “Tags” field is parsed from a JSON string format into a list of tag strings in format “key: value” (lines 186, 193-201)

Sample Scan Data

Sample Wiz Scanner scans can be found in the sample scan data folder.