666 Commits

Author SHA1 Message Date
Mike McQuaid
77c0d38c35
brew style --fix 2022-12-13 11:37:06 +00:00
Bevan Kay
74092bc40d
Update Library/Homebrew/dev-cmd/audit.rb
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2022-12-06 20:50:00 +11:00
Bevan Kay
839746cf99
dev-cmd/audit: enable --[no]-signing flag for audits 2022-12-06 11:00:59 +11:00
Bo Anderson
eac32f0b20
Additional fixes for Ruby 3 compatibility 2022-10-18 01:54:59 +01:00
Sean Molenaar
dd46cc40c7
audit: improve error wording 2022-09-26 15:37:12 +02:00
Sean Molenaar
95777e7cdf Audit: complain if no targets are found 2022-09-26 10:49:12 +02:00
Mike McQuaid
e2759fbdff
Deprecate reading all formulae through commands
We added the `--all` flag (now renamed to `--eval-all`) for various
commands for this behaviour so let's start deprecating this.

Also, introduce a `HOMEBREW_EVAL_ALL` environment variable to use the
existing, less secure, behaviour by default and avoid passing
`--eval-all` everywhere.
2022-09-05 13:57:22 +01:00
Mike McQuaid
22d6af1258
Manual brew style fixes. 2022-06-30 08:56:21 +01:00
Mike McQuaid
2d5eab2e1c
brew style --fix 2022-06-30 08:56:21 +01:00
Bo Anderson
f5dc7a571f
Fix Style/ObjectThen offences 2022-06-17 19:47:55 +01:00
Bo Anderson
0c0cdf8105
dev-cmd/audit: fix error with --installed 2022-04-08 19:10:20 +01:00
Mike McQuaid
79891a7103
Update uses of Formula.all/Cask::Cask.all
Add some `--all` flags we'll eventually migrate to to ensure that we'll
eventually require their usage to read all formulae. Where we need to
do stuff later, add some comments.
2022-03-08 19:24:56 +00:00
Mike McQuaid
3a709d36b2
Start process to remove Enumerable from Formula and Cask::Cask.
This is the first step to address
https://github.com/Homebrew/brew/issues/11292.
2022-01-03 14:59:10 +00:00
Rylan Polster
2e6b6ab3a2
Fix style 2021-12-24 21:15:21 -05:00
Rylan Polster
e09139fb47
Clarify comment 2021-11-06 00:59:46 -04:00
Rylan Polster
46f7c8b0b6
Move handling to dev-cmd/audit.rb 2021-11-06 00:51:20 -04:00
Rylan Polster
fa4bb7d74a
Refactor audit exception handling 2021-10-21 21:11:05 -04:00
Nuno Cruces
7db528163c brew audit: fails on Linux if tap has any casks
Running `brew audit --tap=[TAP]` fails on Linux (including GitHub Actions CI) if the tap has any caksks.
2021-06-09 19:13:39 +01:00
Markus Reiter
72a79d934e
Fix audit annotations for casks. 2021-04-03 04:27:32 +02:00
hyuraku
d4bca4595a dev-cmd/audit: delete one variable 2021-03-27 21:57:36 +09:00
Rylan Polster
2b8d19e0bd
audit: limit non-failure cask output 2021-03-22 22:16:54 -04:00
Bo Anderson
8e98ce69f3
Stricter handling of CLI args 2021-03-18 16:41:57 +00:00
EricFromCanada
2ae4f11963 reorder command flags 2021-01-26 15:36:44 -05:00
Rylan Polster
d1f3e39b7b
Update commands to generate usage banner 2021-01-18 21:20:11 -05:00
Rylan Polster
da811373d3 Add named_args DSL for commands 2021-01-13 17:09:42 -05:00
Mike McQuaid
d8a5e467e8
audit: quieten down and make casks audit consistent with formulae.
The current casks audit is very noisy in the no-op case (i.e. no errors)
https://github.com/Homebrew/brew/pull/10234/checks?check_run_id=1655630568#step:15:7

