For the complete documentation index, see llms.txt. This page is also available as Markdown.

ModelScan Step Configuration

Scan machine learning models with ModelScan.

The ModelScan step in Harness STO uses the open-source scanner ModelScan to scan your machine learning (ML) models for security vulnerabilities. You can perform ModelScan scans in both Orchestration and Ingestion modes. This document will guide you through configuring the ModelScan step in your STO pipeline.

Scan your AI/ML models using ModelScan

Supported ML Libraries and Formats

The following table lists the ML libraries and serialization formats, along with their support status in the ModelScan step.

ML Library
Serialization Format
Support Status

Pytorch

Pickle

✅ Supported

Keras

HD5 (Hierarchical Data Format)

✅ Supported

Classic ML Libraries (Sklearn, XGBoost, etc.)

Pickle, Cloudpickle, Dill, Joblib

✅ Supported

TensorFlow

Protocol Buffer

❌ Not Supported

Keras

Keras V3 (Hierarchical Data Format)

❌ Not Supported

Scanning ML models in binary files is not supported. Your models must be in one of the supported formats listed above.

ModelScan step settings

The recommended workflow is to add a ModelScan step to a Security or Build stage and then configure it as described below.

Scan Mode

  • Orchestration mode: In this mode, the step executes the scan, then processes the results by normalizing and deduplicating them.

  • Ingestion mode: In this mode, the ModelScan step ingests scan results from a specified file. The scan results file must be in JSON format.

Scan Configuration

Target

Type

You can also scan models stored in Hugging Face repositories by using the Harness GitHub connector, configured to connect to your Hugging Face account.

Target and variant detection

Name

Variant

Workspace

Ingestion File

The ingestion file must be in JSON format.

Log Level

Fail on Severity

Additional Configuration

Advanced settings

Proxy settings

Last updated

Was this helpful?