Secure Development with Python Plugin

This feature requires an subscription to the Manifest AI Risk Module. For more information, reach out to [email protected].

Automatically analyze and track AI models used by your development teams without disrupting your existing workflows. Manifest’s notebook plugin provides real-time AI Risk policy enforcement.

To use the plugin in a Google Colab notebook or a Databricks notebook, follow the steps below:

  1. Install the plugin.
    pip install mais
  2. Create a new Manifest API Token for MAIS.
    1. Navigate to Settings > API Tokens. This can be found under the section "Account":

    2. Create a token with at least the following scopes

  3. In Google Colab, add your Manifest API key.
    1. Generate a Manifest API key from your account - this links the notebook to your Manifest account for policy enforcement and model tracking.

    2. Add your MANIFEST_API_KEY as a Google Colab secret

    3. Assign your secret to the api_token variable.

      ``python
      api_token = userdata.get('MANIFEST_API_KEY')
      ``
  4. In Databricks, add your Manifest API key
    1. 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
    2. Assign your secret to the api_token variable:
      api_token = dbutils.secrets.get(scope="mais", key="api-token")

  5. 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)

  6. 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")
  7. Generate the SBOM. This will automatically generate an AI Bill of Materials (AIBOM) showing all model dependencies and risks.
    m.create_sbom()
    Your Manifest dashboard will now show the new model with complete risk analysis, compliance status, and security documentation - demonstrating full AI governance in action.

Example

Example #1: Risk assessment of a model registered in your organization’s inventory


Example #2: Risk Assessment of model not found in inventory