Skip to content

Commit 09f90af

Browse files
author
jsf9k
committed
2 parents 9c40c85 + 5103fb6 commit 09f90af

File tree

6 files changed

+76
-44
lines changed

6 files changed

+76
-44
lines changed

.bandit.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

.flake8

Lines changed: 34 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,40 @@
11
[flake8]
22
max-line-length = 80
3+
34
# Select (turn on)
4-
# * Complexity violations reported by mccabe (C) -
5-
# http://flake8.pycqa.org/en/latest/user/error-codes.html#error-violation-codes
6-
# * Documentation conventions compliance reported by pydocstyle (D) -
7-
# http://www.pydocstyle.org/en/stable/error_codes.html
8-
# * Default errors and warnings reported by pycodestyle (E and W) -
5+
# * C: Complexity violations reported by mccabe -
6+
# https://flake8.pycqa.org/en/latest/user/error-codes.html#error-violation-codes
7+
# * C4: Default errors and warnings reported by flake8-comprehensions -
8+
# https://github.com/adamchainz/flake8-comprehensions#rules
9+
# * D: Documentation conventions compliance reported by pydocstyle -
10+
# https://github.com/PyCQA/pydocstyle/blob/master/docs/error_codes.rst
11+
# * DUO: Default errors and warnings reported by dlint -
12+
# https://github.com/dlint-py/dlint/tree/master/docs
13+
# * E: Default errors reported by pycodestyle -
914
# https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes
10-
# * Default errors reported by pyflakes (F) -
11-
# http://flake8.pycqa.org/en/latest/glossary.html#term-pyflakes
12-
# * Default warnings reported by flake8-bugbear (B) -
15+
# * F: Default errors reported by pyflakes -
16+
# https://flake8.pycqa.org/en/latest/glossary.html#term-pyflakes
17+
# * N: Default errors and warnings reported by pep8-naming -
18+
# https://github.com/PyCQA/pep8-naming#error-codes
19+
# * NQA: Default errors and warnings reported by flake8-noqa -
20+
# https://github.com/plinss/flake8-noqa#error-codes
21+
# * W: Default warnings reported by pycodestyle -
22+
# https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes
23+
# * B: Default warnings reported by flake8-bugbear -
1324
# https://github.com/PyCQA/flake8-bugbear#list-of-warnings
14-
# * The B950 flake8-bugbear opinionated warning -
25+
# * B950: Bugbear opinionated warning for line too long -
1526
# https://github.com/PyCQA/flake8-bugbear#opinionated-warnings
16-
select = C,D,E,F,W,B,B950
17-
# Ignore flake8's default warning about maximum line length, which has
18-
# a hard stop at the configured value. Instead we use
19-
# flake8-bugbear's B950, which allows up to 10% overage.
20-
#
21-
# Also ignore flake8's warning about line breaks before binary
22-
# operators. It no longer agrees with PEP8. See, for example, here:
23-
# https://github.com/ambv/black/issues/21. Guido agrees here:
24-
# https://github.com/python/peps/commit/c59c4376ad233a62ca4b3a6060c81368bd21e85b.
25-
ignore = E501,W503
27+
select = C,C4,D,DUO,E,F,N,NQA,W,B,B950
28+
29+
# Ignore
30+
# * E203: pycodestyle's default warning about whitespace before ':' because Black enforces
31+
# an equal amount of whitespace around slice operators (':').
32+
# * E501: pycodestyle's default warning about maximum line length, which has a hard stop
33+
# at the configured value. Instead we use flake8-bugbear's B950, which
34+
# allows up to 10% overage.
35+
# * W503: pycodestyle's warning about line breaks before binary operators. It no longer
36+
# agrees with PEP8. See, for example, here:
37+
# https://github.com/ambv/black/issues/21
38+
# Guido agrees here:
39+
# https://github.com/python/peps/commit/c59c4376ad233a62ca4b3a6060c81368bd21e85b
40+
ignore = E203,E501,W503

.github/labeler.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ test:
6161
- any-glob-to-any-file:
6262
# Add any test-related files or paths.
6363
- .ansible-lint
64-
- .bandit.yml
6564
- .flake8
6665
- .isort.cfg
6766
- .mdl_config.yaml

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,12 @@ jobs:
149149
- uses: hashicorp/setup-packer@v3
150150
with:
151151
version: ${{ steps.setup-env.outputs.packer-version }}
152-
- uses: hashicorp/setup-terraform@v3
152+
- uses: hashicorp/setup-terraform@v4
153153
with:
154154
terraform_version: ${{ steps.setup-env.outputs.terraform-version }}
155155
- name: Install go-critic
156156
env:
157-
PACKAGE_URL: github.com/go-critic/go-critic/cmd/gocritic
157+
PACKAGE_URL: github.com/go-critic/go-critic/cmd/go-critic
158158
PACKAGE_VERSION: ${{ steps.setup-env.outputs.go-critic-version }}
159159
run: go install ${PACKAGE_URL}@${PACKAGE_VERSION}
160160
- name: Install goimports

