How to meet it
OWASP AISVS v1.01
AI-Assisted Secure Coding (Appendix C) · Secure Prompt & Context Management
Reject oversized repository input
Verify that input length controls stop untrusted PR or repository content from crowding system instructions or safety directives out of the effective context window. Oversized inputs are rejected outright. Silent truncation is not acceptable.
OWASP AISVS v1.01, requirement AC.3.5
In plain English
Limit how much untrusted repository or PR content can go into the context, so it cannot push your instructions out. Reject oversized input outright. Silent truncation can drop your instructions.
What good looks like
- Token limits apply to untrusted content.
- Oversized input is rejected with a clear message.
- System instructions are always kept in full.
How teams usually do it
- Token counting in the bot before building the prompt.
Evidence an auditor would accept
- Configuration and tests with oversized PRs.
Common mistakes
- Truncating long diffs from the start, which can drop the system prompt.
Not sure which requirements apply to your system? Take the assessment.
Requirement text from the OWASP AI Security Verification Standard, licensed under CC BY-SA 4.0. This guidance is shared under the same licence.
