79 Commits

Author SHA1 Message Date
Seeker
4bd6c343d0 dev-cmd/audit: enforce uses_from_macos only if core tap 2020-07-28 10:28:00 -07:00
lionellloh
4f45ddd55b brew style --fix 2020-07-28 21:04:45 +08:00
lionellloh
26c786fc0a double quotes to single quotes 2020-07-28 21:01:36 +08:00
Lionell
0d6ea9e26c Updated tests to pass 2020-07-28 21:01:36 +08:00
Lionell
721c9b06cd audit-license: Small change to use license_array 2020-07-28 21:01:36 +08:00
lionellloh
4a14ae6589 Audit-license: more tests to ensure behaviour 2020-07-28 21:01:36 +08:00
lionellloh
797a07d555 All tests adapted to pass 2020-07-28 21:01:36 +08:00
Seeker
2e5d79a64a
Merge pull request #8033 from SeekingMeaning/allow-libressl
dev-cmd/audit: add libressl to uses_from_macos allow list
2020-07-22 10:43:01 -07:00
Sean Molenaar
dab18076fa
audit: error on archived repos 2020-07-22 11:57:50 +02:00
Seeker
e77c156690 dev-cmd/audit: rename USES_FROM_MACOS_ALLOWLIST
Rename to PROVIDED_BY_MACOS_DEPENDS_ON_ALLOWLIST
2020-07-21 08:21:09 -07:00
Dustin Rodrigues
963605e682 refactor throttled update logic to improve efficiency 2020-07-11 12:05:47 -04:00
Rylan Polster
1859162735 style: use pkgshare instead of share/foo 2020-07-10 11:17:37 -04:00
Mike McQuaid
6a7e5f2e9d
dev-cmd/audit: tweak checksum audit.
Compare against the latest `origin/master` checksum rather than
whatever the previous one was.
2020-07-03 09:21:53 +01:00
Mike McQuaid
97f68e6a3a
Revert "disable license check for new formulae" 2020-07-02 09:04:58 +01:00
Rui Chen
8ff1ca644d disable license check for new formulae
return when license is blank

Co-authored-by: Bo Anderson <mail@boanderson.me>
2020-07-01 17:22:07 -04:00
lionellloh
7358dd7bba style fixes 2020-06-30 23:25:51 +08:00
lionellloh
96d60c271a Merge remote-tracking branch 'mlh/license' into license 2020-06-30 22:12:03 +08:00
Lionell Loh Jian An
5b3530b23d
Apply suggestions from code review
Code review changes

Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2020-06-30 22:11:36 +08:00
lionellloh
ff95f08591 audit test: modified code for reading json file 2020-06-30 22:08:36 +08:00
Lionell
5f6917ae7c Merge branch 'master' into license 2020-06-28 02:07:53 +08:00
Frank Lam
b2eafdf11d
Remove patch checks from audit 2020-06-27 02:37:57 +08:00
lionellloh
fbd5c32d22 bunch of style fixes 2020-06-25 05:46:18 +08:00
lionellloh
127d67e745 license: update tests and license checking logic 2020-06-23 02:59:55 +08:00
Lionell
fa412f9bb4 audit spec: editted strings to matach audit problem strings 2020-06-19 04:24:36 +08:00
Lionell
f78d4f41a0 audit spec: include cases for new formula 2020-06-18 00:45:13 +08:00
lionellloh
2b66968505 audit: cosmetic changes 2020-06-17 22:55:02 +08:00
lionellloh
0b95f030fd audit: fix code review changes 2020-06-17 22:13:04 +08:00
lionellloh
3bfca5bcee audit: change location of spdx.json file 2020-06-17 21:45:51 +08:00
lionellloh
03fc6b2c15 audit_spec: override core-tap attribute in online test 2020-06-17 05:19:38 +08:00
Lionell
e8f6e651d1 dev-cmd/audit_spec: WIP: online mismatch does not return any problems in test environment 2020-06-17 04:16:01 +08:00
Lionell
44aac2474e dev-cmd/audit_spec: check if license info exists and if it is a standard spdx-id 2020-06-17 03:39:00 +08:00
Mike McQuaid
2a94d382ac
audit: make audit_revision_and_version_scheme faster.
This is really, really slow at the moment for a few reasons:
- it goes through the list of revisions twice
- it checks many more revisions than it needs to

