# Security

**Test family:** `SEC`

Apply these to the task, not mechanically to every pixel. Cross-cutting failures often emerge only through interactions with domain item files.

- **SEC-001** Authenticate every protected entry and authorize every object/action/field server-side.
- **SEC-002** Test horizontal/vertical/tenant access through direct references, alternate routes, batch, search, export, files, websocket, cache, automation, and AI context.
- **SEC-003** Use contextual output encoding and safe parsers; inert canaries never execute in HTML, URL, CSS, JS, templates, spreadsheets, logs, or notifications.
- **SEC-004** State-changing requests resist cross-site request abuse and unsafe cross-origin access.
- **SEC-005** Redirects, links, server-side fetches, uploads, archives, and imports validate destination/content at every redirect/extraction layer.
- **SEC-006** Sessions/tokens/keys/passwords/PII never enter URLs, logs, analytics, errors, client storage, source maps, or unrelated prompts.
- **SEC-007** Rate/size/depth/time/concurrency limits fail boundedly without corrupting data or amplifying cost.
- **SEC-008** Dependencies/errors/configuration do not expose stack, path, version, query, environment, or secrets.
- **SEC-009** Sensitive actions use reauthentication/step-up, confirmation, notification, audit, idempotency, and least privilege as appropriate.
- **SEC-010** Security testing beyond harmless canaries requires explicit authorization and controlled scope.

## Comprehensive per-item coverage

- **SEC-011** Apply the quality concern to absent, empty, ordinary, boundary-size, malformed, stale, concurrent, and failure-state data.
- **SEC-012** Include text containing ASCII emoticons, emoji/ZWJ sequences, kaomoji, accents, mixed scripts, RTL, combining marks, confusables, invisible characters, and control characters.
- **SEC-013** Exercise UI, API, import/export, automation, mobile, background jobs, notifications, analytics, logs, caches, and stored representations.
- **SEC-014** Test anonymous, ordinary, privileged, suspended, removed, and cross-tenant actors with least privilege and final-commit authorization.
- **SEC-015** Use fresh, stale, conflicting, deleted, archived, and partially migrated records; expose uncertainty rather than silently choosing.
- **SEC-016** Repeat and race operations before commit, after commit before response, and after partial downstream success; require safe idempotency.
- **SEC-017** Force timeout, disconnect, quota, dependency error, malformed response, regional failover, and recovery failure.
- **SEC-018** Use supported browsers, devices, network qualities, locales, time zones, input methods, and assistive technologies.
- **SEC-019** Measure median and tail latency, throughput, resource use, queue depth, retries, and degradation at normal and supported boundary load.
- **SEC-020** Use inert injection canaries across markup, script, SQL, templates, commands, paths, headers, CSV formulas, and logs.
- **SEC-021** Inspect URL, referrer, DOM, storage, clipboard, telemetry, logs, traces, notifications, exports, caches, backups, and screenshots for leakage.
- **SEC-022** Verify labels, roles, names, descriptions, focus, keyboard behavior, announcements, reflow, contrast, motion, alternatives, and error recovery.
- **SEC-023** Translate and lengthen text, switch RTL/LTR direction, change number/date/currency formats, and use unsupported glyph fallbacks.
- **SEC-024** Delete, restore, archive, expire, retain, export, anonymize, and purge; reconcile user-visible, indexed, cached, and backed-up state.
- **SEC-025** Verify one coherent audit trail with actor, authority, target, old/new state, time, source, correlation ID, attempts, and outcome.
- **SEC-026** Define observable success and failure signals, alert thresholds, dashboards, ownership, runbooks, and a way to test the monitors.
- **SEC-027** Compare intended requirement, implementation, deployed behavior, and evidence; do not promote inspected code or a single run into a pass.
- **SEC-028** Segment results by role, tenant, locale, platform, data shape, load, and consequential workflow so averages do not hide severe failures.
- **SEC-029** Run destructive, high-volume, privacy-invasive, and security probes only in an authorized isolated environment with recovery and stop conditions.
- **SEC-030** State residual risk, untested combinations, evidence tier, confidence limits, rollback trigger, and owner before recommending release.

[Back to Cross-cutting quality index](../../cross-cutting.md)
