Scan a Local Model
Focus
Focus
Prisma AIRS

Scan a Local Model

Table of Contents


Scan a Local Model

Scan a model that is stored locally.

Scan a Local Model

For models stored locally, specify the path to the model directory. To scan a model from the local disk, only model_path is required.
Before you start the model scanning process:
  • Ensure that the security group source type must match the source of the model that you are scanning. For example, you cannot use a Hugging Face security group on a local model. If you don’t provide any model URI, then by default local disk source type is used.
  • Validate that the model path points to the correct storage location.
  • The ignore_patterns and allow_patters is not applicable for local model scans.
  • Running a model scan can consume up to 4GB memory depending on the size and type of the model. Therefore, ensure that the environment used for the scanning has sufficient resources. Verify if you've enough space to download and sàve the model being scanned.
  • Use model_path to specify the local disk location for models.
When creating a scan, you can attach up to 50 custom labels to help organize your scans.
Scan using CLI
model-security scan \ --security-group-uuid "12345678-1234-1234-1234-123456789012" \ --model-path "path/to/local/model" \ -l env=production
Scan using Python SDK
from model_security_client.api import ModelSecurityAPIClient # Initialize the client client = ModelSecurityAPIClient( base_url="https://api.sase.paloaltonetworks.com/aims" ) result = client.scan( security_group_uuid="12345678-1234-1234-1234-123456789012", model_path="path/to/local/model", labels={ "env": "production" } )