Implementation guide OWASP AISVS v1.01

AI-Assisted Secure Coding (Appendix C) · Secure Prompt & Context Management

Strip sensitive data from context

AISVS AC.3.2 Level 1

Verify that technical controls automatically strip sensitive material from any context window sent to an AI tool. Client-side redaction, approved context filters, and secret scanners with pre-prompt hooks all qualify.

OWASP AISVS v1.01, requirement AC.3.2

In plain English

Strip sensitive material from context automatically before it is sent to an AI tool. People forget rules, and assistants gather context by themselves, so the removal has to be technical.

What good looks like

  • Redaction or filtering runs before context leaves the developer's machine or your network.
  • It covers secrets and personal data at least.
  • It applies to context the tool gathers automatically as well as to what the developer types.
  • It has been tested with planted secrets.

How teams usually do it

  • Context filters and exclusion lists in the AI tool's configuration, managed centrally.
  • Client-side redaction or a local proxy that masks secrets and personal data in outgoing requests.
  • Secret scanners wired into pre-prompt hooks, where the tool provides hooks.

Suggested evidence

  • Filter configuration.
  • Test results with planted secrets and personal data.

Common mistakes

  • Excluding env files and missing test fixtures, database dumps and logs that hold real data.
  • Filters set per developer, which half the team never switches on.
  • Forgetting terminal output and clipboard content, which agents also read.

Not sure which requirements apply to your system? Take the assessment, or browse every guide in this chapter.

Requirement text from the OWASP AI Security Verification Standard, licensed under CC BY-SA 4.0. This guidance is shared under the same licence.