fix(discover): keep HTTPS installers from vendor sites and add clear selection - #377
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3a882723ba
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Test Results 1 351 files ±0 1 378 suites ±0 10m 27s ⏱️ +24s Results for commit 9338af7. ± Comparison against base commit bb41819. This pull request removes 1 and adds 6 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
45e4625 to
4567ff0
Compare
…selection DeviceSafetyFilter dropped every .exe/.msi/.dmg/.pkg/.apk whose host was not on a short built-in list, so official installers hosted on a vendor's own site vanished after the agent accepted them. Such installers are now scored down over HTTPS and blocked only without HTTPS; hosts that imitate a listed domain, and http(s) URLs with user info, are blocked for every file type. The Discover add bar gets a button that clears the whole selection, including results selected in earlier messages.
…ike block A host that contains a trusted domain but sits under the same site, such as archive-downloads.apache.org beside downloads.apache.org, belongs to the vendor, so it is no longer blocked as an impersonation.
4567ff0 to
9338af7
Compare
…github.com/linroid/Ketch into HEAD # Conflicts: # app/shared/src/commonTest/kotlin/com/linroid/ketch/app/state/AiDiscoverControllerTest.kt
What
DeviceSafetyFilter): installers (.exe,.msi,.dmg,.pkg,.apk) from hosts off the built-in trusted list are no longer hard-blocked. Over HTTPS they are kept with a 0.2 score penalty, so they rank below the same file from a listed host. Without HTTPS they are still blocked.fake-github.com,github.com.example.net) and http(s) URLs carrying user info (github.com@evil.example). Other hosts of a trusted domain's own site, such asarchive-downloads.apache.org, are not treated as fakes.AiDiscoverController.clearSelection()). It reuses the existingdiscover_clear_selectionstring.Why
The agent accepted three official PureWriter installers hosted on
kuromi.drakeet.cn, but the filter dropped all three because that host isn't on the list. Most vendors host installers on their own domain, so the old rule hid nearly every official installer outside GitHub/SourceForge.The selection bar could say "1 from earlier" with no quick way to drop a pick that was far up the chat.
Notes for reviewers
Tests
DeviceSafetyFilterTest: unlisted HTTPS installer kept and scored below a trusted one, unlisted HTTP installer blocked, look-alike hosts and user info blocked, sibling hosts of a trusted site kept.AiDiscoverControllerTest:clearSelection()deselects results across turns.