AI assistant / app that uses an LLM: class M checklist
Note for AI agents: This page is baseline guidance, not an exact prescription. Read it, tell your owner what applies to their project, and get their approval before you change anything. Your project's own rules take precedence. If something important for this project is missing here, suggest it to your owner.
This page continues AI assistant / app that uses an LLM. Read the main page first. This part holds the audit checklist items for class M.
Audit checklist
+ If it has users, personal data or API keys (M)
- One package manager, lockfile committed
- What: Exactly one package manager is used and enforced; the lockfile is committed; installs are done from the lockfile (for example
--frozen-lockfile). - How to check: Look for a lockfile in the repository and a rule that forbids other managers; check the CI and Docker install commands.
- Evidence: Lockfile path; install command lines.
- What: Exactly one package manager is used and enforced; the lockfile is committed; installs are done from the lockfile (for example
- External API keys stay on the server
- What: Third-party API keys (including LLM keys) are kept on the server and never shipped to the browser or app.
- How to check: Search the client bundle and app package for key-like strings; check that client calls go to your own server.
- Evidence: Search result with zero keys in the client build.
- LLM use has quotas, data minimization and injection defenses
- What: Per-user cost and quota limits; data sent to the provider is minimized and masked and documented in the privacy text; user or document content is never treated as instructions; tool calls pass permission checks; model output is validated before it is stored or acted on; model names come from official documents.
- How to check: Read the LLM call code, the quota logic, the tool permission checks and the output validation; read the privacy text.
- Evidence: Quota settings; test with a malicious document; privacy text lines.
- Tools given to the model are least-privilege
- What: Each tool the model can call has only the access it needs; the permission check uses the signed-in user, not the model’s claim.
- How to check: List the tools and the permission check for each.
- Evidence: Tool list with scopes; test for a denied call.
- Consequential actions need user confirmation
- What: Actions with side effects (sending, deleting, paying) are shown to the user for confirmation, not executed from model output alone.
- How to check: Trace one such action from model output to execution.
- Evidence: Confirmation step in the flow.
- Provider outages and limits are handled
- What: Timeouts, rate limits and provider errors give a clear message and do not corrupt data; retries are bounded.
- How to check: Simulate a provider failure and a slow response.
- Evidence: Test results.
- A test set checks answer quality and safety
- What: A fixed set of example inputs, including attack examples, is run after every prompt or model change and the results are compared.
- How to check: Find the evaluation set and the last results.
- Evidence: Evaluation file and result log.
- Data sent to AI providers is minimized and disclosed
- What: Personal data sent to an AI provider is minimized and masked, and the provider’s retention terms are documented; private messages between people are not sent.
- How to check: Read the prompt building code and the provider terms notes.
- Evidence: Masking code; terms note.
- Stored notes and memory follow the deletion rules
- What: Reminders, notes and conversation memory are personal data with a retention period and a working delete path (including copies sent for indexing).
- How to check: Delete a note and check the database, search index and backups schedule.
- Evidence: Deletion test; schedule row.
- Authentication uses a mature library or service
- What: Login is built with a well-known library or hosted service; no home-made cryptography; passwords are hashed with a current algorithm.
- How to check: Find the login code; check the password hashing function (for example Argon2id, scrypt, bcrypt); search for hand-written crypto.
- Evidence: Library name and version; hashing configuration.
- Permissions are checked on the server
- What: Every action checks who the user is and what they may do on the server; a hidden button is not security.
- How to check: Call each protected endpoint without a session and with the wrong user; read the permission checks in the handlers.
- Evidence: Test names for unauthenticated and wrong-user requests; code lines of the checks.
- Logs contain no personal data or secrets
- What: Logs do not record passwords, tokens, keys or personal data; if needed they are masked.
- How to check: Read the logging setup; trigger a login and a form and inspect the log lines; search for e-mail and token patterns.
- Evidence: Sample log lines after a test run showing masking.
- Personal data fields are documented
- What: For every personal data field the purpose, retention time and legal basis (KVKK, GDPR) are written down.
- How to check: List the database columns and form fields with personal data; find the matching entries in the data note.
- Evidence: Data note listing each field with purpose, period and basis.
- One deletion schedule covers all data
- What: Every kind of data has a deletion period, collected in one deletion schedule document, and the code implements it.
- How to check: Find the document; for each row find the job or code that deletes the data.
- Evidence: Schedule document and the matching job names.
- Automatic backups with a tested restore
- What: The database is backed up automatically, retention is written down, and a restore has actually been tried.
- How to check: Find the backup job and its schedule; find the record of the last restore test.
- Evidence: Backup schedule, retention setting and dated restore-test record.
- Critical flows have automated tests and a local check
- What: Login, saving data, payment (if any) and permission checks have automated tests; one local command runs the checks before pushing.
- How to check: List the test files; run the check command; look for a git hook that runs it.
- Evidence: Test names and a passing run log.
- Secret scanning runs before push and in CI
- What: A scanner (for example gitleaks or secretlint) runs before code is pushed and in CI.
- How to check: Find the hook or CI step that runs the scanner.
- Evidence: Hook file or CI step; latest clean run.
Sources
- OWASP Gen AI Security Project: LLM risks — OWASP Gen AI Security Project
- LLM Prompt Injection Prevention Cheat Sheet — OWASP Cheat Sheet Series
- AI Risk Management Framework — NIST
- Model Context Protocol: Security Best Practices — Model Context Protocol
- Secrets Management Cheat Sheet — OWASP Cheat Sheet Series
- Logging Cheat Sheet — OWASP Cheat Sheet Series
- Pro Build Guide v1.2: compiled team practices — Pro Build Guide