Skip to content

Commit 8488e0b

Browse files
author
mcdonnnj
committed
# Conflicts: # README.md # variables.tf
2 parents 565085c + e7315c0 commit 8488e0b

File tree

11 files changed

+188
-96
lines changed

11 files changed

+188
-96
lines changed

.github/CODEOWNERS

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@
33
# These owners will be the default owners for everything in the
44
# repo. Unless a later match takes precedence, these owners will be
55
# requested for review when someone opens a pull request.
6-
* @dav3r @felddy @jasonodoom @jsf9k @mcdonnnj
6+
* @dav3r @felddy @jsf9k @mcdonnnj
77

88
# These folks own any files in the .github directory at the root of
99
# the repository and any of its subdirectories.
10-
/.github/ @dav3r @felddy @jasonodoom @jsf9k @mcdonnnj
10+
/.github/ @dav3r @felddy @jsf9k @mcdonnnj
1111

1212
# These folks own all linting configuration files.
13-
/.ansible-lint @dav3r @felddy @jasonodoom @jsf9k @mcdonnnj
14-
/.bandit.yml @dav3r @felddy @jasonodoom @jsf9k @mcdonnnj
15-
/.flake8 @dav3r @felddy @jasonodoom @jsf9k @mcdonnnj
16-
/.isort.cfg @dav3r @felddy @jasonodoom @jsf9k @mcdonnnj
17-
/.mdl_config.yaml @dav3r @felddy @jasonodoom @jsf9k @mcdonnnj
18-
/.pre-commit-config.yaml @dav3r @felddy @jasonodoom @jsf9k @mcdonnnj
19-
/.prettierignore @dav3r @felddy @jasonodoom @jsf9k @mcdonnnj
20-
/.yamllint @dav3r @felddy @jasonodoom @jsf9k @mcdonnnj
21-
/requirements.txt @dav3r @felddy @jasonodoom @jsf9k @mcdonnnj
22-
/requirements-dev.txt @dav3r @felddy @jasonodoom @jsf9k @mcdonnnj
23-
/requirements-test.txt @dav3r @felddy @jasonodoom @jsf9k @mcdonnnj
24-
/setup-env @dav3r @felddy @jasonodoom @jsf9k @mcdonnnj
13+
/.ansible-lint @dav3r @felddy @jsf9k @mcdonnnj
14+
/.bandit.yml @dav3r @felddy @jsf9k @mcdonnnj
15+
/.flake8 @dav3r @felddy @jsf9k @mcdonnnj
16+
/.isort.cfg @dav3r @felddy @jsf9k @mcdonnnj
17+
/.mdl_config.yaml @dav3r @felddy @jsf9k @mcdonnnj
18+
/.pre-commit-config.yaml @dav3r @felddy @jsf9k @mcdonnnj
19+
/.prettierignore @dav3r @felddy @jsf9k @mcdonnnj
20+
/.yamllint @dav3r @felddy @jsf9k @mcdonnnj
21+
/requirements.txt @dav3r @felddy @jsf9k @mcdonnnj
22+
/requirements-dev.txt @dav3r @felddy @jsf9k @mcdonnnj
23+
/requirements-test.txt @dav3r @felddy @jsf9k @mcdonnnj
24+
/setup-env @dav3r @felddy @jsf9k @mcdonnnj

.github/dependabot.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@ updates:
1313
- dependency-name: actions/checkout
1414
- dependency-name: actions/setup-go
1515
- dependency-name: actions/setup-python
16+
- dependency-name: cisagov/setup-env-github-action
1617
- dependency-name: crazy-max/ghaction-dump-context
1718
- dependency-name: crazy-max/ghaction-github-labeler
1819
- dependency-name: crazy-max/ghaction-github-status
20+
- dependency-name: GitHubSecurityLab/actions-permissions
21+
- dependency-name: hashicorp/setup-packer
1922
- dependency-name: hashicorp/setup-terraform
2023
- dependency-name: mxschmitt/action-tmate
2124
- dependency-name: step-security/harden-runner

.github/workflows/build.yml

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ defaults:
2020
shell: bash -Eueo pipefail -x {0}
2121

2222
env:
23-
CURL_CACHE_DIR: ~/.cache/curl
2423
PIP_CACHE_DIR: ~/.cache/pip
2524
PRE_COMMIT_CACHE_DIR: ~/.cache/pre-commit
2625
RUN_TMATE: ${{ secrets.RUN_TMATE }}
@@ -31,10 +30,18 @@ env:
3130
jobs:
3231
diagnostics:
3332
name: Run diagnostics
33+
# This job does not need any permissions
34+
permissions: {}
3435
runs-on: ubuntu-latest
3536
steps:
3637
# Note that a duplicate of this step must be added at the top of
3738
# each job.
39+
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
40+
with:
41+
# Uses the organization variable unless overridden
42+
config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
43+
# Note that a duplicate of this step must be added at the top of
44+
# each job.
3845
- id: harden-runner
3946
name: Harden the runner
4047
uses: step-security/harden-runner@v2
@@ -49,8 +56,15 @@ jobs:
4956
lint:
5057
needs:
5158
- diagnostics
59+
permissions:
60+
# actions/checkout needs this to fetch code
61+
contents: read
5262
runs-on: ubuntu-latest
5363
steps:
64+
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
65+
with:
66+
# Uses the organization variable unless overridden
67+
config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
5468
- id: harden-runner
5569
name: Harden the runner
5670
uses: step-security/harden-runner@v2
@@ -76,7 +90,7 @@ jobs:
7690
name: Lookup Go cache directory
7791
run: |
7892
echo "dir=$(go env GOCACHE)" >> $GITHUB_OUTPUT
79-
- uses: actions/cache@v3
93+
- uses: actions/cache@v4
8094
env:
8195
BASE_CACHE_KEY: "${{ github.job }}-${{ runner.os }}-\
8296
py${{ steps.setup-python.outputs.python-version }}-\
@@ -97,25 +111,12 @@ jobs:
97111
path: |
98112
${{ env.PIP_CACHE_DIR }}
99113
${{ env.PRE_COMMIT_CACHE_DIR }}
100-
${{ env.CURL_CACHE_DIR }}
101114
${{ steps.go-cache.outputs.dir }}
102115
restore-keys: |
103116
${{ env.BASE_CACHE_KEY }}
104-
- name: Setup curl cache
105-
run: mkdir -p ${{ env.CURL_CACHE_DIR }}
106-
- name: Install Packer
107-
env:
108-
PACKER_VERSION: ${{ steps.setup-env.outputs.packer-version }}
109-
run: |
110-
PACKER_ZIP="packer_${PACKER_VERSION}_linux_amd64.zip"
111-
curl --output ${{ env.CURL_CACHE_DIR }}/"${PACKER_ZIP}" \
112-
--time-cond ${{ env.CURL_CACHE_DIR }}/"${PACKER_ZIP}" \
113-
--location \
114-
"https://releases.hashicorp.com/packer/${PACKER_VERSION}/${PACKER_ZIP}"
115-
sudo unzip -d /opt/packer \
116-
${{ env.CURL_CACHE_DIR }}/"${PACKER_ZIP}"
117-
sudo mv /usr/local/bin/packer /usr/local/bin/packer-default
118-
sudo ln -s /opt/packer/packer /usr/local/bin/packer
117+
- uses: hashicorp/setup-packer@v3
118+
with:
119+
version: ${{ steps.setup-env.outputs.packer-version }}
119120
- uses: hashicorp/setup-terraform@v3
120121
with:
121122
terraform_version: ${{ steps.setup-env.outputs.terraform-version }}

.github/workflows/sync-labels.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,36 @@ name: sync-labels
44
on:
55
push:
66
paths:
7-
- '.github/labels.yml'
8-
- '.github/workflows/sync-labels.yml'
7+
- .github/labels.yml
8+
- .github/workflows/sync-labels.yml
9+
workflow_dispatch:
910

1011
permissions:
1112
contents: read
1213