This means when there are errors and you're querying all casks it's
pretty hard to quickly identify the problems.

This commit silences the `passing`, `warning` and header/summary output
when you're querying all casks (rather than a specific cask or tap).

This is more consistent with `brew audit` for formulae which is silent
unless there are audit failures.
2021-01-07 13:31:14 +00:00
hyuraku
0a97cd18a5 set default args 2020-12-17 21:14:18 +09:00
hyuraku
7be216fcbe change function name 2020-12-17 21:07:43 +09:00
hyuraku
d7f9bb6247 add function to define path 2020-12-17 21:07:43 +09:00
Issy Long
c784d9b955
dev-cmd/audit: Fix "undefined method audit_exceptions"
- When running `brew audit` on formulae that aren't in a Homebrew tap
  location (ie, in a directory outside of
  `/usr/local/Homebrew/Library/Taps`), `brew audit` falls over because
  it can't determine which tap a formula is in.
2020-11-21 20:24:34 +00:00
Markus Reiter
9bfbeace54 Fix corrected_problem_count and new_formula_problem_lines. 2020-11-18 18:37:53 +01:00
Markus Reiter
873b2a0042 Fix brew audit --tap=<tap>. 2020-11-18 18:29:20 +01:00
Markus Reiter
24cef5c2ce Support casks in brew audit. 2020-11-18 13:21:49 +01:00
Markus Reiter
dc11f02e16 Move auditor classes into separate files. 2020-11-18 11:22:27 +01:00
Markus Reiter
04272f5f68 Move TapAuditor into separate file. 2020-11-18 10:25:32 +01:00
Dustin Rodrigues
d26567a65d audit: allow checksum to be added/removed when changing download scheme 2020-11-17 08:02:55 -05:00
EricFromCanada
f784b7107f manpage: fixes for grammar 2020-11-16 07:56:50 -05:00
Jonathan Chang
e547e3aba9 audit: don't error on old OS X versions 2020-11-15 17:18:32 +11:00
Markus Reiter
78f1761802
Merge pull request #8956 from reitermarkus/sorbet
Add more type signatures.
2020-11-13 16:14:35 +01:00
Markus Reiter
da9289eff0 Add more type signatures. 2020-11-13 12:26:36 +01:00
Dustin Rodrigues
ba0699a8d7 audit: only flag if checksum changes when version and full url stay the same 2020-11-11 23:12:58 -05:00
Rylan Polster
e05b0fc7f5
Merge pull request #9092 from Rylan12/fix-checksum-audit
audit: fix checksum audit
2020-11-10 15:28:26 -05:00
Dustin Rodrigues
a8a83d1f24 dev-cmd/audit: only go back in git history until revision or version changes 2020-11-09 22:04:25 -05:00
Rylan Polster
59b1309900
Merge pull request #9039 from Rylan12/move-audit-allowlist-to-core
audit: migrate throttle list to Homebrew/core
2020-11-09 15:14:06 -05:00
Mike McQuaid
93362547c9
dev-cmd/audit: don't do dependency checks on Linux.
Alternate approach to #9091 for
https://github.com/Homebrew/homebrew-core/pull/64423
2020-11-09 16:26:44 +00:00
Rylan Polster
8a58dc09cd audit: fix checksum audit 2020-11-09 09:44:03 -05:00
Rylan Polster
4ae72e0bdf tap: add constants for json files 2020-11-09 08:39:56 -05:00
Rylan Polster
b4d4f6d504 audit: require JSON arrays/objects for audit exceptions 2020-11-06 12:33:28 -05:00
Rylan Polster
f2f2de6ff0 audit: cleanup and only check certain JSON files 2020-11-06 11:23:11 -05:00
Rylan Polster
fe95b23736 audit: refactor tap_audit_exception method 2020-11-06 10:49:21 -05:00