Skip to content

Commit f4dc874

Browse files
authored
Merge pull request #43 from homebysix/1.8.2
v1.8.2 merge to master
2 parents 64c543f + e7f3205 commit f4dc874

4 files changed

Lines changed: 35 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/).
44

55

6+
## [1.8.2] - 2021-01-18
7+
8+
### Added
9+
- Added check for unexpected processor arguments in CodeSignatureVerifier.
10+
611
## [1.8.1] - 2020-12-08
712

813
### Removed
@@ -201,7 +206,8 @@ All notable changes to this project will be documented in this file. This projec
201206
- Initial release
202207

203208

204-
[Unreleased]: https://github.com/homebysix/pre-commit-macadmin/compare/v1.8.1...HEAD
209+
[Unreleased]: https://github.com/homebysix/pre-commit-macadmin/compare/v1.8.2...HEAD
210+
[1.8.2]: https://github.com/homebysix/pre-commit-macadmin/compare/v1.8.1...v1.8.2
205211
[1.8.1]: https://github.com/homebysix/pre-commit-macadmin/compare/v1.8.0...v1.8.1
206212
[1.8.0]: https://github.com/homebysix/pre-commit-macadmin/compare/v1.7.0...v1.8.0
207213
[1.7.0]: https://github.com/homebysix/pre-commit-macadmin/compare/v1.6.2...v1.7.0

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ For any hook in this repo you wish to use, add the following to your pre-commit
1515

1616
```yaml
1717
- repo: https://github.com/homebysix/pre-commit-macadmin
18-
rev: v1.8.1
18+
rev: v1.8.2
1919
hooks:
2020
- id: check-plists
2121
# - id: ...
@@ -121,7 +121,7 @@ When combining arguments that take lists (for example: `--required-keys`, `--cat
121121

122122
```yaml
123123
- repo: https://github.com/homebysix/pre-commit-macadmin
124-
rev: v1.8.1
124+
rev: v1.8.2
125125
hooks:
126126
- id: check-munki-pkgsinfo
127127
args: ['--catalogs', 'testing', 'stable', '--']
@@ -131,7 +131,7 @@ But if you also use the `--categories` argument, you would move the trailing `--
131131

132132
```yaml
133133
- repo: https://github.com/homebysix/pre-commit-macadmin
134-
rev: v1.8.1
134+
rev: v1.8.2
135135
hooks:
136136
- id: check-munki-pkgsinfo
137137
args: ['--catalogs', 'testing', 'stable', '--categories', 'Design', 'Engineering', 'Web Browsers', '--']
@@ -143,7 +143,7 @@ If it looks better to your eye, feel free to use a multi-line list for long argu
143143

144144
```yaml
145145
- repo: https://github.com/homebysix/pre-commit-macadmin
146-
rev: v1.8.1
146+
rev: v1.8.2
147147
hooks:
148148
- id: check-munki-pkgsinfo
149149
args: [

pre_commit_hooks/check_autopkg_recipes.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,26 @@ def validate_endofcheckphase(process, filename):
148148
return passed
149149

150150

151+
def validate_codesignatureverifier(process, filename):
152+
"""Ensure CodeSignatureVerifier uses correct arguments."""
153+
154+
passed = True
155+
csv_args = [
156+
x.get("Arguments")
157+
for x in process
158+
if x.get("Processor") == "CodeSignatureVerifier"
159+
]
160+
if csv_args:
161+
if "requirements" in csv_args[0]:
162+
print(
163+
'{}: Found unexpected key "{}" in '
164+
"CodeSignatureVerifier arguments.".format(filename, "requirements")
165+
)
166+
passed = False
167+
168+
return passed
169+
170+
151171
def validate_minimumversion(process, min_vers, ignore_min_vers_before, filename):
152172
"""Ensure MinimumVersion is set appropriately for the processors used."""
153173

@@ -462,6 +482,9 @@ def main(argv=None):
462482
if not validate_endofcheckphase(process, filename):
463483
retval = 1
464484

485+
if not validate_codesignatureverifier(process, filename):
486+
retval = 1
487+
465488
if not validate_no_var_in_app_path(process, filename):
466489
retval = 1
467490

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
name="pre-commit-macadmin",
88
description="Pre-commit hooks for Mac admins, client engineers, and IT consultants.",
99
url="https://github.com/homebysix/pre-commit-macadmin",
10-
version="1.8.1",
10+
version="1.8.2",
1111
author="Elliot Jordan",
1212
author_email="elliot@elliotjordan.com",
1313
packages=["pre_commit_hooks"],

0 commit comments

Comments
 (0)