Even after these improvements it's still by far the slowest audit so
am also making it a `--git` only audit.

Additionally, to further improve default `brew audit` performance do not
run `brew style` checks when doing `brew audit` with no arguments.

`brew style` can be run quickly and efficiently on all of a tap (and is
cached) so no need to duplicate it here.
2020-06-08 15:00:09 +01:00
Issy Long
8eba9b86ab
Change occurrences of "blacklist" to "denylist" or "disallow"
- Depending on context, I've gone for either "denylist" or "disallow"
  here. "Disallow" for things in sentences, or actions, and "denylist"
  for list of things.
2020-06-06 22:38:33 +01:00
Issy Long
0041ea21f5
Change occurrences of "whitelist" to "allowlist" 2020-06-06 22:38:32 +01:00
vidusheeamoli
f851688541 audit: Port audit_keg_only to rubocop and add tests
audit: add test

audit: fixed test

audit: added another test case

audit: fix test

audit: fix test

audit: fix keg only
2020-05-05 10:47:49 +05:30
Mike McQuaid
8eed72cd8b
Move file mode audit to RuboCop. 2020-04-18 15:44:24 +01:00
Mike McQuaid
5e2351cde6
dev-cmd/audit: add --skip-style option.
This will allow `brew style` and `brew audit` to be run separately
without providing duplicates.

Additionally, run RuboCop style rules when `--strict` isn't provided and
remove a confusing reference to `style`.
2020-04-16 08:24:38 +01:00
Mike McQuaid
6ea6db9026
dev-cmd/audit: test presence of formulae in lists. 2020-04-12 14:17:06 +01:00
Mike McQuaid
1e265247ca
rubocop: apply autofixes. 2020-03-13 21:16:18 +00:00
Alexander Regueiro
68047abc0e audit: ignore group write bit 2020-03-05 23:01:41 +00:00
Jonathan Chang
779304df68 audit: add "homebrew/core" for relevant checks 2020-01-08 15:38:48 -05:00
Dawid Dziurla
86feb5a9de
audit: replace depends_on with uses_from_macos 2019-10-10 17:59:32 +02:00
Sean Molenaar
8cb833f7da
Audit bitbucket.com repositories 2019-09-05 20:56:25 +02:00
Sean Molenaar
0cca6cb8bd
Audit gitlab.com repositories 2019-09-05 12:14:33 +02:00
Mike McQuaid
4add1d1cb3
Check binary URL resources with RuboCop
- Migrate the existing binary URL audit to a RuboCop.
- Check resources as well as main URLs
- Also check for "macos" and "osx" in URLs
- Add whitelists for URLs and formulae
2019-09-02 10:50:49 +01:00
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
Mike McQuaid
aa44509be9
Test dev-cmd *_args methods
Also, add a few missing invocations.
2019-03-27 13:35:42 +00:00
Shaun Jackman
82da3b43cc audit: Keg-only :provided_by_macos dep okay on Linux
Disable this brew audit error on Linux:
* Dependency 'zlib' may be unnecessary as it is provided by macOS;
try to build this formula without it.
2019-03-02 13:29:49 -08:00
Claudia
5be80a78f6
Use Homebrew-controlled domain for Cask dummy URLs
In a number of Cask specs, the value of the `homepage` stanza is currently set
to https://example.com. As of 2018-11-28, the TLS certificate served by
example.com seems to be expired, possibly due to an oversight on ICANN’s side.

While the certificate is certainly going to be renewed soon, it would be
desirable for Homebrew’s test result to be less dependent on ICANN’s actions.
This commit changes the homepages of all test Casks to http://brew.sh, whose
domain and TLS certificate are both controlled by Homebrew.
2018-11-28 20:51:55 +01:00
commitay
0a3ad268a0 audit: check versioned formulae for keg_only :versioned_formula 2018-10-17 23:52:42 +10:00