@ghostbyte/agent-docs-kit 4.0.2 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +43 -37
  3. package/SECURITY.md +11 -0
  4. package/content/catalog.json +191 -22
  5. package/content/documentation/01-system-documentation.md +13 -0
  6. package/content/documentation/02-project-governance.md +13 -0
  7. package/content/documentation/03-development-records.md +13 -0
  8. package/content/documentation/04-testing-evidence.md +13 -0
  9. package/content/documentation/05-operations-runbooks.md +13 -0
  10. package/content/documentation/06-future-proposals.md +13 -0
  11. package/content/documentation/07-archive-governance.md +13 -0
  12. package/content/documentation/full-reference.md +24 -0
  13. package/content/engineering/01-query-performance.md +17 -27
  14. package/content/engineering/02-networking-fundamentals.md +17 -27
  15. package/content/engineering/03-rate-limiting-algorithms.md +18 -28
  16. package/content/engineering/04-production-debugging.md +17 -27
  17. package/content/engineering/05-code-review-practices.md +17 -27
  18. package/content/engineering/06-data-modeling.md +17 -27
  19. package/content/engineering/07-cloud-cost-saving.md +17 -27
  20. package/content/engineering/08-testing-types.md +17 -27
  21. package/content/engineering/09-message-queues.md +17 -27
  22. package/content/engineering/10-api-design-compatibility.md +14 -0
  23. package/content/engineering/11-reliability-slos.md +14 -0
  24. package/content/engineering/12-observability-telemetry.md +14 -0
  25. package/content/engineering/13-deployment-change-safety.md +14 -0
  26. package/content/engineering/14-capacity-concurrency.md +14 -0
  27. package/content/engineering/full-reference.md +24 -144
  28. package/content/security/01-design-architecture.md +11 -19
  29. package/content/security/02-local-development.md +13 -21
  30. package/content/security/03-database-backend.md +18 -26
  31. package/content/security/04-api-layer.md +23 -31
  32. package/content/security/05-frontend-ui.md +16 -24
  33. package/content/security/06-application-security-testing.md +22 -28
  34. package/content/security/07-cicd-release-engineering.md +13 -21
  35. package/content/security/08-cloud-infrastructure.md +17 -25
  36. package/content/security/09-edge-cdn-dns.md +16 -24
  37. package/content/security/10-release-rollout.md +13 -21
  38. package/content/security/11-post-release-monitoring-ir.md +15 -23
  39. package/content/security/12-ongoing-operations.md +24 -32
  40. package/content/security/full-reference.md +30 -3163
  41. package/docs/ARCHITECTURE.md +31 -92
  42. package/docs/CONTENT_MAINTENANCE.md +5 -1
  43. package/docs/GITHUB_AND_NPM_SETUP.md +1 -1
  44. package/docs/RELEASE_PROCESS.md +5 -5
  45. package/package.json +12 -5
  46. package/scripts/build-site.mjs +13 -0
  47. package/scripts/build-skill.mjs +24 -0
  48. package/scripts/check-links.mjs +56 -0
  49. package/scripts/check-review-dates.mjs +21 -0
  50. package/scripts/preview-site.mjs +43 -0
  51. package/scripts/smoke-package.mjs +58 -0
  52. package/scripts/validate-content.mjs +85 -0
  53. package/site/app.js +121 -0
  54. package/site/index.html +346 -0
  55. package/site/styles.css +159 -0
  56. package/skills/manage-project-quality/SKILL.md +18 -2
  57. package/skills/manage-project-quality/assets/documentation-report.md +3 -3
  58. package/skills/manage-project-quality/assets/engineering-report.md +3 -3
  59. package/skills/manage-project-quality/assets/security-report.md +3 -3
  60. package/skills/manage-project-quality/references/documentation-01-system-documentation.md +13 -0
  61. package/skills/manage-project-quality/references/documentation-02-project-governance.md +13 -0
  62. package/skills/manage-project-quality/references/documentation-03-development-records.md +13 -0
  63. package/skills/manage-project-quality/references/documentation-04-testing-evidence.md +13 -0
  64. package/skills/manage-project-quality/references/documentation-05-operations-runbooks.md +13 -0
  65. package/skills/manage-project-quality/references/documentation-06-future-proposals.md +13 -0
  66. package/skills/manage-project-quality/references/documentation-07-archive-governance.md +13 -0
  67. package/skills/manage-project-quality/references/documentation-full-reference.md +24 -0
  68. package/skills/manage-project-quality/references/documentation-governance.md +2 -2
  69. package/skills/manage-project-quality/references/engineering-01-query-performance.md +17 -27
  70. package/skills/manage-project-quality/references/engineering-02-networking-fundamentals.md +17 -27
  71. package/skills/manage-project-quality/references/engineering-03-rate-limiting-algorithms.md +18 -28
  72. package/skills/manage-project-quality/references/engineering-04-production-debugging.md +17 -27
  73. package/skills/manage-project-quality/references/engineering-05-code-review-practices.md +17 -27
  74. package/skills/manage-project-quality/references/engineering-06-data-modeling.md +17 -27
  75. package/skills/manage-project-quality/references/engineering-07-cloud-cost-saving.md +17 -27
  76. package/skills/manage-project-quality/references/engineering-08-testing-types.md +17 -27
  77. package/skills/manage-project-quality/references/engineering-09-message-queues.md +17 -27
  78. package/skills/manage-project-quality/references/engineering-10-api-design-compatibility.md +14 -0
  79. package/skills/manage-project-quality/references/engineering-11-reliability-slos.md +14 -0
  80. package/skills/manage-project-quality/references/engineering-12-observability-telemetry.md +14 -0
  81. package/skills/manage-project-quality/references/engineering-13-deployment-change-safety.md +14 -0
  82. package/skills/manage-project-quality/references/engineering-14-capacity-concurrency.md +14 -0
  83. package/skills/manage-project-quality/references/engineering-full-reference.md +24 -144
  84. package/skills/manage-project-quality/references/engineering-protocol.md +1 -1
  85. package/skills/manage-project-quality/references/security-01-design-architecture.md +11 -19
  86. package/skills/manage-project-quality/references/security-02-local-development.md +13 -21
  87. package/skills/manage-project-quality/references/security-03-database-backend.md +18 -26
  88. package/skills/manage-project-quality/references/security-04-api-layer.md +23 -31
  89. package/skills/manage-project-quality/references/security-05-frontend-ui.md +16 -24
  90. package/skills/manage-project-quality/references/security-06-application-security-testing.md +22 -28
  91. package/skills/manage-project-quality/references/security-07-cicd-release-engineering.md +13 -21
  92. package/skills/manage-project-quality/references/security-08-cloud-infrastructure.md +17 -25
  93. package/skills/manage-project-quality/references/security-09-edge-cdn-dns.md +16 -24
  94. package/skills/manage-project-quality/references/security-10-release-rollout.md +13 -21
  95. package/skills/manage-project-quality/references/security-11-post-release-monitoring-ir.md +15 -23
  96. package/skills/manage-project-quality/references/security-12-ongoing-operations.md +24 -32
  97. package/skills/manage-project-quality/references/security-full-reference.md +30 -3163
  98. package/skills/manage-project-quality/scripts/check-report.mjs +67 -16
  99. package/src/api/index.mjs +4 -0
  100. package/src/cli/arguments.mjs +27 -3
  101. package/src/cli/help.mjs +53 -18
  102. package/src/cli/main.mjs +66 -9
  103. package/src/commands/audit.mjs +146 -31
  104. package/src/commands/doctor.mjs +1 -1
  105. package/src/commands/guide.mjs +12 -0
  106. package/src/commands/list.mjs +1 -1
  107. package/src/commands/setup.mjs +9 -4
  108. package/src/commands/skill.mjs +1 -0
  109. package/src/commands/template.mjs +32 -0
  110. package/src/commands/validate.mjs +36 -4
  111. package/src/commands/website.mjs +26 -0
  112. package/src/core/config.mjs +61 -0
  113. package/src/core/files.mjs +47 -6
  114. package/templates/adr.md +20 -0
  115. package/templates/change-record.md +18 -0
  116. package/templates/incident-review.md +20 -0
  117. package/templates/runbook.md +18 -0
  118. package/templates/test-evidence.md +18 -0
  119. package/tests/cli.test.mjs +226 -0
  120. package/tests/content.test.mjs +18 -0
