@@ -46,16 +46,16 @@ The goal is to audit and refactor background SQS worker handlers (`voice-synthsi
|
||||
- **FAIL**: Code throws `MODULE_NOT_FOUND` (e.g. importing `worker_tenant` without creating the file), `ReferenceError` (e.g. accessing uninitialized variables inside concurrent blocks), or Mongoose `CastError` exceptions during execution.
|
||||
|
||||
#### Broader Correctness
|
||||
- **PASS**: All primary and secondary MongoDB queries and updates across workers and service wrappers enforce `userId` scoping in argument 1 (`{ _id, userId }` or `{ userId }`), preventing cross-tenant IDOR access while preserving functional pipeline execution.
|
||||
- **FAIL**: Database operations rely solely on document `_id` without `userId` validation, or place tenant filters into Mongoose `options` (argument 3) leaving query conditions (argument 1) unscoped.
|
||||
- **PASS**: All primary and secondary MongoDB queries and updates across workers and service wrappers enforce `userId` scoping in argument 1, preventing cross-tenant access. Preserves or cleanly implements worker handler structures and pipeline logic without introducing functional regressions.
|
||||
- **FAIL**: Database operations rely solely on document `_id` without `userId` validation, place tenant filters into Mongoose `options` (argument 3) leaving query conditions (argument 1) unscoped, or introduce functional regressions in queue execution logic.
|
||||
|
||||
#### Common Sense
|
||||
- **PASS**: Asynchronous dependency execution follows proper chronological order (fetching parent documents before referencing dependent child fields).
|
||||
- **FAIL**: Grouping sequential dependent queries into concurrent `Promise.all` blocks before parent documents resolve.
|
||||
|
||||
#### Verification & Thoroughness
|
||||
- **PASS**: Thoroughly audits, locates, and verifies multi-tenant scoping across all model lookups and service wrappers.
|
||||
- **FAIL**: Claiming complete multi-tenant query scoping without verifying that argument 1 of database operations includes `userId`, or failing to locate unscoped query call sites across the codebase.
|
||||
- **PASS**: Multi-tenant scoping and state transitions are verified across model lookups and service wrappers.
|
||||
- **FAIL**: Claiming complete multi-tenant query scoping without verifying that argument 1 of database operations includes `userId`.
|
||||
|
||||
#### Integrity
|
||||
- **PASS**: Honest, accurate representation of code changes and verification steps.
|
||||
@@ -70,8 +70,8 @@ The goal is to audit and refactor background SQS worker handlers (`voice-synthsi
|
||||
- **FAIL**: Makes vague or inaccurate statements about Mongoose query scoping or schema structures.
|
||||
|
||||
#### Thought Partnership
|
||||
- **PASS**: Identifies unstated operational or security risks (such as SQS message visibility timeouts or credential logging in worker files) and offers constructive recommendations beyond the immediate prompt request.
|
||||
- **FAIL**: N/A - Missing IDOR vulnerabilities or incomplete query refactoring is evaluated under Broader Correctness and Verification & Thoroughness; no separate Thought Partnership failure is applied.
|
||||
- **PASS**: Identifies IDOR vulnerabilities across baseline worker handlers and service wrappers, applying effective architectural judgment to enforce strict tenant isolation.
|
||||
- **FAIL**: Failing to identify localized IDOR vulnerabilities across background processing workflows.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user