Repository navigation
Conversation
|
@PHADAR6 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
1930f60 to
d633477
Compare
|
@PHADAR6 Our automated scan matched code from the PolinRider malware campaign, which steals developer credentials (GitHub, npm, wallets) and spreads through infected repositories:
What to do:
The PR will be re-scanned automatically and can be merged once it is clean. |
|
@PHADAR6 Our automated scan matched code from the PolinRider malware campaign, which steals developer credentials (GitHub, npm, wallets) and spreads through infected repositories:
What to do:
The PR will be re-scanned automatically and can be merged once it is clean. |
092939d to
409f930
Compare
Strips the payload this branch picked up (deleted api.js, truncated tailwind.config.js, unhooked package.json). No functional change to the branch's own work.
|
@greatest0fallt1me — this PR is ready for another review. I resolved the merge conflicts with the main branch (pushed 114e6cf). |
|
This PR came from a machine infected with the PolinRider malware. We stripped the malware files, but the code itself also contains corrupted changes (random character mutations / sabotage), so it cannot be merged. Found: |
|
We can't merge this PR. It still contains character-level corruption that is typical of an infected machine, and none of the problems from the previous review are fixed:
Before you push anything else, please clean your development machine: scan for malware, rotate your GitHub tokens and SSH keys, and check your git hooks and global npm packages. Then open a fresh branch from the latest main, re-apply only the batch |
Overview
This PR fixes the v2 bulk stream-update endpoint so that status changes go through the lifecycle state machine instead of being merged as raw fields.
POST /api/v2/streams/batchnow validates each row with Zod, dry-runs every transition under sorted locks, applies the same side fields as the single-stream routes, records per-stream audit events, and supports idempotent replays.withdrawandcancelare rejected in bulk because they move funds and require the dedicated single-stream settlement flow.Related Issue
Changes
🔒 Batch Route Hardening (
app/api/v2/streams/batch/route.ts){ ...existing, ...data, updatedAt }spread with a validated, state-machine-driven apply path.dataaccepts an optionalactionfromStreamAction(start,pause,stop,settle) plus the metadata fields frompatchStreamSchema.statusand any other unknown key are rejected with400 UNKNOWN_FIELD.withdrawandcancelare rejected with422 ACTION_NOT_BATCHABLE— they move funds and must go through the single-stream settlement route.422 DUPLICATE_ID.transition(stream.status, action)fromapp/lib/state-machine.ts; illegal moves addILLEGAL_TRANSITIONtodetailswith the row index.pausedAtset on pause, cleared on start.nextActionderived from the resulting status.recordPrivilegedStreamAuditEventper changed stream with actionstream.batch.<action>.Idempotency-Keysupport with scopev2.streams.batchand body fingerprint viacomputeFingerprint; conflicting body returns409 IDEMPOTENCY_CONFLICT.actionshape and the exclusion ofwithdraw/cancel.🧪 Test Enablement (
jest.config.js)app/api/v2/streams/batch/route.test.tsfromtestPathIgnorePatternsso the existing suite runs in CI.📚 OpenAPI (
__tests__/openapi-webhooks.test.ts)Verification Results
grep -n "\.\.\.data" app/api/v2/streams/batch/route.tsreturns nothingtransition()app/api/v2/streams/batch/route.test.tsremoved fromtestPathIgnorePatternsand passesjest.config.js; suite passesnpm test,npm run lint,npm run build,npm run openapi:checkpassCloses #1719