CLI Scanner

MDSSC Scanner Docker Container

The MDSSC Scanner is a lightweight Docker container that enables you to scan files and directories remotely using the MetaDefender Software Supply Chain (MDSSC) API, without requiring UI access.

This makes it ideal for CI/CD pipelines, automated scanning, and command-line workflows.

Prerequisites

  • Docker installed and running
  • MDSSC server URL
  • MDSSC API key (see Configuring an API Key)
  • Docker image: opswat/mdssc-scanner:latest

Quick Start

Scan a Single File

Bash
Copy
  • API Key Security: Never commit API keys to version control. Use environment variables or secret management systems in CI/CD pipelines.
  • File Size Limits: Large files may take longer to scan. Adjust SCAN_TIMEOUT accordingly.
  • Network Access: The container requires network access to communicate with your MDSSC server.

Scan all files in a directory

Bash
Copy

Environment Variables

VariableRequiredDefaultDescription
MDSSC_SERVERYes-Your MDSSC server URL (e.g., https://mdssc.com )
MDSSC_API_KEYYes-API key for authentication
WORKFLOW_IDNo-Specific workflow ID to use for scanning
SCAN_TIMEOUTNo300Maximum time to wait for scan completion (seconds)
POLL_INTERVALNo5Interval between status checks (seconds)
FAIL_ON_VULNERABILITIESNofalseExit with error code 2 if vulnerabilities found
VULNERABILITY_THRESHOLDNohighMinimum severity to fail on:critical , high , medium, low

Configuring API Limit

To configure the API limit for file uploads, you need to edit the customer configuration file located at /etc/mdssc/customer.env. Add the following environment variable to specify the maximum file size allowed for direct file uploads:

Bash
Copy

By default, the value is 128 MB. Adjusting this setting ensures the API accepts file uploads up to the specified size.

After making the change, restart the MDSSC service for the new configuration to take effect. Always align this value with your organization’s requirements and security policies.

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard