Skip to content
Software development
ASD ISMISM-2094

ASD ISM 2094 AI content filtering to block sensitive data exposure

What it says

Content filtering is implemented by AI applications to detect and block sensitive data exposure and improper output.

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

In plain English

AI applications must filter their content to detect and block both sensitive data exposure and improper output, such as code or commands a downstream system would run.

AI applications must implement content filtering, which checks content against a set policy, to detect and block, not merely flag, both of these:

  • Sensitive data exposure: output revealing data whose compromise would harm the organisation or a person, such as personal details, credentials or confidential code.
  • Improper output: output unsafe to pass on or display, such as script a browser would run or a command another system would execute.

Why it matters

An AI application can repeat sensitive data from its training or the sources it searches, and its output can carry code that a downstream system runs. Filtering output before release blocks much of this from reaching users or other applications.

How to implement

  1. Define what the filter must block for each application.

    List the sensitive data it could expose, such as personal information, credentials and keys, classification markings and proprietary code, and the unsafe output for each destination, such as script a browser would run, or database and shell commands.

  2. Filter every output before it leaves the application.

    Put the filter between the model and every destination: users, files, APIs and other applications. Use pattern matching for structured data such as card numbers, tax file numbers and keys, and classifiers for unstructured sensitive content. Check streamed answers before display, because text already shown cannot be withdrawn.

  3. Block matches and make output safe for its destination.

    Withhold the response or the matching part, return a safe message and log the event with the rule that fired. Validate output against the format the receiving system expects, and encode it for that destination, such as HTML encoding where a web application displays it (ISM-1241).

  4. Test with output that must be blocked.

    Plant fake sensitive records or secret strings in data the application can reach, try to extract them, including in disguised forms, and ask for script or commands the application should not output. If you build on a vendor's AI platform, switch on its output filters and test them the same way.

Keep it running

Update the filter when the application gains a data source or output destination, and re-test after model or prompt changes. Treat each leak found later as a gap, and add it to the tests and the filter rules.

Evidence and audit

  1. Check 1 of 3What an auditor asks for

    Ask for

    The output paths of each sampled AI application, such as chat, API, file export and integrations, taken from its architecture and live configuration.

    Look at

    Whether every path passes through content filtering before output reaches a user or another system.

    Good evidence

    Every output path, including API and integration paths, passes through content filtering before reaching a user or another system.

  2. Check 2 of 3What an auditor asks for

    Ask for

    A test that asks the application to reveal planted fake sensitive data, in plain form and in disguises such as added spaces or splitting it across lines.

    Look at

    Whether the filter detects and blocks each attempt.

    Good evidence

    The filter detects and blocks the planted data in every attempt, in plain and disguised forms.

  3. Check 3 of 3What an auditor asks for

    Ask for

    A test that asks for script or a database or shell command the application should not output, followed through to the receiving system.

    Look at

    Whether the content filter detects the script or command and blocks it before it reaches a receiving system that would run it, rather than leaving it to that system's own defences, such as encoding or parameterised queries.

    Good evidence

    The content filter detects the script or command and blocks it, withholding the output or the unsafe part, before it reaches any receiving system that would run it, without relying on that system's own defences.

Mappings

Closest match in ISO/IEC 27001: A.8.12, Data leakage prevention, which this control partially meets.

ISO 27001

ISO/IEC 27001: 2 mappings

  • A.8.12Data leakage preventionPartially meets
  • A.5.13Labelling of informationDepends on

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