Prisma AIRS
Using CLI
Table of Contents
Expand All
|
Collapse All
Prisma AIRS Docs
Using CLI
Scan provide immediate results with options to retrieve detailed findings later using
scan ID, view scan history, and access enhanced analysis through the CLI.
Retrieving a Specific Scan (CLI/SDK)
After a scan completes, note the scan ID from the output. Retrieve the full results
at any time.
Retrieve Scan Results using
CLI
model-security get-scan "87654321-4321-4321-4321-210987654321"
Retrieve Scan Results using Python
SDK
scan_id = "87654321-4321-4321-4321-210987654321" scan_result = client.get_scan(scan_id) print(f"Scan Status: {scan_result.eval_outcome}") print(f"Model URI: {scan_result.model_uri}") print(f"Created: {scan_result.created_at}")
View Scan Summary (CLI/SDK)
View a summary of recent scans to track your security assessments.
View Scan Summary using CLI
model-security list-scans --limit 20
View Scan Summary using Python SDK
scans = client.list_scans(limit=20) for scan in scans.scans: print(f"Scan {scan.uuid}: {scan.eval_outcome} - {scan.model_uri}")
You can also filter scans by source type, evaluation outcome, or time range.
Filter Scans by source type, evaluation outcome, or time range using
CLI
model-security list-scans \ --source-types "HUGGING_FACE" "S3" \ --eval-outcomes "ALLOWED" "BLOCKED" \ --start-time "2025-01-01T00:00:00" \ --limit 50
Filter Scans by source type, evaluation outcome, or time range using Python
SDK
from datetime import datetime, timezone from airs_schemas.constants import SourceType, EvalOutcome scans = client.list_scans( source_types=[SourceType.HUGGING_FACE, SourceType.S3], eval_outcomes=[EvalOutcome.ALLOWED, EvalOutcome.BLOCKED], start_time=datetime(2025, 1, 1, tzinfo=timezone.utc), limit=50 )