1314
jobs:
1415
diagnostics:
1516
name: Run diagnostics
17+
# This job does not need any permissions
18+
permissions: {}
1619
runs-on: ubuntu-latest
1720
steps:
1821
# Note that a duplicate of this step must be added at the top of
1922
# each job.
23+
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
24+
with:
25+
# Uses the organization variable unless overridden
26+
config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
27+
# Note that a duplicate of this step must be added at the top of
28+
# each job.
2029
- id: harden-runner
2130
name: Harden the runner
2231
uses: step-security/harden-runner@v2
2332
with:
2433
egress-policy: audit
2534
- id: github-status
2635
name: Check GitHub status
27-
uses: crazy-max/ghaction-github-status@v3
36+
uses: crazy-max/ghaction-github-status@v4
2837
- id: dump-context
2938
name: Dump context
3039
uses: crazy-max/ghaction-dump-context@v2
@@ -38,6 +47,10 @@ jobs:
3847
issues: write
3948
runs-on: ubuntu-latest
4049
steps:
50+
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
51+
with:
52+
# Uses the organization variable unless overridden
53+
config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
4154
- id: harden-runner
4255
name: Harden the runner
4356
uses: step-security/harden-runner@v2

.pre-commit-config.yaml

Lines changed: 49 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,30 @@ default_language_version:
44
python: python3
55

66
repos:
7+
# Check the pre-commit configuration
8+
- repo: meta
9+
hooks:
10+
- id: check-useless-excludes
11+
712
- repo: https://github.com/pre-commit/pre-commit-hooks
8-
rev: v4.6.0
13+
rev: v5.0.0
914
hooks:
1015
- id: check-case-conflict
1116
- id: check-executables-have-shebangs
1217
- id: check-json
1318
- id: check-merge-conflict
19+
- id: check-shebang-scripts-are-executable
20+
- id: check-symlinks
1421
- id: check-toml
22+
- id: check-vcs-permalinks
1523
- id: check-xml
1624
- id: debug-statements
25+
- id: destroyed-symlinks
1726
- id: detect-aws-credentials
1827
args:
1928
- --allow-missing-credentials
2029
- id: detect-private-key
2130
- id: end-of-file-fixer
22-
exclude: files/(issue|motd)
2331
- id: mixed-line-ending
2432
args:
2533
- --fix=lf
@@ -31,22 +39,15 @@ repos:
3139

3240
# Text file hooks
3341
- repo: https://github.com/igorshubovych/markdownlint-cli
34-
rev: v0.41.0
42+
rev: v0.42.0
3543
hooks:
3644
- id: markdownlint
3745
args:
3846
- --config=.mdl_config.yaml
39-
- repo: https://github.com/pre-commit/mirrors-prettier
40-
# This is the last version of v3 available from the mirror. We should hold
41-
# here until v4, which is currently in alpha, is more stable.
42-
rev: v3.1.0
47+
- repo: https://github.com/rbubley/mirrors-prettier
48+
rev: v3.3.3
4349
hooks:
4450
- id: prettier
45-
# This is the latest version of v3 available from NPM. The pre-commit
46-
# mirror does not pull tags for old major versions once a new major
47-
# version tag is published.
48-
additional_dependencies:
49-
5051
- repo: https://github.com/adrienverge/yamllint
5152
rev: v1.35.1
5253
hooks:
@@ -56,40 +57,40 @@ repos:
5657

5758
# GitHub Actions hooks
5859
- repo: https://github.com/python-jsonschema/check-jsonschema
59-
rev: 0.28.4
60+
rev: 0.29.4
6061
hooks:
6162
- id: check-github-actions
6263
- id: check-github-workflows
6364

6465
# pre-commit hooks
6566
- repo: https://github.com/pre-commit/pre-commit
66-
rev: v3.7.1
67+
rev: v4.0.1
6768
hooks:
6869
- id: validate_manifest
6970

