Skip to main content

cxsast_exporter

The cxsast_exporter command provides the ability to perform the following actions:

  • Export an existing SAST v9.3 (and up) environment.

  • Generate autocompletion script for the specified shell.

  • Print the version number of cxsast_exporter tool.

  • Provide a help menu for the command,

Usage

cxsast_exporter [flags]
cxsast_exporter [command]

Flags

The SAST Exporter CLI Tool supports the following flags:

Name

Default

Description

Version

--debug

Activates debug mode

V1.2.0

--export <strings>

users, teams, triage, projects, queries, presets

SAST export options:

  • users

  • teams

  • projects - export project including presetid

  • queries - export only custom queries

  • presets - export only custom presets

Note

  • Scans can't be exported.

  • Scan results that are triaged can be exported.

    For more information about triaging results in Checkmarx SAST, see the table in SAST Results Tab section.

V1.2.0

--help, -h

help for cxsast_exporter

V1.2.0

--nested-teams

include original team structure without flattening

V1.2.0

--pass <string>

SAST password

V1.2.0

--project-id <string>

Filter according to project ID

V1.2.0

--project-team <string>

Filter according to team name

V1.2.0

--projects-active-since <int>

180

Include only results from projects active in the last N days

V1.2.0

--query-mapping <string>

https://raw.githubusercontent.com/Checkmarx/sast-to-ast-export/master/data/mapping.json

Path to file query mapping IDs from Checkmarx One for triage

For additional information see the note at the beginning of the SAST CLI Export Tool topic.

V1.2.0

--url <string>

SAST URL

V1.2.0

--user <string>

SAST username

V1.2.0

--verbose, -v

Enable verbose logging to console

V1.2.0

Export Examples

Exporting all Files & Options

To export all the possible options, run the cxsast_exporter command without flags:

C:\User>cxsast_exporter --user <SAST user> --pass <SAST Password> --url <SAST URL>

Exporting Users & Teams

To export several options, run the cxsast_exporter command with the relevant parameters:

C:\User>cxsast_exporter --user <SAST user> --pass <SAST Password> --url <SAST URL> --export users,teams

Notice

Any combination is valid for the SAST export.

For more information see V1.2.0 SAST Export Matrix

Exporting Users, Teams & Results Including Results from Projects Active more then the Default (180 days)

C:\User>cxsast_exporter --user <SAST user> --pass <SAST Password> --url <SAST URL> --projects-active-since 360

Available Commands

completion

The completion command Generates autocompletion script for the specified shell.

Usage

cxsast_exporter completion [command] <flags>

Available Commands

  • bash - Generates the autocompletion script for bash

  • fish - Generates the autocompletion script for fish

  • powershell - Generates the autocompletion script for powershell

  • zsh - Generates the autocompletion script for zsh

Flags

Name

Default

Description

--help, -h

help for the completion command

Examples

C:\User>cxsast_exporter completion powershell
# powershell completion for cxsast_exporter                      -*- shell-script -*-

function __cxsast_exporter_debug {
    if ($env:BASH_COMP_DEBUG_FILE) {
        "$args" | Out-File -Append -FilePath "$env:BASH_COMP_DEBUG_FILE"
    }
}

version

The version command Print the version number of cxsast_exporter tool.

Usage

cxsast_exporter version <flags>

Flags

Name

Default

Description

--help, -h

help for the version command

Examples

C:\User>cxsast_exporter version
cxsast_exporter 0.0.2+20211013173125