Skip to content

Commit 78bf12d

Browse files
authored
Merge pull request #46 from cisagov/lineage/skeleton
⚠️ CONFLICT! Lineage pull request for: skeleton
2 parents b40b5b8 + 145e3ed commit 78bf12d

File tree

12 files changed

+258
-124
lines changed

12 files changed

+258
-124
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: 54 additions & 28 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 }}-\
@@ -101,25 +115,12 @@ jobs:
101115
path: |
102116
${{ env.PIP_CACHE_DIR }}
103117
${{ env.PRE_COMMIT_CACHE_DIR }}
104-
${{ env.CURL_CACHE_DIR }}
105118
${{ steps.go-cache.outputs.dir }}
106119
restore-keys: |
107120
${{ env.BASE_CACHE_KEY }}
108-
- name: Setup curl cache
109-
run: mkdir -p ${{ env.CURL_CACHE_DIR }}
110-
- name: Install Packer
111-
env:
112-
PACKER_VERSION: ${{ steps.setup-env.outputs.packer-version }}
113-
run: |
114-
PACKER_ZIP="packer_${PACKER_VERSION}_linux_amd64.zip"
115-
curl --output ${{ env.CURL_CACHE_DIR }}/"${PACKER_ZIP}" \
116-
--time-cond ${{ env.CURL_CACHE_DIR }}/"${PACKER_ZIP}" \
117-
--location \
118-
"https://releases.hashicorp.com/packer/${PACKER_VERSION}/${PACKER_ZIP}"
119-
sudo unzip -d /opt/packer \
120-
${{ env.CURL_CACHE_DIR }}/"${PACKER_ZIP}"
121-
sudo mv /usr/local/bin/packer /usr/local/bin/packer-default
122-
sudo ln -s /opt/packer/packer /usr/local/bin/packer
121+
- uses: hashicorp/setup-packer@v3
122+
with:
123+
version: ${{ steps.setup-env.outputs.packer-version }}
123124
- uses: hashicorp/setup-terraform@v3
124125
with:
125126
terraform_version: ${{ steps.setup-env.outputs.terraform-version }}
@@ -175,18 +176,24 @@ jobs:
175176
name: test source - py${{ matrix.python-version }}
176177
needs:
177178
- diagnostics
179+
permissions:
180+
# actions/checkout needs this to fetch code
181+
contents: read
178182
runs-on: ubuntu-latest
179183
strategy:
180184
fail-fast: false
181185
matrix:
182186
python-version:
183-
- "3.7"
184-
- "3.8"
185187
- "3.9"
186188
- "3.10"
187189
- "3.11"
188190
- "3.12"
191+
- "3.13"
189192
steps:
193+
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
194+
with:
195+
# Uses the organization variable unless overridden
196+
config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
190197
- id: harden-runner
191198
name: Harden the runner
192199
uses: step-security/harden-runner@v2
@@ -197,7 +204,7 @@ jobs:
197204
uses: actions/setup-python@v5
198205
with:
199206
python-version: ${{ matrix.python-version }}
200-
- uses: actions/cache@v3
207+
- uses: actions/cache@v4
201208
env:
202209
BASE_CACHE_KEY: "${{ github.job }}-${{ runner.os }}-\
203210
py${{ steps.setup-python.outputs.python-version }}-"
@@ -232,11 +239,18 @@ jobs:
232239
uses: mxschmitt/action-tmate@v3
233240
if: env.RUN_TMATE
234241
coveralls-finish:
242+
permissions:
243+
# actions/checkout needs this to fetch code
244+
contents: read
235245
runs-on: ubuntu-latest
236246
needs:
237247
- diagnostics
238248
- test
239249
steps:
250+
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
251+
with:
252+
# Uses the organization variable unless overridden
253+
config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
240254
- id: harden-runner
241255
name: Harden the runner
242256
uses: step-security/harden-runner@v2
@@ -249,7 +263,7 @@ jobs:
249263
uses: actions/setup-python@v5
250264
with:
251265
python-version: ${{ steps.setup-env.outputs.python-version }}
252-
- uses: actions/cache@v3
266+
- uses: actions/cache@v4
253267
env:
254268
BASE_CACHE_KEY: "${{ github.job }}-${{ runner.os }}-\
255269
py${{ steps.setup-python.outputs.python-version }}-"
@@ -281,18 +295,24 @@ jobs:
281295
- diagnostics
282296
- lint
283297
- test
298+
permissions:
299+
# actions/checkout needs this to fetch code
300+
contents: read
284301
runs-on: ubuntu-latest
285302
strategy:
286303
fail-fast: false
287304
matrix:
288305
python-version:
289-
- "3.7"
290-
- "3.8"
291306
- "3.9"
292307
- "3.10"
293308
- "3.11"
294309
- "3.12"
310+
- "3.13"
295311
steps:
312+
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
313+
with:
314+
# Uses the organization variable unless overridden
315+
config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
296316
- id: harden-runner
297317
name: Harden the runner
298318
uses: step-security/harden-runner@v2
@@ -303,7 +323,7 @@ jobs:
303323
uses: actions/setup-python@v5
304324
with:
305325
python-version: ${{ matrix.python-version }}
306-
- uses: actions/cache@v3
326+
- uses: actions/cache@v4
307327
env:
308328
BASE_CACHE_KEY: "${{ github.job }}-${{ runner.os }}-\
309329
py${{ steps.setup-python.outputs.python-version }}-"
@@ -336,18 +356,24 @@ jobs:
336356
needs:
337357
- diagnostics
338358
- build
359+
permissions:
360+
# actions/checkout needs this to fetch code
361+
contents: read
339362
runs-on: ubuntu-latest
340363
strategy:
341364
fail-fast: false
342365
matrix:
343366
python-version:
344-
- "3.7"
345-
- "3.8"
346367
- "3.9"
347368
- "3.10"
348369
- "3.11"
349370
- "3.12"
371+
- "3.13"
350372
steps:
373+
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
374+
with:
375+
# Uses the organization variable unless overridden
376+
config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
351377
- id: harden-runner
352378
name: Harden the runner
353379
uses: step-security/harden-runner@v2
@@ -358,7 +384,7 @@ jobs:
358384
uses: actions/setup-python@v5
359385
with:
360386
python-version: ${{ matrix.python-version }}
361-
- uses: actions/cache@v3
387+
- uses: actions/cache@v4
362388
env:
363389
BASE_CACHE_KEY: "${{ github.job }}-${{ runner.os }}-\
364390
py${{ steps.setup-python.outputs.python-version }}-"

.github/workflows/codeql-analysis.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,29 +22,39 @@ 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
3240
with:
3341
egress-policy: audit
3442
- id: github-status
3543
name: Check GitHub status
36-
uses: crazy-max/ghaction-github-status@v3
44+
uses: crazy-max/ghaction-github-status@v4
3745
- id: dump-context
3846
name: Dump context
3947
uses: crazy-max/ghaction-dump-context@v2
4048
analyze:
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

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

0 commit comments

Comments
 (0)