-
-
Notifications
You must be signed in to change notification settings - Fork 12.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
secure urls #6687
secure urls #6687
Conversation
@@ -1,7 +1,7 @@ | |||
class Podiff < Formula | |||
desc "Compare textual information in two PO files" | |||
homepage "https://puszcza.gnu.org.ua/software/podiff/" | |||
url "http://download.gnu.org.ua/pub/release/podiff/podiff-1.1.tar.gz" | |||
url "https://download.gnu.org.ua/pub/release/podiff/podiff-1.1.tar.gz" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vszakats Can you make an audit
check for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MikeMcQuaid audit
done.
@@ -23,36 +23,36 @@ class Qt5 < Formula | |||
sha256 "a6a2632de7e44bbb790bc3b563f143702c610464a7f537d02036749041fd1800" | |||
|
|||
# Upstream commit from 7 Jul 2016 "configure and mkspecs: Don't try to find xcrun with xcrun" | |||
# http://code.qt.io/cgit/qt/qtbase.git/patch/configure?id=77a71c32c9d19b87f79b208929e71282e8d8b5d9 | |||
# https://code.qt.io/cgit/qt/qtbase.git/patch/configure?id=77a71c32c9d19b87f79b208929e71282e8d8b5d9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vszakats Can you make an audit
check for these?
Audit check continues to fail to run on my system. It tries to touch some internal files only accessible with an admin account. This started a few month ago. |
@vszakats Please file an issue about that and let's get to the bottom of it. |
@vszakats I'm honestly still a bit disappointed these are being fixed up manually but at the very least we need to add |
Here is the error:
|
@vszakats Does that file exist? If so, you should |
The |
Ok. Can you run the same command with |
Opened an Issue for this: Homebrew/brew#1462 |
@MikeMcQuaid Posting further results there, if you agree. |
@vszakats you can put a separate installation of brew somewhere else in order to test audit. It works based off of the path to the |
Using |
@vszakats the idea is for you to open a PR to https://github.com/Homebrew/brew automating the detection of insecure URLs that match the domains you're fixing here. For instance https://github.com/Homebrew/brew/blob/master/Library/Homebrew/dev-cmd/audit.rb#L1194-L1236 |
@ilovezfs I know — but, my script is a convoluted one, written in an obscure programming language (POSIX shell was not enough) and it still requires manual intervention from time to time (especially speaking of |
What would help in automatising, is a parser that'd return all the URLs found in a formula (including comments, and possibly non-active/alternate branches (found in some casks), but excluding With these information the "only" task left is to do the detection/discovery and replace original URLs with upgraded ones, if they hit a certain confidence level. And list the rest for manual verification. This would also involve keeping a short blacklist of URLs not to touch and balancing the confidence levels/threshold. |
Merged this, thanks @vszakats. |
@vszakats It's not the language that's the issue, it's that it needs to live inside It could live in https://github.com/Homebrew/brew/blob/1fb7d0fa5702f21d35ed3831419daa6f3ea24473/Library/Homebrew/dev-cmd/audit.rb#L726 or https://github.com/Homebrew/brew/blob/1fb7d0fa5702f21d35ed3831419daa6f3ea24473/Library/Homebrew/dev-cmd/audit.rb#L766 and be matched by a regex. The main goal is avoiding false negatives rather than false positives. Would be amazing if you could try to open a PR with something similar (even if it doesn't work quite right) and we can help you get over the finish line. |
Thanks for the pointers. By "language problem" I meant that I'm currently using a different script, not written in The only reasonable way I can see moving along with this is separating the parsing and discovery logic. But that's not something I'll be capable of doing in the near future in Ruby and in a clean way. It's non-trivial to parse source code, and the tools I've tried (f.e.
That's what I have been aiming for. Any ambiguous/heuristic detection is flagged as a "hint". |
@vszakats I think it's sufficient to just have a regex for all URLs that are then checked with |
brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingbrew install <formula>
)?