Web app / SaaS: 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 Web app / SaaS. 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
- 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.
- Sessions expire and can be revoked
- What: Sessions have a lifetime, can be ended by the user and by the server, and are invalidated after a password change.
- How to check: Read the session configuration; test: sign in on two devices, change the password, see if the other session ends.
- Evidence: Configuration lines; test result.
- All input is validated on the server with a schema
- What: Every request body, query and parameter is checked on the server against a schema; the client check is only a convenience.
- How to check: For each endpoint find the schema or validator; send invalid, oversized and unexpected fields and see the response.
- Evidence: Validator files per endpoint; test cases for invalid input.
- 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.
- 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.
- 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.
- Sign-up is hardened
- What: Disposable e-mail blocking, one account per inbox (ignoring
+tagand Gmail dots), e-mail verification, notification and undo on e-mail change, leaked-password check, per-account attempt limits, bot protection, and a session list with remote sign-out. - How to check: Walk through registration, e-mail change and password reset; read the limits in code; try the same inbox with a
+tag. - Evidence: Test names or screenshots for each item; limit values.
- What: Disposable e-mail blocking, one account per inbox (ignoring
- Password reset and e-mail flows are safe
- What: Reset links are single-use and expire, responses do not reveal whether an account exists, and old sessions end after a reset.
- How to check: Request a reset for a known and an unknown address and compare the responses; use a link twice.
- Evidence: Test results for each case.
- Errors do not leak internals
- What: Users see generic error pages; stack traces, SQL and file paths appear only in protected logs.
- How to check: Trigger a server error and a not-found in production mode and read the response body.
- Evidence: Screenshot or response body.
- 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.
- The deletion and backup promise to users is true
- What: The privacy text and screens state correct deletion and backup periods (for example “gone from systems within 7 days, from backups within 37 days”) including third-party providers.
- How to check: Compare the privacy text with the real jobs and backup retention.
- Evidence: Privacy text lines next to the job and retention settings.
- 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.
- One command starts everything locally
- What: The project starts locally with one command (for example
docker compose up) including database and object storage; the same image runs in every environment and only settings differ. - How to check: Read the compose file and Dockerfile; run the command on a clean checkout.
- Evidence: Compose file path; successful start log.
- What: The project starts locally with one command (for example
- Files use an S3-compatible API behind one storage layer
- What: Files are stored through an S3-compatible API; only one storage service class talks to the provider; endpoint, bucket and keys come only from settings.
- How to check: Search the code for provider-specific imports outside the storage layer; read the settings loader.
- Evidence: Storage layer file; search result with no provider types outside it.
- PostgreSQL by default, through an ORM or query builder
- What: The default database is PostgreSQL (another choice has a written reason); queries go through an ORM or query builder; raw SQL lives in one module; connection settings come from configuration.
- How to check: Read the database config and decision notes; search for raw SQL.
- Evidence: Decision note; list of raw SQL locations.
- Deleting a record has a deliberate rule for related records
- What: For every link between records the code states what happens on delete (cascade only with a reason,
SET NULLfor “created in” links). - How to check: Read foreign key definitions; look at the
ON DELETErule of each. - Evidence: Schema file lines with a comment explaining each non-default rule.
- What: For every link between records the code states what happens on delete (cascade only with a reason,
- Accessibility basics meet WCAG 2.2 AA
- What: Correct heading order, text alternatives, enough contrast, keyboard navigation, visible focus, sufficient touch targets, and respect for reduced-motion settings.
- How to check: Tab through every screen; run an automated checker (for example axe) and a contrast check; test with a screen reader once; check
prefers-reduced-motionhandling. - Evidence: Checker report, list of screens tried with keyboard and screen reader.
Sources
- OWASP Top 10 — OWASP
- Application Security Verification Standard (ASVS) — OWASP
- Authentication Cheat Sheet — OWASP Cheat Sheet Series
- Session Management Cheat Sheet — OWASP Cheat Sheet Series
- Authorization Cheat Sheet — OWASP Cheat Sheet Series
- Insecure Direct Object Reference Prevention Cheat Sheet — OWASP Cheat Sheet Series
- Cross-Site Request Forgery Prevention Cheat Sheet — OWASP Cheat Sheet Series
- Input Validation Cheat Sheet — OWASP Cheat Sheet Series
- File Upload Cheat Sheet — OWASP Cheat Sheet Series
- Logging Cheat Sheet — OWASP Cheat Sheet Series
- Forgot Password Cheat Sheet — OWASP Cheat Sheet Series
- Server Side Request Forgery Prevention Cheat Sheet — OWASP Cheat Sheet Series
- PostgreSQL: PostgreSQL documentation — PostgreSQL Global Development Group
- Building best practices — Docker Docs
- The Twelve-Factor App: III. Config — 12factor.net
- Pro Build Guide v1.2: compiled team practices — Pro Build Guide