Overview
This article explains how to scan your projects for AI components using the Mend CLI.
Prerequisites
-
Your Mend organization has a Mend AI / Mend AI Core / Mend AI Premium entitlement.
-
Your Mend organization has access to the Mend Platform to view the results.
-
Mend CLI is installed with the latest version (v25.2.1 or newer) OR an active Mend for GitHub.com repository integration.
-
Mend AI’s discovery is at the code-level, not the artifact-level (contradictory to earlier iterations of this offering).
Note: Discovery of some AI components (System Prompts, Agents, etc.) is only available with a Mend AI Core / Premium subscription.
Getting it done
Scan your AI Models with the Mend CLI
A Mend AI scan can be executed in one of two ways:
-
As a part of an SCA scan using the
mend depcommand -
As a standalone scan using the
mend ai scancommand
mend dep
To run a scan and generate results using the AI BoM report capability, follow the steps outlined in our Scan your open source components (SCA) with the Mend CLI documentation for initiating a scan. Once the scan is completed, you can view the AI BoM report in the Mend Platform to analyze the results.
Note: Mend AI scan initiation will be denoted by the “Mend AI scan running” entry in the console after your SCA scan concludes.
Mend AI scan statuses:
-
Failed: “Mend AI scan failed, view the scan logs for additional information.”
-
Partial: Results exist, but errors were encountered.
-
Success: “Mend AI scan succeeded.”
-
Skipped: “Mend AI scan not performed based on your configuration.”
mend ai scan
mend ai scan [flags]
Available flags:
|
Flag |
Description |
|---|---|
|
-d, --directory string |
Directory to scan (defaults to current directory) |
|
-h, --help |
Help for scan |
|
-l, --log-file-path string |
Path to log file |
|
--no-upload |
Don’t upload results to Mend platform (local scan only; useful for testing and validation) |
|
-s, --scope string |
Set scope: |
|
--tags string |
Comma‑separated tags for the scan |
Scan Behavior
-
Scan Statuses
-
Success = Results exist, no errors
-
Partial = Error + results exist
-
Failed = Error + no results
-
Skipped (based on configuration)
-
-
Violations
-
The Violations page displays violations for violating scans, including partial scans.
-
Scan statistics include a violations count (displayed in the Violations column)
-
-
Findings
-
Findings are displayed in the Findings column
-
AI-only totals are available
-
Scan your AI Models with the Mend Repository Integrations
Mend Classic Integrations (Cloud)
Mend AI results will be available automatically upon performing an SCA scan.
Mend Classic Integrations (Self-Hosted)
Mend for Bitbucket Data Center
View the results in the Mend Platform
To view your AI BoM (Bill of Materials) report screen, please refer to our View your AI Bill of Materials (AI BoM) Report documentation.
Supported Large Language Models (LLM) Source Repositories
Mend AI currently provides support for AI models sourced from Kaggle (for model artifact scanning) and Hugging Face. We are actively working to expand our repository coverage to include more hosts soon.