7071
# Go hooks
7172
- repo: https://github.com/TekWizely/pre-commit-golang
7273
rev: v1.0.0-rc.1
7374
hooks:
74-
# Style Checkers
75-
- id: go-critic
76-
# StaticCheck
77-
- id: go-staticcheck-repo-mod
7875
# Go Build
7976
- id: go-build-repo-mod
77+
# Style Checkers
78+
- id: go-critic
79+
# goimports
80+
- id: go-imports-repo
81+
args:
82+
# Write changes to files
83+
- -w
8084
# Go Mod Tidy
8185
- id: go-mod-tidy-repo
86+
# GoSec
87+
- id: go-sec-repo-mod
88+
# StaticCheck
89+
- id: go-staticcheck-repo-mod
8290
# Go Test
8391
- id: go-test-repo-mod
8492
# Go Vet
8593
- id: go-vet-repo-mod
86-
# GoSec
87-
- id: go-sec-repo-mod
88-
# goimports
89-
- id: go-imports-repo
90-
args:
91-
# Write changes to files
92-
- -w
9394
# Nix hooks
9495
- repo: https://github.com/nix-community/nixpkgs-fmt
9596
rev: v1.3.0
@@ -98,7 +99,7 @@ repos:
9899

99100
# Shell script hooks
100101
- repo: https://github.com/scop/pre-commit-shfmt
101-
rev: v3.8.0-1
102+
rev: v3.10.0-1
102103
hooks:
103104
- id: shfmt
104105
args:
@@ -122,37 +123,49 @@ repos:
122123

123124
# Python hooks
124125
- repo: https://github.com/PyCQA/bandit
125-
rev: 1.7.8
126+
rev: 1.7.10
126127
hooks:
127128
- id: bandit
128129
args:
129130
- --config=.bandit.yml
130131
- repo: https://github.com/psf/black-pre-commit-mirror
131-
rev: 24.4.2
132+
rev: 24.10.0
132133
hooks:
133134
- id: black
134135
- repo: https://github.com/PyCQA/flake8
135-
rev: 7.0.0
136+
rev: 7.1.1
136137
hooks:
137138
- id: flake8
138139
additional_dependencies:
139-
- flake8-docstrings
140+
- flake8-docstrings==1.7.0
140141
- repo: https://github.com/PyCQA/isort
141142
rev: 5.13.2
142143
hooks:
143144
- id: isort
144145
- repo: https://github.com/pre-commit/mirrors-mypy
145-
rev: v1.10.0
146+
rev: v1.13.0
146147
hooks:
147148
- id: mypy
149+
- repo: https://github.com/pypa/pip-audit
150+
rev: v2.7.3
151+
hooks:
152+
- id: pip-audit
153+
args:
154+
# Add any pip requirements files to scan
155+
- --requirement
156+
- requirements-dev.txt
157+
- --requirement
158+
- requirements-test.txt
159+
- --requirement
160+
- requirements.txt
148161
- repo: https://github.com/asottile/pyupgrade
149-
rev: v3.15.2
162+
rev: v3.19.0
150163
hooks:
151164
- id: pyupgrade
152165

153166
# Ansible hooks
154167
- repo: https://github.com/ansible/ansible-lint
155-
rev: v24.6.0
168+
rev: v24.9.2
156169
hooks:
157170
- id: ansible-lint
158171
additional_dependencies:
@@ -177,7 +190,7 @@ repos:
177190

178191
# Terraform hooks
179192
- repo: https://github.com/antonbabenko/pre-commit-terraform
180-
rev: v1.90.0
193+
rev: v1.96.1
181194
hooks:
182195
- id: terraform_fmt
183196
- id: terraform_validate
@@ -190,7 +203,7 @@ repos:
190203

191204
# Packer hooks
192205
- repo: https://github.com/cisagov/pre-commit-packer
193-
rev: v0.0.2
206+
rev: v0.3.0
194207
hooks:
195-
- id: packer_validate
196208
- id: packer_fmt
209+
- id: packer_validate

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,11 @@ This meta-role requires a permission policy similar to the following:
7676

7777
| Name | Version |
7878
|------|---------|
79+
<<<<<<< HEAD
7980
| terraform | ~> 1.0 |
81+
=======
82+
| terraform | >= 1.1 |
83+
>>>>>>> e7315c0847178b2a4c84184526691afcccc5664a
8084
| aws | >= 4.9 |
8185
8286
## Providers ##

0 commit comments

Comments
 (0)