Website (promotional or content site)
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.
For agents
- A website shows content and has no accounts. Typical class: S (L when it has a store, admin panel or many editors).
- Rule 1: HTTPS, security headers and no secrets in the pages.
- Rule 2: forms have spam protection and a stated retention period.
- Rule 3: it works at phone width, passes basic accessibility, and each page has its own title and description.
Which class?
- S: static pages, no login, no personal data other than a contact form.
- M: accounts, a customer area, or a third-party API key on the server.
- L: admin panel, file uploads, payments, many editors or users.
- XL: a large public site with millions of visitors and user content.
Audit checklist
Every project
- Facts are verified from current official documentation
- What: Commands, libraries, APIs and platform policies in the project come from current official documents, not from memory.
- How to check: Open the dependency list and the platform configuration; for each non-trivial choice find the official page it relies on (link in a comment or a decision note).
- Evidence: Decision note or code comment with the official URL and the date it was checked.
- Packages come from official sources, stable versions only
- What: Packages and versions are chosen from official sources; the current stable release is used, not alpha or beta.
- How to check: Read the dependency file for pre-release tags (alpha, beta, rc, next); check each package on its official registry page.
- Evidence: Dependency file without pre-release versions.
- HTTPS everywhere
- What: The site or API is served only over HTTPS, and HTTP redirects to it.
- How to check: Request the
http://address and confirm a redirect; check for a Strict-Transport-Security header; check for mixed content. - Evidence: Response headers of the first request; browser console without mixed-content warnings.
- Security headers are set on every response
- What: The site sends Content-Security-Policy, X-Content-Type-Options, Referrer-Policy and Permissions-Policy headers; frames are not allowed.
- How to check: Request a page with
curl -Iand read the headers; for static hosting read the headers file (for example_headerson Cloudflare Pages). - Evidence: Header output of a real request.
- Search basics are in place
- What: Each page has its own title and description, a canonical link, language links for translations, a sitemap and a robots.txt.
- How to check: View the source of three pages; open /sitemap.xml and /robots.txt.
- Evidence: Page source excerpts; sitemap URL.
- Pages are light and images are optimized
- What: Images are sized and compressed, there is no unused script or font, and Core Web Vitals are in the “good” range.
- How to check: Run a Lighthouse or PageSpeed check on the home page and one long page; list the largest files.
- Evidence: Report with LCP, CLS and INP values.
- Forms have spam and bot protection and a retention rule
- What: Contact or sign-up forms are protected against spam and bots, and the page states how long submitted data is kept (or no data is stored).
- How to check: Find the form handler; look for a challenge, honeypot or rate limit; find the retention statement.
- Evidence: Handler code or service setting; retention text.
- Third-party scripts are pinned and integrity-checked
- What: External scripts, if any, are loaded with a fixed version and a Subresource Integrity hash.
- How to check: Search templates for
<script src="http; check forintegrity=attributes and version numbers in the URL. - Evidence: List of external scripts with version and integrity values, or “none”.
- 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.
- Works at phone width
- What: Pages and screens are usable at 360 px width without sideways scrolling.
- How to check: Open the product at 360 px width (browser device mode or a real phone) and walk through the main pages.
- Evidence: Screenshots at phone width for the main pages.
- Links, forms and main flows were checked by hand
- What: Before release someone opened the pages, clicked the links and used the forms or main flows.
- How to check: Look for a release checklist or test record; click through the main paths yourself.
- Evidence: Dated checklist or recorded run.
- A privacy statement matches what the site really does
- What: If the site has a form, analytics or cookies, a privacy statement says what is collected, why, and for how long; if nothing is collected the site does not claim otherwise.
- How to check: List forms, cookies and external requests in the browser’s network panel; compare with the privacy text.
- Evidence: Network panel list; privacy page.
- No secrets in code, chat, commits or logs
- What: Passwords, keys and tokens live in environment variables or a secret manager;
.envis ignored by git; the repository has only.env.example. - How to check: Check
.gitignorefor.env; run a secret scanner (for example gitleaks) over the full history; search for key-like strings. - Evidence:
.gitignoreline, scanner report with zero findings,.env.examplepath.
- What: Passwords, keys and tokens live in environment variables or a secret manager;
- Project memory files exist and are current
- What: The repository has CLAUDE.md or AGENTS.md (permanent rules) and HANDOFF.md (where we stopped), updated at the end of every work round.
- How to check: Look in the repository root for both files; compare the HANDOFF date with the latest commit date.
- Evidence: File paths and the date of the last HANDOFF update.
+ 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
- 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.
- 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.
+ If it has an admin panel, file uploads, many users or a store app (L)
Items for class L: see Website: classes L–XL checklist.
+ If it targets millions of users (XL)
Items for class XL: see Website: classes L–XL checklist.
Common mistakes
- Contact form without spam protection or a statement of how long messages are kept.
- Analytics or tracking scripts added without a privacy text.
- Third-party scripts loaded from a CDN without a fixed version or integrity hash.
- No security headers because the host is static.
- Huge uncompressed images that make the page slow on phones.
- Text in images, missing alternative text and low contrast.
- One title and description copied to every page.
- Only the desktop layout was checked.
Example projects
- One-page portfolio: website, S.
- Restaurant menu page with a contact form: website, S, note the form.
- Landing page for an app: website, S.
- Documentation site written in Markdown: website, S.
- Law firm site with a contact form: website, S, watch personal data in messages.
- Blog with an admin login for editors: website with accounts, M.
- Online shop: web-app, L, payments.
- Association site with member login: web-app, M.
- Real estate site with listings and an admin panel: web-app, L.
- News site with millions of readers and comments: web-app, XL.
- Event site with ticket sales: web-app, L.
- Personal CV page: website, S.
Sources
- HTTP Headers Cheat Sheet — OWASP Cheat Sheet Series
- Content Security Policy (CSP) — MDN Web Docs
- OWASP Top 10 — OWASP
- Web Content Accessibility Guidelines (WCAG) 2.2 — W3C
- Web Vitals — web.dev (Google)
- Pages: Headers — Cloudflare
- Pro Build Guide v1.2: compiled team practices — Pro Build Guide
- meta viewport — MDN Web Docs