Skip to content

Commit 943baf5

Browse files
author
jsf9k
committed
2 parents 205760d + bf7bd4b commit 943baf5

7 files changed

Lines changed: 95 additions & 60 deletions

File tree

.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
@@ -63,7 +63,6 @@ test:
6363
- any-glob-to-any-file:
6464
# Add any test-related files or paths.
6565
- .ansible-lint
66-
- .bandit.yml
6766
- .flake8
6867
- .isort.cfg
6968
- .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
@@ -45,7 +45,7 @@ repos:
4545

4646
# Text file hooks
4747
- repo: https://github.com/igorshubovych/markdownlint-cli
48-
rev: v0.47.0
48+
rev: v0.48.0
4949
hooks:
5050
- id: markdownlint
5151
args:
@@ -63,7 +63,7 @@ repos:
6363

6464
# GitHub Actions hooks
6565
- repo: https://github.com/python-jsonschema/check-jsonschema
66-
rev: 0.36.2
66+
rev: 0.37.0
6767
hooks:
6868
- id: check-github-actions
6969
- id: check-github-workflows
@@ -105,7 +105,7 @@ repos:
105105

106106
# Shell script hooks
107107
- repo: https://github.com/scop/pre-commit-shfmt
108-
rev: v3.12.0-2
108+
rev: v3.13.0-1
109109
hooks:
110110
- id: shfmt
111111
args:
@@ -129,23 +129,26 @@ repos:
129129

130130
# Python hooks
131131
- repo: https://github.com/PyCQA/bandit
132-
rev: 1.9.3
132+
rev: 1.9.4
133133
hooks:
134134
- id: bandit
135-
args:
136-
- --config=.bandit.yml
137135
- repo: https://github.com/psf/black-pre-commit-mirror
138-
rev: 26.1.0
136+
rev: 26.3.1
139137
hooks:
140138
- id: black
141139
- repo: https://github.com/PyCQA/flake8
142140
rev: 7.3.0
143141
hooks:
144142
- id: flake8
145143
additional_dependencies:
144+
- dlint==0.16.0
145+
- flake8-bugbear==25.11.29
146+
- flake8-comprehensions==3.17.0
146147
- flake8-docstrings==1.7.0
148+
- flake8-noqa==1.5.0
149+
- pep8-naming==0.15.1
147150
- repo: https://github.com/PyCQA/isort
148-
rev: 8.0.0
151+
rev: 8.0.1
149152
hooks:
150153
- id: isort
151154
- repo: https://github.com/pre-commit/mirrors-mypy
@@ -157,6 +160,22 @@ repos:
157160
hooks:
158161
- id: pip-audit
159162
args:
163+
# We have to ignore this vulnerability for now since an
164+
# update for pygments has not yet been released.
165+
#
166+
# In any event, this vulnerability is unlikely to cause us
167+
# any problems since we don't feed any regexes to pygments
168+
# directly. pygments is pulled in as a dependency of
169+
# pytest.
170+
#
171+
# See also:
172+
# - https://nvd.nist.gov/vuln/detail/CVE-2026-4539
173+
# - https://github.com/pygments/pygments/issues/3058
174+
#
175+
# TODO: Remove this when it becomes possible. See
176+
# cisagov/skeleton-generic#257 for more details.
177+
- --ignore-vuln
178+
- CVE-2026-4539
160179
# Add any pip requirements files to scan
161180
- --requirement
162181
- requirements-dev.txt
@@ -177,6 +196,9 @@ repos:
177196

178197
# Ansible hooks
179198
- repo: https://github.com/ansible/ansible-lint
199+
# We need to stay on this version because we are still using Python 3.13 in
200+
# our GitHub Actions configuration. Later versions require Python 3.14 for
201+
# the hook to run.
180202
rev: v26.1.1
181203
hooks:
182204
- id: ansible-lint
@@ -207,6 +229,15 @@ repos:
207229
hooks:
208230
- id: terraform_fmt
209231
- id: terraform_validate
232+
# This needs to run after the terraform_validate hook so that any Terraform
233+
# configurations are initialized.
234+
- id: terraform_providers_lock
235+
args:
236+
- --args=-platform=darwin_amd64
237+
- --args=-platform=darwin_arm64
238+
- --args=-platform=linux_amd64
239+
- --args=-platform=linux_arm64
240+
- --hook-config=--mode=always-regenerate-lockfile
210241

211242
# Docker hooks
212243
- repo: https://github.com/IamTheFij/docker-pre-commit

examples/basic_usage/.terraform.lock.hcl

Lines changed: 19 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)