Skip to content

Commit 236d7ca

Browse files
authored
ci: Additional githubaction configuration (hashicorp#3034)
- Pin action versions - Dependabot to notify about action updates - Update codeowners
1 parent 713c121 commit 236d7ca

16 files changed

+100
-99
lines changed

.github/dependabot.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Copyright (c) HashiCorp, Inc.
2+
# SPDX-License-Identifier: MPL-2.0
3+
4+
# See GitHub's docs for more information on this file:
5+
# https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/configuration-options-for-dependency-updates
6+
version: 2
7+
updates:
8+
# Maintain dependencies for GitHub Actions
9+
- package-ecosystem: "github-actions"
10+
directory: "/"
11+
schedule:
12+
# Check for updates to GitHub Actions every weekday
13+
interval: "daily"

.github/workflows/codeql-analysis.yml

+3-19
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414

1515
steps:
1616
- name: Checkout repository
17-
uses: actions/checkout@v2
17+
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
1818
with:
1919
# We must fetch at least the immediate parents so that if this is
2020
# a pull request then we can checkout the head.
@@ -27,26 +27,10 @@ jobs:
2727

2828
# Initializes the CodeQL tools for scanning.
2929
- name: Initialize CodeQL
30-
uses: github/codeql-action/init@v1
30+
uses: github/codeql-action/init@e00cd12e3ee0ce24d476645336a315351be51d88 # TSCCR: actions in subdirectories not yet supported: init
3131
# Override language selection by uncommenting this and choosing your languages
3232
with:
3333
languages: go, javascript
3434

35-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
36-
# If this step fails, then you should remove it and run the build manually (see below)
37-
# - name: Autobuild
38-
# uses: github/codeql-action/autobuild@v1
39-
40-
# ℹ️ Command-line programs to run using the OS shell.
41-
# 📚 https://git.io/JvXDl
42-
43-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
44-
# and modify them (or add more) to build your code if your project
45-
# uses a compiled language
46-
47-
#- run: |
48-
# make bootstrap
49-
# make release
50-
5135
- name: Perform CodeQL Analysis
52-
uses: github/codeql-action/analyze@v1
36+
uses: github/codeql-action/analyze@e00cd12e3ee0ce24d476645336a315351be51d88 # TSCCR: actions in subdirectories not yet supported: analyze

.github/workflows/enos-fmt.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ jobs:
1818
env:
1919
GITHUB_TOKEN: ${{ secrets.SERVICE_USER_GITHUB_TOKEN }}
2020
steps:
21-
- uses: actions/checkout@v3
22-
- uses: hashicorp/setup-terraform@v2
21+
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
22+
- uses: hashicorp/setup-terraform@633666f66e0061ca3b725c73b2ec20cd13a8fdd1 # TSCCR: could not find tsccr entry for hashicorp/setup-terraform
2323
with:
2424
terraform_wrapper: false
25-
- uses: hashicorp/action-setup-enos@v1
25+
- uses: hashicorp/action-setup-enos@v1 # TSCCR: could not find tsccr entry for hashicorp/action-setup-enos
2626
with:
2727
github-token: ${{ secrets.SERVICE_USER_GITHUB_TOKEN }}
2828
- name: "check formatting"

.github/workflows/enos-run.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,22 @@ jobs:
3434
GITHUB_TOKEN: ${{ secrets.SERVICE_USER_GITHUB_TOKEN }}
3535
steps:
3636
- name: Checkout
37-
uses: actions/checkout@v3
37+
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
3838
- name: Set up Go
39-
uses: actions/setup-go@v3
39+
uses: actions/setup-go@d0a58c1c4d2b25278816e339b944508c875f3613 # v3.4.0
4040
with:
4141
go-version: ${{ inputs.go-version }}
4242
- name: Install tools to get tparse
4343
run: make tools
4444
- name: Set up Terraform
45-
uses: hashicorp/setup-terraform@v2
45+
uses: hashicorp/setup-terraform@633666f66e0061ca3b725c73b2ec20cd13a8fdd1 # TSCCR: could not find tsccr entry for hashicorp/setup-terraform
4646
with:
4747
# the terraform wrapper will break Terraform execution in enos because
4848
# it changes the output to text when we expect it to be JSON.
4949
terraform_wrapper: false
5050
- name: Import GPG key for Boundary pass keystore
5151
id: import_gpg
52-
uses: crazy-max/ghaction-import-gpg@v5
52+
uses: crazy-max/ghaction-import-gpg@111c56156bcc6918c056dbef52164cfa583dc549 # TSCCR: could not find tsccr entry for crazy-max/ghaction-import-gpg
5353
with:
5454
gpg_private_key: ${{ secrets.ENOS_GPG_PRIVATE_KEY }}
5555
passphrase: ${{ secrets.ENOS_GPG_PASSPHRASE }}
@@ -60,7 +60,7 @@ jobs:
6060
echo "trusted-key ${{ secrets.ENOS_GPG_UID }}" >> ~/.gnupg/gpg.conf
6161
cat ~/.gnupg/gpg.conf
6262
- name: Configure AWS credentials
63-
uses: aws-actions/configure-aws-credentials@v1-node16
63+
uses: aws-actions/configure-aws-credentials@67fbcbb121271f7775d2e7715933280b06314838 # TSCCR: could not find tsccr entry for aws-actions/configure-aws-credentials
6464
with:
6565
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_CI }}
6666
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_CI }}
@@ -69,7 +69,7 @@ jobs:
6969
role-skip-session-tagging: true
7070
role-duration-seconds: 3600
7171
- name: Set up Enos
72-
uses: hashicorp/action-setup-enos@v1
72+
uses: hashicorp/action-setup-enos@v1 # TSCCR: could not find tsccr entry for hashicorp/action-setup-enos
7373
with:
7474
github-token: ${{ secrets.SERVICE_USER_GITHUB_TOKEN }}
7575
- name: Set up AWS SSH private key
@@ -79,7 +79,7 @@ jobs:
7979
chmod 600 ./enos/support/private_key.pem
8080
- name: Set up dependency cache
8181
id: dep-cache
82-
uses: actions/cache@v3
82+
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 # v3.2.4
8383
with:
8484
path: /tmp/test-deps
8585
key: enos-test-deps-password-store-1.7.4-vault-1.12.2
@@ -110,7 +110,7 @@ jobs:
110110
unzip /tmp/test-deps/vault.zip -d /usr/local/bin
111111
- name: Download Linux AMD64 Boundary bundle
112112
id: download
113-
uses: actions/download-artifact@v3
113+
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
114114
with:
115115
name: ${{ inputs.artifact-name }}
116116
path: ./enos/support/downloads
@@ -150,7 +150,7 @@ jobs:
150150
export ENOS_VAR_enos_user=$GITHUB_ACTOR && \
151151
enos scenario run --timeout 60m0s --chdir ./enos ${{ matrix.filter }}
152152
- name: Upload e2e tests output
153-
uses: actions/upload-artifact@v3
153+
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
154154
with:
155155
name: test-e2e-output.zip
156156
path: enos/test*.out

.github/workflows/jira.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ jobs:
2828
else
2929
echo "Actor ${{ github.actor }} is not a ${TEAM} team member"
3030
fi
31-
echo "role=${ROLE}" >> $GITHUB_OUTPUT
31+
echo "role=${ROLE}" >> "$GITHUB_OUTPUT"
3232
env:
3333
GITHUB_TOKEN: ${{ secrets.JIRA_SYNC_GITHUB_TOKEN }}
3434

3535
- name: Login
36-
uses: atlassian/gajira-login@v2.0.0
36+
uses: atlassian/gajira-login@ca13f8850ea309cf44a6e4e0c49d9aa48ac3ca4c # TSCCR: could not find tsccr entry for atlassian/gajira-login
3737
env:
3838
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
3939
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
@@ -44,14 +44,14 @@ jobs:
4444
id: set-ticket-type
4545
run: |
4646
if [[ "${{ github.event_name }}" == "pull_request_target" ]]; then
47-
echo "type=PR" >> $GITHUB_OUTPUT
47+
echo "type=PR" >> "$GITHUB_OUTPUT"
4848
else
49-
echo "type=ISS" >> $GITHUB_OUTPUT
49+
echo "type=ISS" >> "$GITHUB_OUTPUT"
5050
fi
5151
5252
- name: Create ticket
5353
if: github.event.action == 'opened' && !steps.boundary-team-role.outputs.role
54-
uses: tomhjp/gh-action-jira-create@v0.1.3
54+
uses: tomhjp/gh-action-jira-create@3ed1789cad3521292e591a7cfa703215ec1348bf # TSCCR: could not find tsccr entry for tomhjp/gh-action-jira-create
5555
with:
5656
project: ICU
5757
issuetype: "GH Issue"
@@ -63,28 +63,28 @@ jobs:
6363
- name: Search
6464
if: github.event.action != 'opened'
6565
id: search
66-
uses: tomhjp/gh-action-jira-search@v0.2.1
66+
uses: tomhjp/gh-action-jira-search@04700b457f317c3e341ce90da5a3ff4ce058f2fa # TSCCR: could not find tsccr entry for tomhjp/gh-action-jira-search
6767
with:
6868
# cf[10089] is Issue Link custom field
6969
jql: 'issuetype = "GH Issue" and cf[10089]="${{ github.event.issue.html_url || github.event.pull_request.html_url }}"'
7070

7171
- name: Sync comment
7272
if: github.event.action == 'created' && steps.search.outputs.issue
73-
uses: tomhjp/gh-action-jira-comment@v0.1.0
73+
uses: tomhjp/gh-action-jira-comment@6eb6b9ead70221916b6badd118c24535ed220bd9 # TSCCR: could not find tsccr entry for tomhjp/gh-action-jira-comment
7474
with:
7575
issue: ${{ steps.search.outputs.issue }}
7676
comment: "${{ github.actor }} ${{ github.event.review.state || 'commented' }}:\n\n${{ github.event.comment.body || github.event.review.body }}\n\n${{ github.event.comment.html_url || github.event.review.html_url }}"
7777

7878
- name: Close ticket
7979
if: (github.event.action == 'closed' || github.event.action == 'deleted') && steps.search.outputs.issue
80-
uses: atlassian/gajira-transition@v2.0.1
80+
uses: atlassian/gajira-transition@4749176faf14633954d72af7a44d7f2af01cc92b # TSCCR: could not find tsccr entry for atlassian/gajira-transition
8181
with:
8282
issue: ${{ steps.search.outputs.issue }}
8383
transition: Done
8484

8585
- name: Reopen ticket
8686
if: github.event.action == 'reopened' && steps.search.outputs.issue
87-
uses: atlassian/gajira-transition@v2.0.1
87+
uses: atlassian/gajira-transition@4749176faf14633954d72af7a44d7f2af01cc92b # TSCCR: could not find tsccr entry for atlassian/gajira-transition
8888
with:
8989
issue: ${{ steps.search.outputs.issue }}
9090
transition: "To Do"

.github/workflows/labeler.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ jobs:
1010
triage:
1111
runs-on: ${{ fromJSON(vars.RUNNER) }}
1212
steps:
13-
- uses: actions/labeler@main
13+
- uses: actions/labeler@5c7539237e04b714afd8ad9b4aed733815b9fab4 # TSCCR: could not find tsccr entry for actions/labeler
1414
with:
1515
repo-token: "${{ secrets.GITHUB_TOKEN }}"

.github/workflows/linting.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
name: "Run Linter"
1010
runs-on: ${{ fromJSON(vars.RUNNER) }}
1111
steps:
12-
- uses: actions/checkout@v3
12+
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
1313
with:
1414
fetch-depth: '0'
1515
- name: Determine Go version
@@ -18,9 +18,9 @@ jobs:
1818
# version, because "goenv" can react to it automatically.
1919
run: |
2020
echo "Building with Go $(cat .go-version)"
21-
echo "go-version=$(cat .go-version)" >> $GITHUB_OUTPUT
21+
echo "go-version=$(cat .go-version)" >> "$GITHUB_OUTPUT"
2222
- name: Set up Go
23-
uses: actions/setup-go@v3
23+
uses: actions/setup-go@d0a58c1c4d2b25278816e339b944508c875f3613 # v3.4.0
2424
with:
2525
go-version: "${{ steps.get-go-version.outputs.go-version }}"
2626
- name: Install Dependencies

.github/workflows/make-gen-delta.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
name: "Check for uncommited changes from make gen"
1313
runs-on: ${{ fromJSON(vars.RUNNER) }}
1414
steps:
15-
- uses: actions/checkout@v3
15+
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
1616
with:
1717
fetch-depth: '0'
1818
- name: Determine Go version
@@ -21,9 +21,9 @@ jobs:
2121
# version, because "goenv" can react to it automatically.
2222
run: |
2323
echo "Building with Go $(cat .go-version)"
24-
echo "go-version=$(cat .go-version)" >> $GITHUB_OUTPUT
24+
echo "go-version=$(cat .go-version)" >> "$GITHUB_OUTPUT"
2525
- name: Set up Go
26-
uses: actions/setup-go@v3
26+
uses: actions/setup-go@d0a58c1c4d2b25278816e339b944508c875f3613 # v3.4.0
2727
with:
2828
go-version: "${{ steps.get-go-version.outputs.go-version }}"
2929
- name: Install Dependencies

.github/workflows/milestone-checker.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
runs-on: ${{ fromJSON(vars.RUNNER) }}
2323
steps:
2424
- name: Checkout Actions
25-
uses: actions/checkout@v3
25+
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
2626
with:
2727
repository: "grafana/grafana-github-actions"
2828
path: ./actions

.github/workflows/security-scan.yml

+19-19
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,31 @@ on:
99

1010
jobs:
1111
scan:
12-
runs-on: ubuntu-latest
12+
runs-on: ${{ fromJSON(vars.RUNNER) }}
1313
if: ${{ github.actor != 'dependabot[bot]' || github.actor != 'hc-github-team-secure-boundary' }}
1414
steps:
15-
- uses: actions/checkout@v3
15+
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
1616

1717
- name: Determine Go version
1818
id: get-go-version
1919
# We use .go-version as our source of truth for current Go
2020
# version, because "goenv" can react to it automatically.
2121
run: |
2222
echo "Building with Go $(cat .go-version)"
23-
echo "go-version=$(cat .go-version)" >> $GITHUB_OUTPUT
23+
echo "go-version=$(cat .go-version)" >> "$GITHUB_OUTPUT"
2424
2525
- name: Set up Go
26-
uses: actions/setup-go@v3
26+
uses: actions/setup-go@d0a58c1c4d2b25278816e339b944508c875f3613 # v3.4.0
2727
with:
2828
go-version: "${{ steps.get-go-version.outputs.go-version }}"
2929

3030
- name: Set up Python
31-
uses: actions/setup-python@v4
31+
uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6 # v3.1.2
3232
with:
3333
python-version: 3.x
3434

3535
- name: Clone Security Scanner repo
36-
uses: actions/checkout@v3
36+
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
3737
with:
3838
repository: hashicorp/security-scanner
3939
token: ${{ secrets.HASHIBOT_PRODSEC_GITHUB_TOKEN }}
@@ -45,26 +45,26 @@ jobs:
4545
env:
4646
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4747
run: |
48-
mkdir $HOME/.bin
49-
cd $GITHUB_WORKSPACE/security-scanner/pkg/sdk/examples/scan-plugin-semgrep
48+
mkdir "$HOME/.bin"
49+
cd "$GITHUB_WORKSPACE/security-scanner/pkg/sdk/examples/scan-plugin-semgrep"
5050
go build -o scan-plugin-semgrep .
51-
mv scan-plugin-semgrep $HOME/.bin
52-
53-
cd $GITHUB_WORKSPACE/security-scanner/pkg/sdk/examples/scan-plugin-codeql
51+
mv scan-plugin-semgrep "$HOME/.bin"
52+
53+
cd "$GITHUB_WORKSPACE/security-scanner/pkg/sdk/examples/scan-plugin-codeql"
5454
go build -o scan-plugin-codeql .
55-
mv scan-plugin-codeql $HOME/.bin
56-
55+
mv scan-plugin-codeql "$HOME/.bin"
56+
5757
# Semgrep
5858
python3 -m pip install semgrep
59-
59+
6060
# CodeQL
6161
LATEST=$(gh release list --repo https://github.com/github/codeql-action | cut -f 3 | sort --version-sort | tail -n1)
6262
gh release download --repo https://github.com/github/codeql-action --pattern codeql-bundle-linux64.tar.gz "$LATEST"
63-
tar xf codeql-bundle-linux64.tar.gz -C $HOME/.bin
64-
63+
tar xf codeql-bundle-linux64.tar.gz -C "$HOME/.bin"
64+
6565
# Add to PATH
66-
echo "$HOME/.bin" >> $GITHUB_PATH
67-
echo "$HOME/.bin/codeql" >> $GITHUB_PATH
66+
echo "$HOME/.bin" >> "$GITHUB_PATH"
67+
echo "$HOME/.bin/codeql" >> "$GITHUB_PATH"
6868
6969
- name: Scan
7070
id: scan
@@ -73,7 +73,7 @@ jobs:
7373
repository: "$PWD"
7474

7575
- name: Upload SARIF file
76-
uses: github/codeql-action/upload-sarif@v2
76+
uses: github/codeql-action/upload-sarif@e00cd12e3ee0ce24d476645336a315351be51d88 # TSCCR: actions in subdirectories not yet supported: upload-sarif
7777
with:
7878
sarif_file: results.sarif
7979

.github/workflows/test-ci-bootstrap-oss.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ jobs:
2727
TF_TOKEN_app_terraform_io: ${{ secrets.TF_API_TOKEN }}
2828
runs-on: ${{ fromJSON(vars.RUNNER) }}
2929
steps:
30-
- uses: actions/checkout@v3
30+
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
3131
- name: Set up Terraform
32-
uses: hashicorp/setup-terraform@v2
32+
uses: hashicorp/setup-terraform@633666f66e0061ca3b725c73b2ec20cd13a8fdd1 # TSCCR: could not find tsccr entry for hashicorp/setup-terraform
3333
- name: Configure AWS credentials
34-
uses: aws-actions/configure-aws-credentials@v1-node16
34+
uses: aws-actions/configure-aws-credentials@67fbcbb121271f7775d2e7715933280b06314838 # TSCCR: could not find tsccr entry for aws-actions/configure-aws-credentials
3535
with:
3636
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_CI }}
3737
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_CI }}

0 commit comments

Comments
 (0)