Skip to content

Commit f9b3aef

Browse files
author
jsf9k
committed
# Conflicts: # .github/CODEOWNERS # .github/workflows/build.yml # .pre-commit-config.yaml # setup.py # src/example/example.py # tests/test_example.py
2 parents 917b9bb + 0da26c3 commit f9b3aef

12 files changed

+576
-108
lines changed

.github/CODEOWNERS

+17-13
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,26 @@
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+
<<<<<<< HEAD
67
* @dav3r @felddy @IanLee1521 @jasonodoom @jsf9k @mcdonnnj
8+
=======
9+
* @dav3r @felddy @jsf9k @mcdonnnj
10+
>>>>>>> 0da26c3a45b9a9c2a7d41ed2687b177a6f597116
711

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

1216
# 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
17+
/.ansible-lint @dav3r @felddy @jsf9k @mcdonnnj
18+
/.bandit.yml @dav3r @felddy @jsf9k @mcdonnnj
19+
/.flake8 @dav3r @felddy @jsf9k @mcdonnnj
20+
/.isort.cfg @dav3r @felddy @jsf9k @mcdonnnj
21+
/.mdl_config.yaml @dav3r @felddy @jsf9k @mcdonnnj
22+
/.pre-commit-config.yaml @dav3r @felddy @jsf9k @mcdonnnj
23+
/.prettierignore @dav3r @felddy @jsf9k @mcdonnnj
24+
/.yamllint @dav3r @felddy @jsf9k @mcdonnnj
25+
/requirements.txt @dav3r @felddy @jsf9k @mcdonnnj
26+
/requirements-dev.txt @dav3r @felddy @jsf9k @mcdonnnj
27+
/requirements-test.txt @dav3r @felddy @jsf9k @mcdonnnj
28+
/setup-env @dav3r @felddy @jsf9k @mcdonnnj

.github/dependabot.yml

+3
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

