Secure Development with Python Plugin
The Manifest Notebook Plugin enables teams to integrate AI risk management directly into their existing workflows. By installing Manifest's MAIS plugin, every cell in your notebook is automatically scanned before execution, ensuring compliance with AI governance policies and providing real-time visibility into model usage. This helps organizations manage risk, enforce security standards, and maintain continuous compliance without disrupting development.
To use the plugin in a Google Colab notebook or a Databricks notebook, follow the steps below:
- Install the plugin.
pip install mais
- Create a new Manifest API Token for MAIS.
- 
Navigate to Settings > API Tokens. This can be found under the section "Account": 
- 
Create a token with at least the following scopes     
 
- 
- In Google Colab, add your Manifest API key.
- 
Generate a Manifest API key from your account - this links the notebook to your Manifest account for policy enforcement and model tracking. 
- 
Add your MANIFEST_API_KEY as a Google Colab secret   
- 
Assign your secret to the api_token variable. ``python api_token = userdata.get('MANIFEST_API_KEY') ``
 
- 
- In Databricks, add your Manifest API key
- Ensure your Databricks environment has a secret scope and key configured with Manifest API Key as a value: https://docs.databricks.com/aws/en/security/secrets/?language=Secrets%C2%A0utility%C2%A0%28dbutils.secrets%29#create-a-secret
- Assign your secret to the  api_token variable:
api_token = dbutils.secrets.get(scope="mais", key="api-token")
 
 
- Import and initialize the plugin. After successful initialization, MAIS will scan and analyze every cell before its execution, separately.
from mais import MAIS m = MAIS(api_token=api_token)
 
- Register your custom model to your Manifest inventory using the register_model function. all parameters are required.
m.register_model("model_name", "model_version", "supplier", "country")
- Generate the SBOM. This will automatically generate an AI Bill of Materials (AIBOM) showing all model dependencies and risks.
Your Manifest dashboard will now show the new model with complete risk analysis, compliance status, and security documentation - demonstrating full AI governance in action.m.create_sbom()
Example
Example #1: Risk assessment of a model registered in your organization’s inventory
 
 
Example #2: Risk Assessment of model not found in inventory
 

Updated about 1 month ago