@@ -1,48 +1,38 @@
1
1
  # Message Queues
2
2
 
3
- # Engineering Topic 9: Message Queue Concepts
3
+ ## Engineering Topic 9: Message Queue Concepts
4
4
 
5
5
  **When to run this:** When designing or reviewing a system that uses a message queue/event stream (Kafka, RabbitMQ, SQS, etc.) for async communication between services.
6
6
 
7
7
  **Goal of this pass:** Confirm the delivery, ordering, and failure-handling guarantees the system actually needs match what the queue setup actually provides.
8
8
 
9
- ## Files in this folder
9
+ ## How to use this reference
10
10
 
11
- | File | Purpose |
12
- |---|---|
13
- | `CHECKLIST.md` | The reference list of concepts for this topic — what each one is, why it matters, and the self-check question to ask. Doesn't get filled in; copy `RESULTS_TEMPLATE.md` to record a real pass. |
14
- | `RESULTS_TEMPLATE.md` | Fillable version of the same list, with a Status column and notes. Copy this file per pass (e.g. `RESULTS_2026-08-29.md`) so history isn't overwritten. |
15
-
16
- Full source list lives in `../ENGINEERING_REFERENCE.md`. Unlike
17
- `../../security-gate/phases/`, this is knowledge/practice review, not pass/fail security
18
- testing — there's no severity rating, and "Fail" isn't the right framing.
19
- Use the Status options in `RESULTS_TEMPLATE.md` instead: Applied, Partial,
20
- Should adopt, or Not applicable.
11
+ Use each stable practice ID in a generated engineering worksheet. Record concrete evidence and choose Applied, Partial, Recommended, Unverified, or N/A. Preserve each dated worksheet as review history.
21
12
 
22
13
  ## Wrap-up
23
14
 
24
15
  - This isn't a gate — nothing here blocks a release the way
25
- Critical/High security items in `../../security-gate/phases/` do.
16
+ Critical/High security items in security phase reviews do.
26
17
  - Total concepts in this topic: 10
27
18
  - Useful as an onboarding read-through, a periodic self-audit, or context
28
19
  to hand an agent before it reviews related code.
29
20
 
30
21
  ---
31
22
 
32
- # Concepts — Topic 9: Message Queue Concepts
23
+ ## Concepts — Topic 9: Message Queue Concepts
33
24
 
34
- Reference list only — no status column. Use `RESULTS_TEMPLATE.md` in
35
- this same folder to actually record a pass.
25
+ Use the applicable practices below to populate the worksheet findings table.
36
26
 
37
- | # | Concept | Why it matters | Self-check |
27
+ | Practice ID | Practice | Why it matters | Evidence question |
38
28
  |---|---|---|---|
