Supply Chain CLI
The Supply Chain CLI is a container image that can be downloaded and ran via Docker. For prerequisites, including licenses, see Prerequisites.Download
Download the Supply Chain CLI file and transfer it to the system where it will be deployed.Docker Command FailsWhen using Docker commands, like
docker pull, if you get a permission denied message, try using sudo docker, like sudo docker pull.Alternatively, add the user to the appropriate Docker group for Docker daemon permissions.-
Authenticate using
docker login.- The username is the Registry Username.
- The password is the Model Scanner License ID.
- For information about licenses, see Prerequisites.
- Pull the HiddenLayer image.
- Tag the image for your private registry.
- Push the air-gapped image to your private registry. Note: Make sure you are logged in to your private registry in order to push the image.
Notes
- You will run the Supply Chain CLI after you deploy the AI Security Platform and create an API key.
- The above may need to be repeated for each updated release of Supply Chain.
Running Supply Chain CLI
Select your deployment type.- Hybrid: Connecting a Self-Hosted Supply Chain to an Self-Hosted AI Security Platform.
- Standalone: Self-Hosted Supply Chain without a Self-Hosted AI Security Platform.
- Hybrid
- Standalone
-
Export your HiddenLayer information (product license, API key, and API secret).
-
Run the Supply Chain command.
Supply Chain Command Descriptions (Click to expand)
- Replace
$(directory)with the path on the local machine where models to be scanned are located. Example:/Users/username/Downloads.- To scan a specific file in the folder, update
--input /files-to-scanwith the file name. Example:--input /files-to-scan/test_model.pkl.
- To scan a specific file in the folder, update
- Replace
<location of supply chain cli in local registry>with the location of the Supply Chain image.- Example for Docker image:
- Replace
$model_namewith either the name of an existing model from the inventory (to add a new scan version to the existing model) or a new, unique name (to create a new model entry in the inventory). Example:Test Scan. - Using
--persistadds the scan results to an existing model in the AI Security Platform Console. - In the following example,
jqis used to make the output more readable. Remove| jqif you do not want to use jq.
- Replace
- The scan results display in the terminal or command prompt. You can also log in to the Platform Console to view the scan results.
- For more information about Supply Chain CLI command-line arguments, for input and output, see Command-Line Arguments
Supply Chain Sample Output (Click to expand)
Supply Chain Sample Output (Click to expand)
The following is an example output for a Supply Chain CLI scan using a terminal or command prompt.
Self-Signed Certificates Breaks Persist FlagWhen using a self-signed certificate for testing, using the Add these flags to the Docker run command:
--persist flag results in a failed scan. Scan results never display in the Platform Console.The container does not trust the internal certificate. To fix this, you must fetch the certificate and mount it into the container.To fetch the certificate:
