Skip to content

Commit 3e6e3bc

Browse files
authored
Merge pull request #203 from cisagov/feature/add-dependency-review-action-to-lint-job
Add a workflow to run `actions/dependency-review-action`
2 parents dad12c0 + 3679b7d commit 3e6e3bc

File tree

2 files changed

+86
-0
lines changed

2 files changed

+86
-0
lines changed

.github/dependabot.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ updates:
1111
# # Managed by cisagov/skeleton-generic
1212
# - dependency-name: actions/cache
1313
# - dependency-name: actions/checkout
14+
# - dependency-name: actions/dependency-review-action
1415
# - dependency-name: actions/setup-go
1516
# - dependency-name: actions/setup-python
1617
# - dependency-name: cisagov/action-job-preamble
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
---
2+
name: Dependency review
3+
4+
on: # yamllint disable-line rule:truthy
5+
merge_group:
6+
types:
7+
- checks_requested
8+
pull_request:
9+
10+
# Set a default shell for any run steps. The `-Eueo pipefail` sets errtrace,
11+
# nounset, errexit, and pipefail. The `-x` will print all commands as they are
12+
# run. Please see the GitHub Actions documentation for more information:
13+
# https://docs.github.com/en/actions/using-jobs/setting-default-values-for-jobs
14+
defaults:
15+
run:
16+
shell: bash -Eueo pipefail -x {0}
17+
18+
jobs:
19+
diagnostics:
20+
name: Run diagnostics
21+
# This job does not need any permissions
22+
permissions: {}
23+
runs-on: ubuntu-latest
24+
steps:
25+
# Note that a duplicate of this step must be added at the top of
26+
# each job.
27+
- name: Apply standard cisagov job preamble
28+
uses: cisagov/action-job-preamble@v1
29+
with:
30+
check_github_status: "true"
31+
# This functionality is poorly implemented and has been
32+
# causing a lot of problems due to the MITM implementation
33+
# hogging or leaking memory, so we disable it for now.
34+
monitor_permissions: "false"
35+
output_workflow_context: "true"
36+
# Use a variable to specify the permissions monitoring
37+
# configuration. By default this will yield the
38+
# configuration stored in the cisagov organization-level
39+
# variable, but if you want to use a different configuration
40+
# then simply:
41+
# 1. Create a repository-level variable with the name
42+
# ACTIONS_PERMISSIONS_CONFIG.
43+
# 2. Set this new variable's value to the configuration you
44+
# want to use for this repository.
45+
#
46+
# Note in particular that changing the permissions
47+
# monitoring configuration *does not* require you to modify
48+
# this workflow.
49+
permissions_monitoring_config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
50+
dependency-review:
51+
name: Dependency review
52+
needs:
53+
- diagnostics
54+
permissions:
55+
# actions/checkout needs this to fetch code
56+
contents: read
57+
runs-on: ubuntu-latest
58+
steps:
59+
- name: Apply standard cisagov job preamble
60+
uses: cisagov/action-job-preamble@v1
61+
with:
62+
# This functionality is poorly implemented and has been
63+
# causing a lot of problems due to the MITM implementation
64+
# hogging or leaking memory, so we disable it for now.
65+
monitor_permissions: "false"
66+
# Use a variable to specify the permissions monitoring
67+
# configuration. By default this will yield the
68+
# configuration stored in the cisagov organization-level
69+
# variable, but if you want to use a different configuration
70+
# then simply:
71+
# 1. Create a repository-level variable with the name
72+
# ACTIONS_PERMISSIONS_CONFIG.
73+
# 2. Set this new variable's value to the configuration you
74+
# want to use for this repository.
75+
#
76+
# Note in particular that changing the permissions
77+
# monitoring configuration *does not* require you to modify
78+
# this workflow.
79+
permissions_monitoring_config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
80+
- id: checkout-repo
81+
name: Checkout the repository
82+
uses: actions/checkout@v4
83+
- id: dependency-review
84+
name: Review dependency changes for vulnerabilities and license changes
85+
uses: actions/dependency-review-action@v4

0 commit comments

Comments
 (0)