39
- | 1 | Producer / consumer | The basic decoupling pattern — getting the boundary wrong (e.g. producer waiting on consumer) defeats the purpose of using a queue at all. | Are producers and consumers actually decoupled, with the producer not blocked waiting on consumer processing? |
40
- | 2 | Topic + partition | Partitioning enables parallel consumption, but choosing the wrong partition key can cause hot partitions or lost ordering guarantees. | Is the partition key chosen deliberately (e.g. by entity ID) rather than defaulted, and does it avoid hot-partitioning? |
41
- | 3 | Consumer group | Lets multiple consumer instances share the work of one topic without processing the same message redundantly (within the group). | If there are multiple consumer instances, are they correctly grouped so work is distributed, not duplicated? |
42
- | 4 | At-least-once delivery | The common default guarantee — means consumers WILL sometimes see the same message twice and must handle that. | Does every consumer assume at-least-once delivery and handle duplicate messages correctly? |
43
- | 5 | Dead letter queue | Without one, a message that repeatedly fails processing either blocks the queue or is silently dropped. | Do failed messages, after retry limits, go to a dead letter queue instead of blocking or vanishing? |
44
- | 6 | Backpressure | If consumers can't keep up, the system needs a defined behavior (slow producers, buffer, drop) rather than unbounded queue growth. | Is there a defined response when consumer lag grows unbounded, rather than assuming it will always catch up? |
45
- | 7 | Fan-out | Delivering one message to multiple independent consumers (e.g. via separate subscriptions) needs the right topology — a single queue with one consumer group won't do it. | If multiple independent services need the same message, is the topology (e.g. separate subscriptions/topics) actually set up for fan-out? |
46
- | 8 | Message ordering | Most queues only guarantee order within a partition/shard, not globally — code that assumes global order will break. | Does any consumer logic assume strict global ordering, and if so, does the actual queue setup guarantee that? |
47
- | 9 | Idempotent consumer | Given at-least-once delivery, consumers must be able to safely process the same message twice without double-effecting (e.g. double-charging). | Is consumer processing logic idempotent (e.g. keyed on a unique message/operation ID) so redelivery is safe? |
48
- | 10 | Offset commit | Committing the offset too early risks losing a message if processing then fails; committing too late risks reprocessing more than necessary. | Is the offset committed only after successful processing (not before), matching the delivery guarantee the system actually needs? |
29
+ | ENG-09-01 | Producer / consumer | The basic decoupling pattern — getting the boundary wrong (e.g. producer waiting on consumer) defeats the purpose of using a queue at all. | Are producers and consumers actually decoupled, with the producer not blocked waiting on consumer processing? |
30
+ | ENG-09-02 | Topic + partition | Partitioning enables parallel consumption, but choosing the wrong partition key can cause hot partitions or lost ordering guarantees. | Is the partition key chosen deliberately (e.g. by entity ID) rather than defaulted, and does it avoid hot-partitioning? |
31
+ | ENG-09-03 | Consumer group | Lets multiple consumer instances share the work of one topic without processing the same message redundantly (within the group). | If there are multiple consumer instances, are they correctly grouped so work is distributed, not duplicated? |
32
+ | ENG-09-04 | At-least-once delivery | The common default guarantee — means consumers WILL sometimes see the same message twice and must handle that. | Does every consumer assume at-least-once delivery and handle duplicate messages correctly? |
33
+ | ENG-09-05 | Dead letter queue | Without one, a message that repeatedly fails processing either blocks the queue or is silently dropped. | Do failed messages, after retry limits, go to a dead letter queue instead of blocking or vanishing? |
34
+ | ENG-09-06 | Backpressure | If consumers can't keep up, the system needs a defined behavior (slow producers, buffer, drop) rather than unbounded queue growth. | Is there a defined response when consumer lag grows unbounded, rather than assuming it will always catch up? |
35
+ | ENG-09-07 | Fan-out | Delivering one message to multiple independent consumers (e.g. via separate subscriptions) needs the right topology — a single queue with one consumer group won't do it. | If multiple independent services need the same message, is the topology (e.g. separate subscriptions/topics) actually set up for fan-out? |
36
+ | ENG-09-08 | Message ordering | Most queues only guarantee order within a partition/shard, not globally — code that assumes global order will break. | Does any consumer logic assume strict global ordering, and if so, does the actual queue setup guarantee that? |
37
+ | ENG-09-09 | Idempotent consumer | Given at-least-once delivery, consumers must be able to safely process the same message twice without double-effecting (e.g. double-charging). | Is consumer processing logic idempotent (e.g. keyed on a unique message/operation ID) so redelivery is safe? |
38
+ | ENG-09-10 | Offset commit | Committing the offset too early risks losing a message if processing then fails; committing too late risks reprocessing more than necessary. | Is the offset committed only after successful processing (not before), matching the delivery guarantee the system actually needs? |
@@ -0,0 +1,14 @@
1
+ # API Design and Compatibility
2
+
3
+ Use this review before introducing or changing a public, partner, or service-to-service API.
4
+
5
+ | Practice ID | Practice | Why it matters | Evidence question |
6
+ |---|---|---|---|
7
+ | ENG-10-01 | Explicit contracts | Machine-readable contracts reduce client/server drift. | Is the current request, response, and error contract versioned with the implementation? |
8
+ | ENG-10-02 | Backward compatibility | Uncoordinated breaking changes create outages. | Are removals and semantic changes gated by a documented migration window? |
9
+ | ENG-10-03 | Consistent errors | Predictable errors make clients safer and observable. | Do errors use stable codes, safe messages, and correlation identifiers? |
10
+ | ENG-10-04 | Idempotency | Retries must not duplicate important side effects. | Do retryable writes use an idempotency strategy with a defined lifetime? |
11
+ | ENG-10-05 | Pagination and limits | Unbounded reads create latency and cost failures. | Are page size, ordering, cursors, and maximum limits explicit? |
12
+ | ENG-10-06 | Deprecation telemetry | Owners need evidence before retiring a version. | Can maintainers identify remaining callers of deprecated behavior? |
13
+ | ENG-10-07 | Contract tests | Integration assumptions should fail before deployment. | Do provider and consumer tests cover critical compatibility promises? |
14
+ | ENG-10-08 | Safe defaults | Optional fields and defaults affect long-lived clients. | Can old clients ignore additions without changing behavior unexpectedly? |
@@ -0,0 +1,14 @@
1
+ # Reliability, SLOs, and Error Budgets
2
+
3
+ Use this review when defining service reliability or deciding whether delivery speed is outrunning operational health.
4
+
5
+ | Practice ID | Practice | Why it matters | Evidence question |
6
+ |---|---|---|---|
7
+ | ENG-11-01 | User-centered SLI | Reliability should represent user experience. | Does each indicator measure a user-visible success or latency outcome? |
8
+ | ENG-11-02 | Achievable SLO | A target should guide decisions, not promise perfection. | Is the objective based on business need and measured historical behavior? |
9
+ | ENG-11-03 | Error budget | Teams need a shared release-versus-reliability signal. | Is remaining error budget visible and tied to an agreed response? |
10
+ | ENG-11-04 | Multi-window alerts | Fast and slow burns require different detection windows. | Do alerts identify material budget consumption without paging on noise? |
11
+ | ENG-11-05 | Dependency objectives | Upstream limits constrain the service objective. | Are critical dependency availability and latency assumptions recorded? |
12
+ | ENG-11-06 | Graceful degradation | Partial service can preserve essential workflows. | Are noncritical features shed safely when dependencies or capacity fail? |
13
+ | ENG-11-07 | Recovery objectives | Recovery needs measurable targets. | Are RTO and RPO defined and tested for important data and workflows? |
14
+ | ENG-11-08 | Reliability review | Objectives must evolve with product behavior. | Are SLOs reviewed after incidents and material architecture changes? |
@@ -0,0 +1,14 @@
1
+ # Observability and Telemetry
2
+
3
+ Use this review when adding telemetry or when production behavior cannot be explained quickly.
4
+
5
+ | Practice ID | Practice | Why it matters | Evidence question |
6
+ |---|---|---|---|
7
+ | ENG-12-01 | Structured logs | Searchable fields beat unstructured narratives. | Do logs contain stable event names, severity, and correlation context? |
8
+ | ENG-12-02 | Useful metrics | Metrics should describe demand, errors, latency, and saturation. | Can dashboards explain whether users and resources are healthy? |
9
+ | ENG-12-03 | Distributed traces | Cross-service latency needs causal context. | Are trace identifiers propagated across supported boundaries? |
10
+ | ENG-12-04 | Cardinality control | Unbounded labels can disable or overprice monitoring. | Are user-generated and high-cardinality values excluded from metric labels? |
11
+ | ENG-12-05 | Sensitive-data controls | Telemetry is another data store. | Are secrets and personal data redacted before collection? |
12
+ | ENG-12-06 | Actionable alerts | Alerts should lead to a known response. | Does every page identify impact, owner, runbook, and escalation path? |
13
+ | ENG-12-07 | Retention and sampling | Cost controls must preserve investigation value. | Are retention and sampling choices documented by telemetry class? |
14
+ | ENG-12-08 | Instrumentation tests | Broken telemetry can hide production failures. | Do tests verify critical events and trace propagation without asserting noise? |
@@ -0,0 +1,14 @@
1
+ # Deployment and Change Safety
2
+
3
+ Use this review for release pipelines, migrations, feature rollouts, and rollback design.
4
+
5
+ | Practice ID | Practice | Why it matters | Evidence question |
6
+ |---|---|---|---|
7
+ | ENG-13-01 | Small reversible changes | Small batches limit diagnosis and rollback cost. | Can the change be disabled or reverted without unrelated work? |
8
+ | ENG-13-02 | Progressive delivery | Early signals reduce blast radius. | Is rollout staged by environment, cohort, region, or percentage? |
9
+ | ENG-13-03 | Automated verification | Human-only checks miss repeatable regressions. | Are build, test, policy, and artifact checks required before promotion? |
10
+ | ENG-13-04 | Migration compatibility | Code and data often deploy at different times. | Do schema changes support old and new application versions during rollout? |
11
+ | ENG-13-05 | Health-based rollback | Rollback decisions should use defined signals. | Are stop and rollback thresholds tied to service and business health? |
12
+ | ENG-13-06 | Artifact promotion | Rebuilding can change what was tested. | Is the verified immutable artifact promoted between environments? |
13
+ | ENG-13-07 | Change traceability | Operators need to connect behavior to releases. | Can a running version be traced to source, build, approvals, and configuration? |
14
+ | ENG-13-08 | Post-deployment observation | Success requires evidence after deployment. | Is there an owned observation window with a clear completion decision? |
@@ -0,0 +1,14 @@
1
+ # Capacity, Concurrency, and Resource Management
2
+
3
+ Use this review for load-sensitive services, shared resources, and systems with concurrent state changes.
4
+
5
+ | Practice ID | Practice | Why it matters | Evidence question |
6
+ |---|---|---|---|
7
+ | ENG-14-01 | Capacity model | Demand and limits should be explicit. | Are peak throughput, latency, storage, and headroom assumptions measured? |
8
+ | ENG-14-02 | Bounded concurrency | Unlimited work can exhaust every dependency. | Are worker, connection, and request counts bounded at each layer? |
9
+ | ENG-14-03 | Backpressure | Overload should be controlled rather than amplified. | Does the system reject, queue, or slow work using documented thresholds? |
10
+ | ENG-14-04 | Timeouts and cancellation | Abandoned work should release resources. | Are timeouts budgeted end-to-end and cancellation signals propagated? |
11
+ | ENG-14-05 | Contention testing | Shared locks and hot keys appear under load. | Do tests exercise realistic contention and skew rather than uniform traffic only? |
12
+ | ENG-14-06 | Autoscaling signals | Scaling on the wrong signal can worsen overload. | Do scaling signals lead demand and respect dependency capacity? |
13
+ | ENG-14-07 | Resource cleanup | Leaks turn normal operation into delayed failure. | Are connections, files, memory, and temporary objects bounded and observable? |
14
+ | ENG-14-08 | Degradation plan | Capacity exhaustion must preserve critical work. | Are admission control and priority rules defined for overload conditions? |
@@ -1,144 +1,24 @@
1
- # Engineering Reference
2
-
3
- A companion to `../security-gate/SECURITY_CHECKLIST.md`. That file is pass/fail **security
4
- tests**; this file is **"what should I know"** — quick-recall concept lists
5
- for performance, infra, and engineering practice. Nothing here has a
6
- severity rating or a test step; use it for onboarding, self-study, or as
7
- context for an agent before it reviews related code.
8
-
9
- ## Table of contents
10
-
11
- - [A. Speeding Up a Slow Query](#a-speeding-up-a-slow-query)
12
- - [B. Networking Concepts Every Dev Should Know](#b-networking-concepts-every-dev-should-know)
13
- - [C. Rate Limiting Algorithms](#c-rate-limiting-algorithms)
14
- - [D. Debugging Production Issues](#d-debugging-production-issues)
15
- - [E. Code Review Practices](#e-code-review-practices)
16
- - [F. Data Modeling Concepts](#f-data-modeling-concepts)
17
- - [G. Cloud Cost-Saving Techniques](#g-cloud-cost-saving-techniques)
18
- - [H. Types of Testing](#h-types-of-testing)
19
- - [I. Message Queue Concepts](#i-message-queue-concepts)
20
-
21
- > **Note:** the original "Web security vulnerabilities" list is not
22
- > duplicated here — it's already covered item-for-item in
23
- > `../security-gate/SECURITY_CHECKLIST.md` → `02_Web_Vulnerabilities`. Rate limiting
24
- > algorithms (below) are a companion to, not a replacement for,
25
- > `01_API_Security/01_rate_limiting.md`.
26
-
27
- ---
28
-
29
- ## A. Speeding Up a Slow Query
30
-
31
- 1. Start with the explain plan
32
- 2. Add the missing index
33
- 3. Stop selecting *
34
- 4. Fix N+1 queries
35
- 5. Use a covering index
36
- 6. Cache repeated queries
37
- 7. Prune partitions
38
- 8. Denormalize for reads
39
- 9. Batch your writes
40
- 10. Update table statistics
41
-
42
- ## B. Networking Concepts Every Dev Should Know
43
-
44
- 1. DNS resolution
45
- 2. TCP handshake
46
- 3. TLS handshake
47
- 4. NAT
48
- 5. Load balancer types
49
- 6. CDN edge caching
50
- 7. Packet loss & retransmit
51
- 8. MTU / fragmentation
52
- 9. Keep-alive
53
- 10. BGP routing
54
-
55
- ## C. Rate Limiting Algorithms
56
-
57
- 1. Fixed window
58
- 2. Sliding window log
59
- 3. Sliding window counter
60
- 4. Token bucket
61
- 5. Leaky bucket
62
- 6. Distributed rate limiting
63
- 7. Client-side throttling
64
- 8. Adaptive rate limiting
65
- 9. Concurrency limiting
66
- 10. Back pressure
67
-
68
- ## D. Debugging Production Issues
69
-
70
- 1. Correlation IDs
71
- 2. Distributed tracing
72
- 3. Feature flag rollback
73
- 4. Canary analysis
74
- 5. Replay traffic
75
- 6. Heap dumps
76
- 7. Chaos testing
77
- 8. Synthetic monitoring
78
- 9. Error budgets
79
- 10. Postmortems
80
-
81
- ## E. Code Review Practices
82
-
83
- 1. Small PRs
84
- 2. Clear description
85
- 3. Constructive feedback
86
- 4. Nitpick vs. blocker
87
- 5. Fast turnaround
88
- 6. Automated checks first
89
- 7. Context before code
90
- 8. Approve vs. request changes
91
- 9. Self-review first
92
- 10. Learning from reviews
93
-
94
- ## F. Data Modeling Concepts
95
-
96
- 1. Primary vs. foreign keys
97
- 2. One-to-many
98
- 3. Many-to-many
99
- 4. Composite keys
100
- 5. Soft deletes
101
- 6. Polymorphic associations
102
- 7. Enum vs. lookup table
103
- 8. Audit columns
104
- 9. Schema migrations
105
- 10. Precision & data types
106
-
107
- ## G. Cloud Cost-Saving Techniques
108
-
109
- 1. Spot instances
110
- 2. Autoscaling
111
- 3. Reserved capacity
112
- 4. Right-sizing
113
- 5. Storage tiering
114
- 6. CDN offloading
115
- 7. Serverless for spiky loads
116
- 8. Idle resource cleanup
117
- 9. Compression
118
- 10. Multi-region arbitrage
119
-
120
- ## H. Types of Testing
121
-
122
- 1. Unit test
123
- 2. Integration test
124
- 3. End-to-end test
125
- 4. Snapshot test
126
- 5. Contract test
127
- 6. Load test
128
- 7. Chaos test
129
- 8. Mutation test
130
- 9. Smoke test
131
- 10. Regression test
132
-
133
- ## I. Message Queue Concepts
134
-
135
- 1. Producer / consumer
136
- 2. Topic + partition
137
- 3. Consumer group
138
- 4. At-least-once delivery
139
- 5. Dead letter queue
140
- 6. Backpressure
141
- 7. Fan-out
142
- 8. Message ordering
143
- 9. Idempotent consumer
144
- 10. Offset commit
1
+ # Engineering Quality Reference
2
+
3
+ This index routes reviewers to focused, evidence-based practice reviews. Engineering findings are advisory unless they reveal a separate correctness, reliability, or security defect.
4
+
5
+ Use `Applied`, `Partial`, `Recommended`, `Unverified`, or `N/A`. For each recommendation, record observable evidence, impact, an owner, and a verification step.
6
+
7
+ ## Topic index
8
+
9
+ 1. Query performance and slow-query diagnosis
10
+ 2. Networking fundamentals
11
+ 3. Rate-limiting algorithms
12
+ 4. Production debugging
13
+ 5. Code-review practices
14
+ 6. Data modeling
15
+ 7. Cloud cost saving
16
+ 8. Testing types and strategy
17
+ 9. Message queues
18
+ 10. API design and compatibility
19
+ 11. Reliability, SLOs, and error budgets
20
+ 12. Observability and telemetry
21
+ 13. Deployment and change safety
22
+ 14. Capacity, concurrency, and resource management
23
+
24
+ Run `agent-docs list engineering`, then create only the needed worksheet with `agent-docs engineering worksheet <topic>`.
@@ -1,21 +1,14 @@
1
1
  # Design & Architecture
2
2
 
3
- # Phase 1: Design & Architecture (Pre-Code)
3
+ ## Phase 1: Design & Architecture (Pre-Code)
4
4
 
5
5
  **When to run this:** Before writing code — during system/feature design, RFCs, or architecture review.
6
6
 
7
7
  **Goal of this pass:** Catch design-level flaws (missing trust boundaries, over-broad data collection, no threat model) that are cheap to fix now and expensive to fix after code exists.
8
8
 
9
- ## Files in this folder
9
+ ## How to use this reference
10
10
 
11
- | File | Purpose |
12
- |---|---|
13
- | `CHECKLIST.md` | What to check — the reference list of items, severity, and example test steps for this phase. Doesn't get filled in; copy it or use `RESULTS_TEMPLATE.md` to record a real pass. |
14
- | `RESULTS_TEMPLATE.md` | Fillable version of the same checklist, with Result/Notes columns and a sign-off block. Copy this file per test pass (e.g. `RESULTS_2026-08-29.md`) so history isn't overwritten. |
15
-
16
- Full background, "why it matters," and references for every item live in
17
- `../../SECURITY_CHECKLIST.md` (search for the source file path shown in the
18
- checklist below).
11
+ Use each stable control ID in a generated security worksheet. Record observed evidence before assigning a status; leave a control Unverified when evidence is unavailable. Preserve each dated worksheet as audit history.
19
12
 
20
13
  ## Sign-off criteria
21
14
 
@@ -25,15 +18,14 @@ checklist below).
25
18
 
26
19
  ---
27
20
 
28
- # What to Check — Phase 1: Design & Architecture (Pre-Code)
21
+ ## What to Check — Phase 1: Design & Architecture (Pre-Code)
29
22
 
30
- Reference checklist only — no result columns. Use `RESULTS_TEMPLATE.md` in
31
- this same folder to actually record a test pass.
23
+ Use the applicable controls below to populate the worksheet findings table.
32
24
 
33
- | # | Source file | Item | Severity | Example test |
25
+ | Control ID | Source | Control | Severity | Evidence question |
34
26
  |---|---|---|---|---|
35
- | 1 | `15_Architecture_Compliance/01_privacy_by_design.md` | Privacy by Design | Medium | Review the most recent feature's design doc and confirm data collection was scoped to only what the feature actually needs. |
36
- | 2 | `15_Architecture_Compliance/02_threat_modeling.md` | Threat Modeling | High | Pull the data-flow diagram for the highest-risk service and confirm a STRIDE (or equivalent) pass was actually performed and mitigations tracked to closure. |
37
- | 3 | `15_Architecture_Compliance/04_defense_in_depth.md` | Defense in Depth | Medium | Pick one critical asset and map every independent control protecting it; confirm there isn't a single point whose failure alone exposes it. |
38
- | 4 | `15_Architecture_Compliance/06_zero_trust_network.md` | Zero Trust Network Architecture | High | From inside the internal network, attempt to reach a service without presenting valid per-request authentication and confirm it's still denied. |
39
- | 5 | `15_Architecture_Compliance/08_secure_sdlc.md` | Secure SDLC (added) | Medium | Confirm the most recent feature had security requirements defined at design time, not bolted on after code review. |
27
+ | SEC-01-01 | `15_Architecture_Compliance/01_privacy_by_design.md` | Privacy by Design | Medium | Review the most recent feature's design doc and confirm data collection was scoped to only what the feature actually needs. |
28
+ | SEC-01-02 | `15_Architecture_Compliance/02_threat_modeling.md` | Threat Modeling | High | Pull the data-flow diagram for the highest-risk service and confirm a STRIDE (or equivalent) pass was actually performed and mitigations tracked to closure. |
29
+ | SEC-01-03 | `15_Architecture_Compliance/04_defense_in_depth.md` | Defense in Depth | Medium | Pick one critical asset and map every independent control protecting it; confirm there isn't a single point whose failure alone exposes it. |
30
+ | SEC-01-04 | `15_Architecture_Compliance/06_zero_trust_network.md` | Zero Trust Network Architecture | High | From inside the internal network, attempt to reach a service without presenting valid per-request authentication and confirm it's still denied. |
31
+ | SEC-01-05 | `15_Architecture_Compliance/08_secure_sdlc.md` | Secure SDLC (added) | Medium | Confirm the most recent feature had security requirements defined at design time, not bolted on after code review. |
@@ -1,21 +1,14 @@
1
1
  # Local Development
2
2
 
3
- # Phase 2: Local Development
3
+ ## Phase 2: Local Development
4
4
 
5
5
  **When to run this:** During day-to-day coding, before opening a pull request.
6
6
 
7
7
  **Goal of this pass:** Prevent secrets, unpinned/unvetted dependencies, and known-bad coding patterns from ever reaching a shared branch.
8
8
 
9
- ## Files in this folder
9
+ ## How to use this reference
10
10
 
11
- | File | Purpose |
12
- |---|---|
13
- | `CHECKLIST.md` | What to check — the reference list of items, severity, and example test steps for this phase. Doesn't get filled in; copy it or use `RESULTS_TEMPLATE.md` to record a real pass. |
14
- | `RESULTS_TEMPLATE.md` | Fillable version of the same checklist, with Result/Notes columns and a sign-off block. Copy this file per test pass (e.g. `RESULTS_2026-08-29.md`) so history isn't overwritten. |
15
-
16
- Full background, "why it matters," and references for every item live in
17
- `../../SECURITY_CHECKLIST.md` (search for the source file path shown in the
18
- checklist below).
11
+ Use each stable control ID in a generated security worksheet. Record observed evidence before assigning a status; leave a control Unverified when evidence is unavailable. Preserve each dated worksheet as audit history.
19
12
 
20
13
  ## Sign-off criteria
21
14
 
@@ -25,17 +18,16 @@ checklist below).
25
18
 
26
19
  ---
27
20
 
28
- # What to Check — Phase 2: Local Development
21
+ ## What to Check — Phase 2: Local Development
29
22
 
30
- Reference checklist only — no result columns. Use `RESULTS_TEMPLATE.md` in
31
- this same folder to actually record a test pass.
23
+ Use the applicable controls below to populate the worksheet findings table.
32
24
 
33
- | # | Source file | Item | Severity | Example test |
25
+ | Control ID | Source | Control | Severity | Evidence question |
34
26
  |---|---|---|---|---|
35
- | 1 | `08_Release_Engineering_Version_Control/01_secure_coding_guidelines.md` | Secure Coding Guidelines | Low | Confirm the team's secure-coding cheat sheet is linked from the PR template/onboarding docs, not just filed away unused. |
36
- | 2 | `08_Release_Engineering_Version_Control/02_semantic_versioning.md` | Semantic Versioning | Low | Check the last 3 releases and confirm any breaking change actually bumped the MAJOR version. |
37
- | 3 | `10_Dependency_Supply_Chain/01_backend_dependency_scanning.md` | Dependency & SCA Scanning | High | Run the SCA scanner manually against the current backend dependency tree and confirm it matches what CI reports, with no critical CVEs unpatched past SLA. |
38
- | 4 | `10_Dependency_Supply_Chain/02_dependency_version_pinning.md` | Dependency Version Pinning | Medium | Delete the lockfile locally and reinstall; confirm CI fails the build if the regenerated lockfile differs from the committed one. |
39
- | 5 | `10_Dependency_Supply_Chain/03_frontend_dependency_scanning.md` | Frontend Dependency Scanning | Medium | Run npm audit / yarn audit and manually review any newly added package for typosquatting risk or suspicious post-install scripts. |
40
- | 6 | `06_Data_Protection_Secrets/06_secrets_management.md` | Secrets Management (added) | Critical | Run a secret-scanning tool (e.g. gitleaks/truffleHog) across the full git history, not just HEAD, and confirm zero committed credentials. |
41
- | 7 | `09_Release_Pipeline_Stages/01_local_dev_testing.md` | Stage 1: Local / Developer Testing | Low | Confirm a fresh local dev environment setup never requires copying real production credentials or data. |
27
+ | SEC-02-01 | `08_Release_Engineering_Version_Control/01_secure_coding_guidelines.md` | Secure Coding Guidelines | Low | Confirm the team's secure-coding cheat sheet is linked from the PR template/onboarding docs, not just filed away unused. |
28
+ | SEC-02-02 | `08_Release_Engineering_Version_Control/02_semantic_versioning.md` | Semantic Versioning | Low | Check the last 3 releases and confirm any breaking change actually bumped the MAJOR version. |
29
+ | SEC-02-03 | `10_Dependency_Supply_Chain/01_backend_dependency_scanning.md` | Dependency & SCA Scanning | High | Run the SCA scanner manually against the current backend dependency tree and confirm it matches what CI reports, with no critical CVEs unpatched past SLA. |
30
+ | SEC-02-04 | `10_Dependency_Supply_Chain/02_dependency_version_pinning.md` | Dependency Version Pinning | Medium | Delete the lockfile locally and reinstall; confirm CI fails the build if the regenerated lockfile differs from the committed one. |
31
+ | SEC-02-05 | `10_Dependency_Supply_Chain/03_frontend_dependency_scanning.md` | Frontend Dependency Scanning | Medium | Run npm audit / yarn audit and manually review any newly added package for typosquatting risk or suspicious post-install scripts. |
32
+ | SEC-02-06 | `06_Data_Protection_Secrets/06_secrets_management.md` | Secrets Management (added) | Critical | Run a secret-scanning tool (e.g. gitleaks/truffleHog) across the full git history, not just HEAD, and confirm zero committed credentials. |
33
+ | SEC-02-07 | `09_Release_Pipeline_Stages/01_local_dev_testing.md` | Stage 1: Local / Developer Testing | Low | Confirm a fresh local dev environment setup never requires copying real production credentials or data. |
@@ -1,21 +1,14 @@
1
1
  # Database & Backend
2
2
 
3
- # Phase 3: Database & Backend Layer
3
+ ## Phase 3: Database & Backend Layer
4
4
 
5
5
  **When to run this:** While building/reviewing server-side business logic and the data access layer.
6
6
 
7
7
  **Goal of this pass:** Confirm the backend enforces authorization and business rules itself, and that the data layer doesn't quietly reintroduce injection or over-fetching risk.
8
8
 
9
- ## Files in this folder
9
+ ## How to use this reference
10
10
 
11
- | File | Purpose |
12
- |---|---|
13
- | `CHECKLIST.md` | What to check — the reference list of items, severity, and example test steps for this phase. Doesn't get filled in; copy it or use `RESULTS_TEMPLATE.md` to record a real pass. |
14
- | `RESULTS_TEMPLATE.md` | Fillable version of the same checklist, with Result/Notes columns and a sign-off block. Copy this file per test pass (e.g. `RESULTS_2026-08-29.md`) so history isn't overwritten. |
15
-
16
- Full background, "why it matters," and references for every item live in
17
- `../../SECURITY_CHECKLIST.md` (search for the source file path shown in the
18
- checklist below).
11
+ Use each stable control ID in a generated security worksheet. Record observed evidence before assigning a status; leave a control Unverified when evidence is unavailable. Preserve each dated worksheet as audit history.
19
12
 
20
13
  ## Sign-off criteria
21
14
 
@@ -25,22 +18,21 @@ checklist below).
25
18
 
26
19
  ---
27
20
 
28
- # What to Check — Phase 3: Database & Backend Layer
21
+ ## What to Check — Phase 3: Database & Backend Layer
29
22
 
30
- Reference checklist only — no result columns. Use `RESULTS_TEMPLATE.md` in
31
- this same folder to actually record a test pass.
23
+ Use the applicable controls below to populate the worksheet findings table.
32
24
 
33
- | # | Source file | Item | Severity | Example test |
25
+ | Control ID | Source | Control | Severity | Evidence question |
34
26
  |---|---|---|---|---|
35
- | 1 | `05_Backend_Handling/01_business_logic_validation.md` | Business Logic Validation | High | Attempt to call the 'ship order' step of a checkout flow while skipping the 'payment' step and confirm the server rejects the out-of-order transition. |
36
- | 2 | `05_Backend_Handling/02_file_upload_handling.md` | File Upload Handling | Critical | Upload a file with a .jpg extension but executable/script magic bytes inside, and confirm the server validates content type by inspecting bytes, not just the extension. |
37
- | 3 | `05_Backend_Handling/03_orm_database_security.md` | ORM & Database Layer Security | High | Search the codebase for any raw-query escape hatches in the ORM and confirm every one uses parameter binding, not string concatenation. |
38
- | 4 | `05_Backend_Handling/04_background_job_queue_security.md` | Background Job & Queue Security | Medium | Submit a queued job payload with malformed/malicious data directly (bypassing the API layer) and confirm the worker validates it the same way the API would. |
39
- | 5 | `05_Backend_Handling/05_error_handling_stack_traces.md` | Error Handling & Stack Trace Exposure | Medium | Send a malformed request (bad JSON, wrong content-type) to a production endpoint and confirm the response is a generic error, not a stack trace or file path. |
40
- | 6 | `03_Access_Control_Session_Auth/02_backend_access_control.md` | Backend Access Control | Critical | Using User A's valid session, request User B's resource ID directly and confirm a 403, not the data. |
41
- | 7 | `03_Access_Control_Session_Auth/05_rbac_abac.md` | RBAC / ABAC Models (added) | Medium | Pick a long-lived test account and diff its current granted permissions against what its role should have today, looking for accumulated excess access. |
42
- | 8 | `06_Data_Protection_Secrets/01_encryption_at_rest.md` | Encryption at Rest | High | Confirm via cloud console/CLI that the database volume, backups, and object storage all show encryption-at-rest enabled, not just the primary disk. |
43
- | 9 | `06_Data_Protection_Secrets/02_encryption_in_transit.md` | Encryption in Transit | High | Attempt to connect to the database and any internal service-to-service endpoint over plaintext and confirm the connection is refused, TLS-only. |
44
- | 10 | `06_Data_Protection_Secrets/03_pii_data_classification.md` | PII & Data Classification | Medium | Pull a sample data export/report and check whether it exposes any field classified as higher-sensitivity than the export's intended audience. |
45
- | 11 | `06_Data_Protection_Secrets/04_key_management.md` | Key Management (KMS) | Critical | Confirm encryption keys live in a KMS/HSM (not a config file or env var) and walk through the documented key-revocation procedure end to end. |
46
- | 12 | `06_Data_Protection_Secrets/05_tls_certificate_management.md` | TLS Certificate Management | High | Run an SSL/TLS scan (e.g. against the Mozilla Observatory or testssl.sh) on each public endpoint and confirm TLS 1.2+ only, no weak ciphers, valid expiry. |
27
+ | SEC-03-01 | `05_Backend_Handling/01_business_logic_validation.md` | Business Logic Validation | High | Attempt to call the 'ship order' step of a checkout flow while skipping the 'payment' step and confirm the server rejects the out-of-order transition. |
28
+ | SEC-03-02 | `05_Backend_Handling/02_file_upload_handling.md` | File Upload Handling | Critical | Upload a file with a .jpg extension but executable/script magic bytes inside, and confirm the server validates content type by inspecting bytes, not just the extension. |
29
+ | SEC-03-03 | `05_Backend_Handling/03_orm_database_security.md` | ORM & Database Layer Security | High | Search the codebase for any raw-query escape hatches in the ORM and confirm every one uses parameter binding, not string concatenation. |
30
+ | SEC-03-04 | `05_Backend_Handling/04_background_job_queue_security.md` | Background Job & Queue Security | Medium | Submit a queued job payload with malformed/malicious data directly (bypassing the API layer) and confirm the worker validates it the same way the API would. |
31
+ | SEC-03-05 | `05_Backend_Handling/05_error_handling_stack_traces.md` | Error Handling & Stack Trace Exposure | Medium | Send a malformed request (bad JSON, wrong content-type) to a production endpoint and confirm the response is a generic error, not a stack trace or file path. |
32
+ | SEC-03-06 | `03_Access_Control_Session_Auth/02_backend_access_control.md` | Backend Access Control | Critical | Using User A's valid session, request User B's resource ID directly and confirm a 403, not the data. |
33
+ | SEC-03-07 | `03_Access_Control_Session_Auth/05_rbac_abac.md` | RBAC / ABAC Models (added) | Medium | Pick a long-lived test account and diff its current granted permissions against what its role should have today, looking for accumulated excess access. |
34
+ | SEC-03-08 | `06_Data_Protection_Secrets/01_encryption_at_rest.md` | Encryption at Rest | High | Confirm via cloud console/CLI that the database volume, backups, and object storage all show encryption-at-rest enabled, not just the primary disk. |
35
+ | SEC-03-09 | `06_Data_Protection_Secrets/02_encryption_in_transit.md` | Encryption in Transit | High | Attempt to connect to the database and any internal service-to-service endpoint over plaintext and confirm the connection is refused, TLS-only. |
36
+ | SEC-03-10 | `06_Data_Protection_Secrets/03_pii_data_classification.md` | PII & Data Classification | Medium | Pull a sample data export/report and check whether it exposes any field classified as higher-sensitivity than the export's intended audience. |
37
+ | SEC-03-11 | `06_Data_Protection_Secrets/04_key_management.md` | Key Management (KMS) | Critical | Confirm encryption keys live in a KMS/HSM (not a config file or env var) and walk through the documented key-revocation procedure end to end. |
38
+ | SEC-03-12 | `06_Data_Protection_Secrets/05_tls_certificate_management.md` | TLS Certificate Management | High | Run an SSL/TLS scan (e.g. against the Mozilla Observatory or testssl.sh) on each public endpoint and confirm TLS 1.2+ only, no weak ciphers, valid expiry. |
@@ -1,21 +1,14 @@
1
1
  # API Layer
2
2
 
3
- # Phase 4: API Layer
3
+ ## Phase 4: API Layer
4
4
 
5
5
  **When to run this:** While building/reviewing any endpoint that's called over the network — internal or external.
6
6
 
7
7
  **Goal of this pass:** Confirm authentication, authorization, and abuse controls are enforced on every endpoint, not assumed from the caller.
8
8
 
9
- ## Files in this folder
9
+ ## How to use this reference
10
10
 
11
- | File | Purpose |
12
- |---|---|
13
- | `CHECKLIST.md` | What to check — the reference list of items, severity, and example test steps for this phase. Doesn't get filled in; copy it or use `RESULTS_TEMPLATE.md` to record a real pass. |
14
- | `RESULTS_TEMPLATE.md` | Fillable version of the same checklist, with Result/Notes columns and a sign-off block. Copy this file per test pass (e.g. `RESULTS_2026-08-29.md`) so history isn't overwritten. |
15
-
16
- Full background, "why it matters," and references for every item live in
17
- `../../SECURITY_CHECKLIST.md` (search for the source file path shown in the
18
- checklist below).
11
+ Use each stable control ID in a generated security worksheet. Record observed evidence before assigning a status; leave a control Unverified when evidence is unavailable. Preserve each dated worksheet as audit history.
19
12
 
20
13
  ## Sign-off criteria
21
14
 
@@ -25,27 +18,26 @@ checklist below).
25
18
 
26
19
  ---
27
20
 
28
- # What to Check — Phase 4: API Layer
21
+ ## What to Check — Phase 4: API Layer
29
22
 
30
- Reference checklist only — no result columns. Use `RESULTS_TEMPLATE.md` in
31
- this same folder to actually record a test pass.
23
+ Use the applicable controls below to populate the worksheet findings table.
32
24
 
33
- | # | Source file | Item | Severity | Example test |
25
+ | Control ID | Source | Control | Severity | Evidence question |
34
26
  |---|---|---|---|---|
35
- | 1 | `01_API_Security/01_rate_limiting.md` | Rate Limiting | High | Fire 200 requests/sec at a login endpoint from one IP and confirm 429s with Retry-After start well before account lockout thresholds are reachable. |
36
- | 2 | `01_API_Security/02_api_keys.md` | API Keys | High | Grep the built client bundle and mobile binary for hardcoded key patterns, then rotate one key and confirm the old value is rejected within minutes. |
37
- | 3 | `01_API_Security/03_oauth2.md` | OAuth 2.0 | Critical | Attempt the authorization flow with a modified redirect_uri (e.g. attacker.com) and confirm the server rejects it rather than redirecting. |
38
- | 4 | `01_API_Security/04_jwt_validation.md` | JWT Validation | Critical | Submit a token with 'alg' changed to 'none' and an empty signature; confirm the API rejects it instead of trusting the claims. |
39
- | 5 | `01_API_Security/05_input_sanitation.md` | Input Sanitation | High | Submit oversized, wrong-type, and boundary values (e.g. negative quantity, 10k-char string) on every field and confirm consistent server-side rejection. |
40
- | 6 | `01_API_Security/06_cors_policy.md` | CORS Policy | High | Send a fetch with Origin: https://evil.com and credentials:'include'; confirm the Access-Control-Allow-Origin response does not reflect evil.com. |
41
- | 7 | `01_API_Security/07_mtls.md` | Mutual TLS (mTLS) | Medium | Present an expired or self-signed client certificate to the mTLS endpoint and confirm the connection is rejected, not silently accepted. |
42
- | 8 | `01_API_Security/08_request_signing.md` | Request Signing | Medium | Replay a previously captured signed request unmodified after its timestamp window; confirm it is rejected as a replay. |
43
- | 9 | `01_API_Security/09_ip_allowlisting.md` | IP Allowlisting | Medium | Send a request from a disallowed IP with a spoofed X-Forwarded-For header set to an allowlisted IP and confirm it is still blocked. |
44
- | 10 | `01_API_Security/10_security_headers.md` | Security Headers (added) | Medium | Run curl -I against each public endpoint and confirm CSP, HSTS, X-Content-Type-Options, and frame-ancestors are all present. |
45
- | 11 | `03_Access_Control_Session_Auth/07_session_management.md` | Session Management (added) | High | Capture the session cookie before and after login and confirm the session ID value actually changes (regenerates) rather than persisting. |
46
- | 12 | `03_Access_Control_Session_Auth/08_mfa.md` | Multi-Factor Authentication (added) | Critical | Attempt the password-reset flow and confirm it cannot be used to fully log in while skipping the MFA step. |
47
- | 13 | `03_Access_Control_Session_Auth/09_session_store_caching.md` | Session Store Security (Redis/Memcached) | High | Attempt to connect directly to the Redis/Memcached session store from outside the app network and confirm authentication is required and it isn't publicly reachable. |
48
- | 14 | `03_Access_Control_Session_Auth/10_remember_me_persistent_login.md` | "Remember Me" & Persistent Login Tokens | High | Use a captured remember-me token once, then reuse the same (now-rotated-out) token value again and confirm it triggers revocation/alerting rather than silent success. |
49
- | 15 | `03_Access_Control_Session_Auth/06_forced_reauth_sensitive_actions.md` | Forced Re-Authentication for Sensitive Actions | High | From an already-logged-in session, attempt to change the account email/password without re-entering credentials and confirm it's blocked. |
50
- | 16 | `03_Access_Control_Session_Auth/03_cache_invalidation_on_auth_change.md` | Cache Invalidation on Auth/Privilege Change | High | Downgrade a test user's role, then immediately retry a privileged action with their still-active session and confirm it's now denied. |
51
- | 17 | `03_Access_Control_Session_Auth/04_device_trust_fingerprinting.md` | Device Trust & Fingerprinting | Medium | Replay a captured device-trust identifier from a different browser/device and confirm it does not skip MFA. |
27
+ | SEC-04-01 | `01_API_Security/01_rate_limiting.md` | Rate Limiting | High | Fire 200 requests/sec at a login endpoint from one IP and confirm 429s with Retry-After start well before account lockout thresholds are reachable. |
28
+ | SEC-04-02 | `01_API_Security/02_api_keys.md` | API Keys | High | Grep the built client bundle and mobile binary for hardcoded key patterns, then rotate one key and confirm the old value is rejected within minutes. |
29
+ | SEC-04-03 | `01_API_Security/03_oauth2.md` | OAuth 2.0 | Critical | Attempt the authorization flow with a modified redirect_uri (e.g. attacker.com) and confirm the server rejects it rather than redirecting. |
30
+ | SEC-04-04 | `01_API_Security/04_jwt_validation.md` | JWT Validation | Critical | Submit a token with 'alg' changed to 'none' and an empty signature; confirm the API rejects it instead of trusting the claims. |
31
+ | SEC-04-05 | `01_API_Security/05_input_sanitation.md` | Input Sanitation | High | Submit oversized, wrong-type, and boundary values (e.g. negative quantity, 10k-char string) on every field and confirm consistent server-side rejection. |
32
+ | SEC-04-06 | `01_API_Security/06_cors_policy.md` | CORS Policy | High | Send a fetch with Origin: https://evil.com and credentials:'include'; confirm the Access-Control-Allow-Origin response does not reflect evil.com. |
33
+ | SEC-04-07 | `01_API_Security/07_mtls.md` | Mutual TLS (mTLS) | Medium | Present an expired or self-signed client certificate to the mTLS endpoint and confirm the connection is rejected, not silently accepted. |
34
+ | SEC-04-08 | `01_API_Security/08_request_signing.md` | Request Signing | Medium | Replay a previously captured signed request unmodified after its timestamp window; confirm it is rejected as a replay. |
35
+ | SEC-04-09 | `01_API_Security/09_ip_allowlisting.md` | IP Allowlisting | Medium | Send a request from a disallowed IP with a spoofed X-Forwarded-For header set to an allowlisted IP and confirm it is still blocked. |
36
+ | SEC-04-10 | `01_API_Security/10_security_headers.md` | Security Headers (added) | Medium | Run curl -I against each public endpoint and confirm CSP, HSTS, X-Content-Type-Options, and frame-ancestors are all present. |
37
+ | SEC-04-11 | `03_Access_Control_Session_Auth/07_session_management.md` | Session Management (added) | High | Capture the session cookie before and after login and confirm the session ID value actually changes (regenerates) rather than persisting. |
38
+ | SEC-04-12 | `03_Access_Control_Session_Auth/08_mfa.md` | Multi-Factor Authentication (added) | Critical | Attempt the password-reset flow and confirm it cannot be used to fully log in while skipping the MFA step. |
39
+ | SEC-04-13 | `03_Access_Control_Session_Auth/09_session_store_caching.md` | Session Store Security (Redis/Memcached) | High | Attempt to connect directly to the Redis/Memcached session store from outside the app network and confirm authentication is required and it isn't publicly reachable. |
40
+ | SEC-04-14 | `03_Access_Control_Session_Auth/10_remember_me_persistent_login.md` | "Remember Me" & Persistent Login Tokens | High | Use a captured remember-me token once, then reuse the same (now-rotated-out) token value again and confirm it triggers revocation/alerting rather than silent success. |
41
+ | SEC-04-15 | `03_Access_Control_Session_Auth/06_forced_reauth_sensitive_actions.md` | Forced Re-Authentication for Sensitive Actions | High | From an already-logged-in session, attempt to change the account email/password without re-entering credentials and confirm it's blocked. |
42
+ | SEC-04-16 | `03_Access_Control_Session_Auth/03_cache_invalidation_on_auth_change.md` | Cache Invalidation on Auth/Privilege Change | High | Downgrade a test user's role, then immediately retry a privileged action with their still-active session and confirm it's now denied. |
43
+ | SEC-04-17 | `03_Access_Control_Session_Auth/04_device_trust_fingerprinting.md` | Device Trust & Fingerprinting | Medium | Replay a captured device-trust identifier from a different browser/device and confirm it does not skip MFA. |