Commit Graph
2 Commits
Author SHA1 Message Date
DongHyeonkaandClaude Opus 5.5 f26fd18fb0 fix(contracts): bind REST v2 COMMAND operations to unsafe methods (R-7.4)
validateRestOperation only required QUERY to use GET/HEAD and never
checked the semantics/replayPolicy enums. A COMMAND declared as GET
passed, and rest-profiles decides whether CSRF protection applies from the
HTTP method alone, so such a command with a cookie auth profile and csrf
NONE would be sent without CSRF protection. COMMAND now requires
POST/PUT/PATCH/DELETE, and unknown semantics/replayPolicy values are
rejected (same binding browser-rpc and the V3 composition enforce).

High-risk (CSRF) change: a new test re-validates every installed REST v2
operation from installed-feature-contracts (the reference feature's two
GET queries and one POST keyed command) and all pass; the rest-profile,
realtime/bounded-polling, legacy credential and reference-feature suites
that define REST v2 operations also pass.

RED: "REST operation v2 command method and enum rules > rejects a COMMAND
sent as GET/HEAD/OPTIONS/post" and "rejects an unknown semantics/replayPolicy
value" failed with "expected function to throw an error, but it didn't".
Gates: check:architecture, check:types:app/test/node, lint, test:component,
test:runtime-schema, test:contract pass; test:unit passes except the
environment-dependent removal-fixture.test.ts (needs generated
artifacts/release files; unrelated). tests/integration also passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 12:19:48 +09:00
donghyeon-ka 6c52cdb916 feat: 기능 추가 과정중 2026-07-30 15:58:20 +09:00