fix(security): harden SSRF, upgrades, bind policy, and mutation UX - #201
Draft
goniszewski wants to merge 3 commits into
Draft
fix(security): harden SSRF, upgrades, bind policy, and mutation UX#201goniszewski wants to merge 3 commits into
goniszewski wants to merge 3 commits into
Conversation
Address the comprehensive code-review findings: validate redirects before following them, reject arbitrary HTTP update sources, require signed remote upgrades, fail closed on non-loopback binds outside containers, reject URL credentials consistently, apply default body limits, drop unsafe restore bypass from HTTP, and make frontend mutations confirm before success UX. Co-authored-by: Robert Goniszewski <goniszewski@users.noreply.github.com>
Prefer category_id-only list/search params in hook tests, and use a concrete ApiUpdateCheckResult shape to avoid deep DTO instantiation. Co-authored-by: Robert Goniszewski <goniszewski@users.noreply.github.com>
Preserve a "valid URL" phrase in the dialog error so existing journey coverage continues to match the safer http(s)/no-credentials check. Co-authored-by: Robert Goniszewski <goniszewski@users.noreply.github.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Implements the comprehensive code-review hardening items for Grimoire’s critical paths while staying inside the local-first / loopback threat model.
Daemon / security
safe-fetch) so private redirect targets are never contactedGET /updates/checkrejects arbitrarysourcequery params (default/env source only)LITTLEIMP_UPGRADE_SIGNING_KEY_FINGERPRINTS, and download size caps;--allow-unsigned/LITTLEIMP_ALLOW_UNSIGNED_UPGRADE=1is an explicit escape hatchLITTLEIMP_ALLOW_NON_LOOPBACK_BIND=1is set, with a loud warningallow_unsafe_no_checksumFrontend
category_idover namewindow.open/hrefErrorBoundaryJSON.stringifytestAiConnection/ export download / update-check go throughapi.tsDocs
docs/task-reports/2026/07/2026-07-22-security-hardening-review-fixes/Test plan
npm run check(lint, type-check, frontend + daemon tests, docs:api:check, build)npm run test:e2e(25 passed; revalidated the invalid-URL dialog assertion after copy tweak)