cask/audit: anchor cask audit regexps to url - #23870
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
馃煛 Changes recommended
The SourceForge pattern can still match hostnames appearing in query parameters.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Anchors cask audit hosting checks to URL authorities to reduce false livecheck errors.
Changes:
- Anchors SourceForge, DevMate and HockeyApp patterns.
- Adds a DevMate mirror-path regression test and fixture.
File summaries
| File | Description |
|---|---|
Library/Homebrew/cask/audit.rb |
Tightens hosting regexps. |
Library/Homebrew/test/cask/audit_spec.rb |
Tests a DevMate false positive. |
Library/Homebrew/test/support/fixtures/cask/Casks/devmate-lookalike-without-livecheck.rb |
Adds the regression fixture. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Balanced
馃挕 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
bevanjkay
reviewed
Sep 7, 2026
- `audit_hosting_with_livecheck` matched `sourceforge.net/` and `dl.devmate.com/` anywhere in the download URL, so a lookalike host, a mirror path or a query parameter that merely contained one of those hosts produced a false "Download is hosted on X, please add a livecheck" error. - Anchor each regexp to the URL authority so it only matches when the download is actually served from that host. SourceForge keeps matching its `downloads.` and project subdomains. - remove references to hockeyapp as no casks use the url
krehel
force-pushed
the
fix-url-regexp-anchor
branch
from
September 7, 2026 14:22
f03aa48 to
3804f92
Compare
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.
audit_hosting_with_livecheckmatchedsourceforge.net/,dl.devmate.com/andrink.hockeyapp.net/anywhere in the download URL, so a lookalike host, a mirror path or a query parameter that merely contained one of those hosts produced a false "Download is hosted on X, please add a livecheck" error.downloads.and project subdomains.brew benchmarkresults.brewcommands to reproduce the bug?brew lgtm(style, typechecking and tests) locally?Fable 5.1 with manual verification and review.