fix(review): bound fallback artifact inflation#4178
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4178 +/- ##
==========================================
- Coverage 94.11% 94.10% -0.01%
==========================================
Files 432 432
Lines 38348 38369 +21
Branches 13979 13983 +4
==========================================
+ Hits 36091 36109 +18
- Misses 1600 1602 +2
- Partials 657 658 +1
🚀 New features to boost your workflow:
|
|
Caution 🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥 🛑 Gittensory review result - fixes requiredReview updated: 2026-07-10 08:40:39 UTC
🛑 Suggested Action - Manual Review
Review summary Nits — 5 non-blocking
Why this is blocked
CI checks failing
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | 795def4 | Commit Preview URL Branch Preview URL |
Jul 10 2026, 08:26 AM |
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
47472c5 to
8c7e1d4
Compare
…gic bytes
This PR's new isPng() check (src/review/visual/actions-fallback.ts) correctly
rejects the plain-text fixture entries ("desktop-bytes" etc.) this sibling
test file uses -- its own local buildZip() fixture wasn't updated alongside
test/unit/actions-fallback.test.ts's pngBytes() helper. Adds the same helper
here and updates the one byte-exact assertion that decoded the stored object
as text to compare the raw bytes instead.
Motivation
ArrayBufferwith no decompressed-size limit, allowing crafted small archives to inflate to very large buffers and cause worker memory exhaustion.image/png.Description
maxEntryBytesbudget intoparseZipEntriesand by checking the central-directory's declared uncompressed size before inflating. (modified:
src/review/visual/actions-fallback.ts)Response(...).arrayBuffer()inflation with a streaming reader (stream.getReader()) ininflateRawRawthat aborts and returnsnullif the decompressed output exceeds the configured limit. (modified:src/review/visual/actions-fallback.ts).pngentries by checking the PNG magic bytes and ignore entries whose decompressed bytes do not start with a PNG signature before accepting them as shots. (modified:src/review/visual/actions-fallback.ts)test/unit/actions-fallback.test.ts)Testing
npx vitest run test/unit/actions-fallback.test.tsand the focused suite passed (62 testspassed).npm run typecheckand the TypeScript check completed successfully.git diff --checkwith no issues reported.npx vitest run --coverage --pool=forks test/unit/actions-fallback.test.tsexecuted the focused tests successfully but coverage report generation failed in this environment withTypeError: jsTokens is not a function; a fullnpm run test:coveragerun did not complete in this environment due to unrelated long-running tests/timeouts.npm audit --audit-level=moderatecould not be completed here due to the registry audit endpoint returning HTTP 403 in this environment.Codex Task