Skip to main content

CI environment variables

This document lists and describes the environment variables supported by the Invicti Scan command-line tool for use in CI/CD pipelines. These variables allow you to configure and customize automated scans when integrating Invicti DAST into your development workflows.

important
  • All variables should be defined securely using your CI/CD system's secret management features (for example, GitHub Actions Secrets, GitLab CI/CD Variables, Jenkins Credentials).
  • Authentication requires either INVICTI_API_TOKEN (recommended) or the combination of INVICTI_API_USERNAME and INVICTI_API_PASSWORD.
  • INVICTI_TARGET_ID is required for scans to run.
  • INVICTI_SCAN_PROFILE must match a configured profile in your Invicti Platform instance.

Environment variables

Variable nameDescriptionExample valuePossible values
INVICTI_AGENT_IDGUID of a pre-existing agent configured in the platform. Find it under Scans > Agents. Default: null. Cannot be used with CloudAgent.abc123-...Any GUID
INVICTI_API_BASE_URLPlatform URL (string)https://platform.invicti.com
INVICTI_API_PASSWORDPlatform password. Use with INVICTI_API_USERNAME. Not recommended — use INVICTI_API_TOKEN instead.
INVICTI_API_TOKEN(Recommended) API token for authentication. Generate from your account settings.1234567890abcdef...
INVICTI_API_USERNAMEPlatform username. Use with INVICTI_API_PASSWORD. Not recommended — use INVICTI_API_TOKEN instead.
INVICTI_EXCLUDED_PATHSComma-separated list of paths to exclude from scanning. Default: null./admin,/login
INVICTI_FAIL_ON_VULN_CONFIDENCE_FULLObsolete. When true, equivalent to setting INVICTI_MINIMUM_CONFIDENCE=100. Use INVICTI_MINIMUM_CONFIDENCE=100 directly instead. Requires INVICTI_MINIMUM_SEVERITY to be set. Default: false.truetrue, false
INVICTI_IGNORE_IF_VULN_STATUS_IGNOREDWhen true, vulnerabilities with a status of Ignored or False Positive are excluded from build failure checks. Default: true.truetrue, false
INVICTI_IMPORT_FILE_PATHSComma-separated list of file paths or patterns to import into the target before scanning. Cannot be used with TargetDefault. Default: null. See Import file patterns for details.imports/*.har,openapi/*.yaml
INVICTI_LOG_LEVELLogging verbosity level. Default: INFO.INFODEBUG, INFO
INVICTI_MINIMUM_CONFIDENCEMinimum confidence level (1–100) for vulnerabilities to trigger a build failure. Vulnerabilities below this threshold are ignored. Can be used independently or with INVICTI_MINIMUM_SEVERITY. Default: null.801–100
INVICTI_MINIMUM_SEVERITYMinimum severity for build failure. Fails the build if any vulnerability at this level or higher is found. Default: null.HighCritical, High, Medium, Low, Info
INVICTI_REPORT_TEMPLATEName of a report template configured in the platform. When set, a report is generated after the scan completes. Default: null.Comprehensive
INVICTI_SCAN_AGENTWhich scanning agent to use. Default: TargetDefault. See Scan agent types for details.CloudAgentTargetDefault, CloudAgent, EphemeralAgent
INVICTI_SCAN_PROFILEName of a scan profile configured in the platform. Default: Full Scan.Full Scan
INVICTI_SCAN_TIMEOUTMaximum scan duration in minutes. Default: 20.20
INVICTI_TARGET_IDID of the target to scan, as configured in the platform. See Retrieve the target ID.abcd1234-5678-efgh-ijkl-9876mnopqrst
INVICTI_TARGET_URLURL of the target to scan. For ephemeral targets only. Do not use localhost as it refers to the container itself in that context.https://test.test.net
INVICTI_TRIGGER_SCAN_ONLYWhen true, starts the scan and exits immediately without waiting for results. The scan continues running in the background. Cannot be used with EphemeralAgent. Default: false.truetrue, false

Authentication

INVICTI_API_TOKEN is the recommended authentication method. It provides non-disruptive, persistent access without affecting other sessions.

Using INVICTI_API_USERNAME and INVICTI_API_PASSWORD is supported but not recommended. Each login invalidates any existing sessions, which can disrupt other users or integrations sharing the same account.

Import file patterns

The INVICTI_IMPORT_FILE_PATHS variable allows you to import traffic files, API definitions, or other scan data into the target before scanning begins. This variable accepts a comma-separated list of file paths or wildcard patterns.

Important
  • Can't be used with the TargetDefault agent type
  • The scan fails if any specified pattern matches zero files
  • Import files are automatically cleaned up from the target after the scan completes

Pattern syntax

Wildcard patterns:

  • Supports standard wildcards: * (matches any characters), ? (matches single character)
  • Searches recursively in all subdirectories from the specified directory
  • Each pattern is evaluated separately: directory path + filename pattern
  • If no directory is specified, uses the current directory (.)

Example patterns:

PatternDescription
imports/*.harAll HAR files in the imports directory and its subdirectories
test-data/traffic.sazSpecific file at the given path
*.postman_collection.jsonAll Postman collection files in the current directory and subdirectories
openapi/*.yamlAll YAML files in the openapi directory and subdirectories
swagger*.jsonAll JSON files starting with "swagger" in the current directory and subdirectories
*.har,*.xml,swagger*.jsonMultiple patterns (comma-separated)

Supported file types

Common import file formats include:

  • HAR files (*.har)
  • Fiddler SAZ files (*.saz)
  • Postman collections (*.postman_collection.json)
  • OpenAPI/Swagger definitions (*.yaml, *.json)
  • XML files (*.xml)

Scan agent types

The INVICTI_SCAN_AGENT variable determines which agent performs the scan and how the target configuration is handled:

  • TargetDefault (Default)

    Uses the target's existing configuration as-is. No modifications are made to the target settings. Use this when you have already configured the target in Invicti Platform and want to trigger scans without changing any settings.

  • CloudAgent

    Forces the scan to use Invicti's cloud-hosted scanning infrastructure. The CLI removes any existing agent assignments from the target to ensure cloud scanners are used. Use this when your target is publicly accessible from the internet.

  • EphemeralAgent

    Launches a temporary internal scanning agent from the CLI's environment. This allows scanning targets that are only accessible from the machine running the CLI — for example, internal networks, staging environments behind firewalls, or CI/CD environments. The agent is automatically registered, used for the scan, and cleaned up afterward. Use this when your target is not accessible from the cloud.

Choosing the right agent type

Use caseAgent type
Target is already configured in the platform and you want to trigger scans without changing settingsTargetDefault
Target is publicly accessible and you want to use Invicti's managed cloud infrastructureCloudAgent
Target is only accessible from the CI/CD environment (internal apps, staging behind a firewall)EphemeralAgent

Compatibility notes

Some variables cannot be combined with certain agent types:

VariableIncompatible withReason
INVICTI_IMPORT_FILE_PATHSTargetDefaultImporting files modifies the target's configuration
INVICTI_AGENT_IDCloudAgentCloud agents are managed by Invicti
INVICTI_TRIGGER_SCAN_ONLYEphemeralAgentThe agent would be cleaned up before the scan completes

Example usage

# Single pattern
INVICTI_IMPORT_FILE_PATHS="imports/*.har"

# Multiple patterns
INVICTI_IMPORT_FILE_PATHS="test-data/*.har,openapi/*.yaml,*.postman_collection.json"

# Specific file
INVICTI_IMPORT_FILE_PATHS="recordings/api-traffic.saz"

For complete integration guidance, refer to the Integrate CI-driven scans document.


Need help?

Invicti Support team is ready to provide you with technical help. Go to Help Center

Was this page useful?