+73-27
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
@@ -78,7 +92,7 @@ jobs:
7892
name: Lookup Go cache directory
7993
run: |
8094
echo "dir=$(go env GOCACHE)" >> $GITHUB_OUTPUT
81-
- uses: actions/cache@v3
95+
- uses: actions/cache@v4
8296
env:
8397
BASE_CACHE_KEY: "${{ github.job }}-${{ runner.os }}-\
8498
py${{ steps.setup-python.outputs.python-version }}-\
@@ -103,25 +117,12 @@ jobs:
103117
path: |
104118
${{ env.PIP_CACHE_DIR }}
105119
${{ env.PRE_COMMIT_CACHE_DIR }}
106-
${{ env.CURL_CACHE_DIR }}
107120
${{ steps.go-cache.outputs.dir }}
108121
restore-keys: |
109122
${{ env.BASE_CACHE_KEY }}
110-
- name: Setup curl cache
111-
run: mkdir -p ${{ env.CURL_CACHE_DIR }}
112-
- name: Install Packer
113-
env:
114-
PACKER_VERSION: ${{ steps.setup-env.outputs.packer-version }}
115-
run: |
116-
PACKER_ZIP="packer_${PACKER_VERSION}_linux_amd64.zip"
117-
curl --output ${{ env.CURL_CACHE_DIR }}/"${PACKER_ZIP}" \
118-
--time-cond ${{ env.CURL_CACHE_DIR }}/"${PACKER_ZIP}" \
119-
--location \
120-
"https://releases.hashicorp.com/packer/${PACKER_VERSION}/${PACKER_ZIP}"
121-
sudo unzip -d /opt/packer \
122-
${{ env.CURL_CACHE_DIR }}/"${PACKER_ZIP}"
123-
sudo mv /usr/local/bin/packer /usr/local/bin/packer-default
124-
sudo ln -s /opt/packer/packer /usr/local/bin/packer
123+
- uses: hashicorp/setup-packer@v3
124+
with:
125+
version: ${{ steps.setup-env.outputs.packer-version }}
125126
- uses: hashicorp/setup-terraform@v3
126127
with:
127128
terraform_version: ${{ steps.setup-env.outputs.terraform-version }}
@@ -177,18 +178,29 @@ jobs:
177178
name: test source - py${{ matrix.python-version }}
178179
needs:
179180
- diagnostics
181+
permissions:
182+
# actions/checkout needs this to fetch code
183+
contents: read
180184
runs-on: ubuntu-latest
181185
strategy:
182186
fail-fast: false
183187
matrix:
184188
python-version:
185-
- "3.7"
186-
- "3.8"
187189
- "3.9"
188190
- "3.10"
191+
<<<<<<< HEAD
189192
# - "3.11"
190193
# - "3.12"
194+
=======
195+
- "3.11"
196+
- "3.12"
197+
- "3.13"
198+
>>>>>>> 0da26c3a45b9a9c2a7d41ed2687b177a6f597116
191199
steps:
200+
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
201+
with:
202+
# Uses the organization variable unless overridden
203+
config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
192204
- id: harden-runner
193205
name: Harden the runner
194206
uses: step-security/harden-runner@v2
@@ -199,7 +211,7 @@ jobs:
199211
uses: actions/setup-python@v5
200212
with:
201213
python-version: ${{ matrix.python-version }}
202-
- uses: actions/cache@v3
214+
- uses: actions/cache@v4
203215
env:
204216
BASE_CACHE_KEY: "${{ github.job }}-${{ runner.os }}-\
205217
py${{ steps.setup-python.outputs.python-version }}-"
@@ -234,11 +246,18 @@ jobs:
234246
uses: mxschmitt/action-tmate@v3
235247
if: env.RUN_TMATE
236248
coveralls-finish:
249+
permissions:
250+
# actions/checkout needs this to fetch code
251+
contents: read
237252
runs-on: ubuntu-latest
238253
needs:
239254
- diagnostics
240255
- test
241256
steps:
257+
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
258+
with:
259+
# Uses the organization variable unless overridden
260+
config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
242261
- id: harden-runner
243262
name: Harden the runner
244263
uses: step-security/harden-runner@v2
@@ -250,10 +269,15 @@ jobs:
250269
- id: setup-python
251270
uses: actions/setup-python@v5
252271
with:
272+
<<<<<<< HEAD
253273
# python-version: ${{ steps.setup-env.outputs.python-version }}
254274
# This project cannot currently support Python 3.11 or 3.12.
255275
python-version: "3.10"
256276
- uses: actions/cache@v3
277+
=======
278+
python-version: ${{ steps.setup-env.outputs.python-version }}
279+
- uses: actions/cache@v4
280+
>>>>>>> 0da26c3a45b9a9c2a7d41ed2687b177a6f597116
257281
env:
258282
BASE_CACHE_KEY: "${{ github.job }}-${{ runner.os }}-\
259283
py${{ steps.setup-python.outputs.python-version }}-"
@@ -285,18 +309,29 @@ jobs:
285309
- diagnostics
286310
- lint
287311
- test
312+
permissions:
313+
# actions/checkout needs this to fetch code
314+
contents: read
288315
runs-on: ubuntu-latest
289316
strategy:
290317
fail-fast: false
291318
matrix:
292319
python-version:
293-
- "3.7"
294-
- "3.8"
295320
- "3.9"
296321
- "3.10"
322+
<<<<<<< HEAD
297323
# - "3.11"
298324
# - "3.12"
325+
=======
326+
- "3.11"
327+
- "3.12"
328+
- "3.13"
329+
>>>>>>> 0da26c3a45b9a9c2a7d41ed2687b177a6f597116
299330
steps:
331+
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
332+
with:
333+
# Uses the organization variable unless overridden
334+
config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
300335
- id: harden-runner
301336
name: Harden the runner
302337
uses: step-security/harden-runner@v2
@@ -307,7 +342,7 @@ jobs:
307342
uses: actions/setup-python@v5
308343
with:
309344
python-version: ${{ matrix.python-version }}
310-
- uses: actions/cache@v3
345+
- uses: actions/cache@v4
311346
env:
312347
BASE_CACHE_KEY: "${{ github.job }}-${{ runner.os }}-\
313348
py${{ steps.setup-python.outputs.python-version }}-"
@@ -340,18 +375,29 @@ jobs:
340375
needs:
341376
- diagnostics
342377
- build
378+
permissions:
379+
# actions/checkout needs this to fetch code
380+
contents: read
343381
runs-on: ubuntu-latest
344382
strategy:
345383
fail-fast: false
346384
matrix:
347385
python-version:
348-
- "3.7"
349-
- "3.8"
350386
- "3.9"
351387
- "3.10"
388+
<<<<<<< HEAD
352389
# - "3.11"
353390
# - "3.12"
391+
=======
392+
- "3.11"
393+
- "3.12"
394+
- "3.13"
395+
>>>>>>> 0da26c3a45b9a9c2a7d41ed2687b177a6f597116
354396
steps:
397+
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
398+
with:
399+
# Uses the organization variable unless overridden
400+
config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
355401
- id: harden-runner
356402
name: Harden the runner
357403
uses: step-security/harden-runner@v2
@@ -362,7 +408,7 @@ jobs:
362408
uses: actions/setup-python@v5
363409
with:
364410
python-version: ${{ matrix.python-version }}
365-
- uses: actions/cache@v3
411+
- uses: actions/cache@v4
366412
env:
367413
BASE_CACHE_KEY: "${{ github.job }}-${{ runner.os }}-\
368414
py${{ steps.setup-python.outputs.python-version }}-"

.github/workflows/codeql-analysis.yml

+15-1
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,18 @@ on:
2222
jobs:
2323
diagnostics:
2424
name: Run diagnostics
25+
# This job does not need any permissions
26+
permissions: {}
2527
runs-on: ubuntu-latest
2628
steps:
2729
# Note that a duplicate of this step must be added at the top of
2830
# each job.
31+
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
32+
with:
33+
# Uses the organization variable unless overridden
34+
config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
35+
# Note that a duplicate of this step must be added at the top of
36+
# each job.
2937
- id: harden-runner
3038
name: Harden the runner
3139
uses: step-security/harden-runner@v2
@@ -41,10 +49,12 @@ jobs:
4149
name: Analyze
4250
needs:
4351
- diagnostics
44-
runs-on: ubuntu-latest
4552
permissions:
53+
# actions/checkout needs this to fetch code
54+
contents: read
4655
# required for all workflows
4756
security-events: write
57+
runs-on: ubuntu-latest
4858
strategy:
4959
fail-fast: false
5060
matrix:
@@ -56,6 +66,10 @@ jobs:
5666
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
5767

5868
steps:
69+
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
70+
with:
71+
# Uses the organization variable unless overridden
72+
config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
5973
- id: harden-runner
6074
name: Harden the runner
6175
uses: step-security/harden-runner@v2

.github/workflows/sync-labels.yml

+16-3
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

0 commit comments

Comments
 (0)