Skip to content
Software development
ASD ISMISM-2072

ASD ISM 2072 Store AI models in a non-executable file format

What it says

AI models are stored in a non-executable file format that does not allow arbitrary code execution.

Quoted as published. Everything else on this page is written by Control Stack.

In plain English

Store the AI models you develop or build into AI applications only in non-executable file formats, which hold the model as data and cannot run arbitrary code when loaded or used.

AI models the organisation develops or builds into AI applications must be stored in a non-executable file format, one that does not allow arbitrary code to run when the model is loaded or used. Some common formats, including those built on Python's pickle serialisation, can carry instructions that run as the file is loaded. Formats that hold only the model's weights (the values it learned) and metadata as plain data avoid this. The control covers every stored copy, including model registries, artefact stores, repositories and container images.

Why it matters

A model file in an executable format can run an attacker's code the moment a developer or a production service loads it, compromising that machine. A format that holds only data closes that route, so a tampered model cannot use the format to run code.

How to implement

  1. Find every stored model and identify its real format.

    Search model registries, artefact stores, repositories, shared drives, container images and model caches on hosts that run AI applications. Identify formats by file content, not extension, because a file named .bin or .pt can contain pickled objects. Include models downloaded from public hubs and those from your own training runs.

  2. Get a non-executable version from each supplier first.

    Use the supplier's own non-executable release where one exists, or request one. If none is offered, convert the model yourself in isolation or choose another model. Treat any model still stored in an executable format as a gap to close, because the control allows no exception.

  3. Convert the remaining models to a non-executable format.

    Re-save each one in a format that holds the weights, metadata and any model structure only as data, never serialised objects or code. Do the conversion in an isolated environment after checking the model's source and integrity (ISM-2086), because loading the original to convert it can run any code it carries.

  4. Block executable formats where models enter.

    Add content-based checks to the model registry, artefact store and build pipeline that reject pickle-based and other code-carrying model files, with a model file scanner as a backstop. Set loading code to refuse serialised objects, so a file that slips through still fails to load.

Keep it running

Check the format of each new model and version before it enters a registry or image, because suppliers and tools can change their default format. A new model source, loading library or conversion tool should prompt a recheck of the upload and build blocks.

Evidence and audit

  1. Check 1 of 2What an auditor asks for

    Ask for

    A content-based format scan of model registries, artefact stores, repositories, shared drives, container images and the model caches on hosts that run AI applications, compared with the models each AI application loads.

    Look at

    Whether the scan covers every model the AI applications load, and whether any stored model uses a format that can run code when loaded or used, such as one based on pickle.

    Good evidence

    Every model the AI applications load appears in the scan, and every stored copy in every scanned location is in a non-executable format, with no pickle-based or other code-carrying model file found.

  2. Check 2 of 2What an auditor asks for

    Ask for

    A test in a test environment that uploads a harmless pickle-based model file, and a copy renamed with an extension each route accepts, to the model registry, the artefact store and the build pipeline.

    Look at

    Whether each route rejects both the file and its renamed copy.

    Good evidence

    The registry, artefact store and pipeline each reject the test file and its renamed copy, so none of them judges a model file by its name alone.

Mappings

Closest match in ISO/IEC 27001: A.8.7, Protection against malware, which this control partially meets.

ISO 27001

ISO/IEC 27001: 1 mapping

  • A.8.7Protection against malwarePartially meets

Mappings show how controls relate across frameworks. They do not imply full equivalence or certification.