fix(security): close two open GitHub Security Advisories - #9281
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
loopover-ui | 0c44aa7 | Commit Preview URL Branch Preview URL |
Jul 27 2026, 03:39 PM |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9281 +/- ##
==========================================
- Coverage 89.46% 89.46% -0.01%
==========================================
Files 836 836
Lines 109590 109597 +7
Branches 26098 26100 +2
==========================================
+ Hits 98048 98051 +3
Misses 10279 10279
- Partials 1263 1267 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Caution 🛑 LoopOver review result - fixes requiredReview updated: 2026-07-27 11:43:51 UTC
Review summary Nits — 4 non-blocking
Why this is blocked
📋 Copy for AI agents — paste into your coding agentCI checks failing
Decision drivers
Context & advisory signals — never blocks the verdict
Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. Visual preview
Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy. Scroll preview
A short scroll-through clip (desktop) — click either thumbnail to open the full animation. Evidence for scroll-linked behavior a single screenshot can't show. 🟩 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 LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
GHSA-v6v4-mh5m-5mqq: the miner-ui dev/preview auth middleware stamped its Set-Cookie session token on every response that wasn't itself rejected -- including a wholly unauthenticated GET / and every static asset. Any local process (not just a browser) could curl the root path and read a valid, replayable token, then use it against the mutating /api/* routes. Replaced with a one-shot bootstrap path (visit ?token=<value> printed to the server's own stdout/journal once per process start) -- the cookie is now only ever (re)stamped on a request that already proves it holds the token. Also switched the cookie comparison to a constant-time equality check. GHSA-v3j4-j27j-fxw6: eleven MCP tools accepted a caller-supplied baseRef with no leading-dash guard, passed positionally to git before any terminator -- a ref starting with '-' (e.g. "--output=/some/path") is parsed by git as an option, not a revision, letting overwrite an arbitrary file silently (gitOutput swallows all errors). Rejects any leading-dash ref at the choke point in collectLocalBranchMetadata (defense in depth alongside the zod schema layer), adds --end-of-options to every git invocation taking a caller-supplied ref, and pre-resolves baseRef to a real SHA once so only that SHA -- never the raw string -- reaches every downstream git call.
apps/loopover-miner-ui/vite-auth.ts and its test were failing validate-code (turbo lint --filter=@loopover/ui-miner, eslint's prettier/prettier rule) with unformatted long lines from the prior security-fix commit. Whitespace/line-wrap only, no logic change -- npm run lint and npm run test both pass clean in that workspace after.
50d830a to
0c44aa7
Compare
Bundle ReportBundle size has no change ✅ |


Summary
GHSA-v6v4-mh5m-5mqq — the miner-ui dev/preview auth middleware stamped its
Set-Cookiesession token on every response that wasn't itself rejected, including a wholly unauthenticatedGET /and every static asset. Any local process (not just a browser) couldcurlthe root path and read a valid, replayable token, then use it against the mutating/api/*routes. Replaced with a one-shot bootstrap path (visit?token=<value>printed to the server's own stdout/journal once per process start) — the cookie is now only ever (re)stamped on a request that already proves it holds the token. Also switched the cookie comparison to a constant-time equality check.GHSA-v3j4-j27j-fxw6 — eleven MCP tools accepted a caller-supplied
baseRefwith no leading-dash guard, passed positionally togitbefore any--terminator — a ref starting with-(e.g."--output=/some/path") is parsed by git as an option, not a revision, lettinggit diffoverwrite an arbitrary file silently (gitOutputswallows all errors). Rejects any leading-dash ref at the choke point incollectLocalBranchMetadata(defense in depth alongside the zod schema layer), adds--end-of-optionsto every git invocation taking a caller-supplied ref, and pre-resolvesbaseRefto a real SHA once so only that SHA — never the raw string — reaches every downstream git call.Test plan
npx tsc --noEmit -p tsconfig.json --incremental false— cleantest/unit/local-branch.test.ts(4 new tests, including a real temp-git-repo exploit reproduction proving the target file survives untouched) andapps/loopover-miner-ui/src/auth.test.ts(updated + new tests covering the bootstrap path and the never-leak-Set-Cookie-on-anonymous-request regression)npx vitest run test/unit/local-branch.test.ts— 79/79 passingapps/loopover-miner-ui's ownvitest run src/auth.test.ts— 26/26 passingnpm run cf-typegen/npm run selfhost:env-reference/npm run db:migrations:check/npm run branding-drift:check— all clean, no drift