.github/workflows/sync-labels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ jobs:
8787
- uses: actions/checkout@v6
8888
- name: Sync repository labels
8989
if: success()
90-
uses: crazy-max/ghaction-github-labeler@v5
90+
uses: crazy-max/ghaction-github-labeler@v6
9191
with:
9292
# This is a hideous ternary equivalent so we only do a dry run unless
9393
# this workflow is triggered by the develop branch.

.pre-commit-config.yaml

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ repos:
4747

4848
# Text file hooks
4949
- repo: https://github.com/igorshubovych/markdownlint-cli
50-
rev: v0.47.0
50+
rev: v0.48.0
5151
hooks:
5252
- id: markdownlint
5353
args:
@@ -65,7 +65,7 @@ repos:
6565

6666
# GitHub Actions hooks
6767
- repo: https://github.com/python-jsonschema/check-jsonschema
68-
rev: 0.36.2
68+
rev: 0.37.0
6969
hooks:
7070
- id: check-github-actions
7171
- id: check-github-workflows
@@ -107,7 +107,7 @@ repos:
107107

108108
# Shell script hooks
109109
- repo: https://github.com/scop/pre-commit-shfmt
110-
rev: v3.12.0-2
110+
rev: v3.13.0-1
111111
hooks:
112112
- id: shfmt
113113
args:
@@ -131,23 +131,26 @@ repos:
131131

132132
# Python hooks
133133
- repo: https://github.com/PyCQA/bandit
134-
rev: 1.9.3
134+
rev: 1.9.4
135135
hooks:
136136
- id: bandit
137-
args:
138-
- --config=.bandit.yml
139137
- repo: https://github.com/psf/black-pre-commit-mirror
140-
rev: 26.1.0
138+
rev: 26.3.1
141139
hooks:
142140
- id: black
143141
- repo: https://github.com/PyCQA/flake8
144142
rev: 7.3.0
145143
hooks:
146144
- id: flake8
147145
additional_dependencies:
146+
- dlint==0.16.0
147+
- flake8-bugbear==25.11.29
148+
- flake8-comprehensions==3.17.0
148149
- flake8-docstrings==1.7.0
150+
- flake8-noqa==1.5.0
151+
- pep8-naming==0.15.1
149152
- repo: https://github.com/PyCQA/isort
150-
rev: 8.0.0
153+
rev: 8.0.1
151154
hooks:
152155
- id: isort
153156
- repo: https://github.com/pre-commit/mirrors-mypy
@@ -162,6 +165,22 @@ repos:
162165
hooks:
163166
- id: pip-audit
164167
args:
168+
# We have to ignore this vulnerability for now since an
169+
# update for pygments has not yet been released.
170+
#
171+
# In any event, this vulnerability is unlikely to cause us
172+
# any problems since we don't feed any regexes to pygments
173+
# directly. pygments is pulled in as a dependency of
174+
# pytest.
175+
#
176+
# See also:
177+
# - https://nvd.nist.gov/vuln/detail/CVE-2026-4539
178+
# - https://github.com/pygments/pygments/issues/3058
179+
#
180+
# TODO: Remove this when it becomes possible. See
181+
# cisagov/skeleton-generic#257 for more details.
182+
- --ignore-vuln
183+
- CVE-2026-4539
165184
# Add any pip requirements files to scan
166185
- --requirement
167186
- requirements-dev.txt
@@ -182,6 +201,9 @@ repos:
182201

183202
# Ansible hooks
184203
- repo: https://github.com/ansible/ansible-lint
204+
# We need to stay on this version because we are still using Python 3.13 in
205+
# our GitHub Actions configuration. Later versions require Python 3.14 for
206+
# the hook to run.
185207
rev: v26.1.1
186208
hooks:
187209
- id: ansible-lint
@@ -212,6 +234,15 @@ repos:
212234
hooks:
213235
- id: terraform_fmt
214236
- id: terraform_validate
237+
# This needs to run after the terraform_validate hook so that any Terraform
238+
# configurations are initialized.
239+
- id: terraform_providers_lock
240+
args:
241+
- --args=-platform=darwin_amd64
242+
- --args=-platform=darwin_arm64
243+
- --args=-platform=linux_amd64
244+
- --args=-platform=linux_arm64
245+
- --hook-config=--mode=always-regenerate-lockfile
215246

216247
# Docker hooks
217248
- repo: https://github.com/IamTheFij/docker-pre-commit

0 commit comments

Comments
 (0)