Skip to content

Commit 35d2bd5

Browse files
authored
Chore: Dependency pinning & Depdendabot introduction (#436)
1. Pins the Github Action workflow hashes under `.github/workflows` to full-length commit SHAs. 2. Adds a base level `.github/dependabot.yml` config to keep these (and other go/Docker) deps up to date. ## Motivation and Context - Github's [security guide](https://docs.github.com/en/actions/reference/security/secure-use#using-third-party-actions) recommends using the immutable SHA of an action when consuming third party actions. - Depdendabot makes ongoing dep house keeping manageable.
1 parent 7ea68db commit 35d2bd5

File tree

5 files changed

+50
-32
lines changed

5 files changed

+50
-32
lines changed

.github/dependabot.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: gomod
4+
directory: /
5+
schedule:
6+
interval: daily
7+
- package-ecosystem: github-actions
8+
directory: /
9+
groups:
10+
actions:
11+
patterns:
12+
- "*"
13+
schedule:
14+
interval: daily
15+
- package-ecosystem: "docker"
16+
directory: "/"
17+
schedule:
18+
interval: "daily"

.github/workflows/ci.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Checkout code
19-
uses: actions/checkout@v4
19+
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 #v4
2020

2121
- name: Set up Go
22-
uses: actions/setup-go@v5
22+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 #v5
2323
with:
2424
go-version: ${{ env.GO_VERSION }}
2525

2626
- name: Cache Go modules
27-
uses: actions/cache@v4
27+
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 #v4
2828
with:
2929
path: |
3030
~/.cache/go-build
@@ -60,15 +60,15 @@ jobs:
6060
runs-on: ubuntu-latest
6161
steps:
6262
- name: Checkout code
63-
uses: actions/checkout@v4
63+
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 #v4
6464

6565
- name: Set up Go
66-
uses: actions/setup-go@v5
66+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 #v5
6767
with:
6868
go-version: ${{ env.GO_VERSION }}
6969

7070
- name: Cache Go modules
71-
uses: actions/cache@v4
71+
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 #v4
7272
with:
7373
path: |
7474
~/.cache/go-build
@@ -84,7 +84,7 @@ jobs:
8484
run: make test-all
8585

8686
- name: Upload coverage artifacts
87-
uses: actions/upload-artifact@v4
87+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 #v4
8888
with:
8989
name: coverage-report
9090
path: |

.github/workflows/claude.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
actions: read
2727
steps:
2828
- name: Checkout repository
29-
uses: actions/checkout@v4
29+
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 #v4
3030
with:
3131
fetch-depth: 1
3232

.github/workflows/deploy.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,29 @@ jobs:
1818
packages: write
1919
steps:
2020
- name: Checkout repository
21-
uses: actions/checkout@v4
21+
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 #v4
2222

2323
- name: Set up Docker Buildx
24-
uses: docker/setup-buildx-action@v3
24+
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 #v3
2525

2626
- name: Log in to Container Registry
27-
uses: docker/login-action@v3
27+
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 #v3
2828
with:
2929
registry: ghcr.io
3030
username: ${{ github.actor }}
3131
password: ${{ secrets.GITHUB_TOKEN }}
3232

3333
- name: Extract metadata
3434
id: meta
35-
uses: docker/metadata-action@v5
35+
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f #v5
3636
with:
3737
images: ghcr.io/${{ github.repository }}
3838
tags: |
3939
type=sha,prefix=main-{{date 'YYYYMMDD'}}-,enable={{is_default_branch}}
4040
type=raw,value=main,enable={{is_default_branch}}
4141
4242
- name: Build and push Docker image
43-
uses: docker/build-push-action@v5
43+
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 #v5
4444
with:
4545
context: .
4646
file: ./Dockerfile
@@ -61,25 +61,25 @@ jobs:
6161
cancel-in-progress: false
6262
steps:
6363
- name: Checkout code
64-
uses: actions/checkout@v4
64+
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 #v4
6565

6666
- name: Setup Go
67-
uses: actions/setup-go@v5
67+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 #v5
6868
with:
6969
go-version: ${{ env.GO_VERSION }}
7070

7171
- name: Setup Pulumi
72-
uses: pulumi/actions@v6
72+
uses: pulumi/actions@cc7494be991dba0978f7ffafaf995b0449a0998e #v6
7373
with:
7474
pulumi-version: ${{ env.PULUMI_VERSION }}
7575

7676
- name: Authenticate to Google Cloud
77-
uses: google-github-actions/auth@v2
77+
uses: google-github-actions/auth@c200f3691d83b41bf9bbd8638997a462592937ed #v2
7878
with:
7979
credentials_json: ${{ secrets.GCP_STAGING_SERVICE_ACCOUNT_KEY }}
8080

8181
- name: Setup Google Cloud SDK
82-
uses: google-github-actions/setup-gcloud@v2
82+
uses: google-github-actions/setup-gcloud@e427ad8a34f8676edf47cf7d7925499adf3eb74f #v2
8383
with:
8484
project_id: mcp-registry-staging
8585
install_components: gke-gcloud-auth-plugin
@@ -100,25 +100,25 @@ jobs:
100100
cancel-in-progress: false
101101
steps:
102102
- name: Checkout code
103-
uses: actions/checkout@v4
103+
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 #v4
104104

105105
- name: Setup Go
106-
uses: actions/setup-go@v5
106+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 #v5
107107
with:
108108
go-version: ${{ env.GO_VERSION }}
109109

110110
- name: Setup Pulumi
111-
uses: pulumi/actions@v6
111+
uses: pulumi/actions@cc7494be991dba0978f7ffafaf995b0449a0998e #v6
112112
with:
113113
pulumi-version: ${{ env.PULUMI_VERSION }}
114114

115115
- name: Authenticate to Google Cloud
116-
uses: google-github-actions/auth@v2
116+
uses: google-github-actions/auth@c200f3691d83b41bf9bbd8638997a462592937ed #v2
117117
with:
118118
credentials_json: ${{ secrets.GCP_PROD_SERVICE_ACCOUNT_KEY }}
119119

120120
- name: Setup Google Cloud SDK
121-
uses: google-github-actions/setup-gcloud@v2
121+
uses: google-github-actions/setup-gcloud@e427ad8a34f8676edf47cf7d7925499adf3eb74f #v2
122122
with:
123123
project_id: mcp-registry-prod
124124
install_components: gke-gcloud-auth-plugin

.github/workflows/release.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Checkout
17-
uses: actions/checkout@v4
17+
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 #v4
1818
with:
1919
fetch-depth: 0
2020

2121
- name: Set up Go
22-
uses: actions/setup-go@v5
22+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 #v5
2323
with:
2424
go-version: '1.24.x'
2525

2626
- name: Install cosign
27-
uses: sigstore/cosign-installer@v3
27+
uses: sigstore/cosign-installer@d58896d6a1865668819e1d91763c7751a165e159 #v3
2828

2929
- name: Install Syft
3030
uses: anchore/sbom-action/download-syft@v0.20.5
3131

3232
- name: Run GoReleaser
33-
uses: goreleaser/goreleaser-action@v6
33+
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a #v6
3434
with:
3535
distribution: goreleaser
3636
version: v2.12.0
@@ -43,29 +43,29 @@ jobs:
4343
needs: goreleaser
4444
steps:
4545
- name: Checkout
46-
uses: actions/checkout@v4
46+
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 #v4
4747

4848
- name: Set up Docker Buildx
49-
uses: docker/setup-buildx-action@v3
49+
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 #v3
5050

5151
- name: Log in to Container Registry
52-
uses: docker/login-action@v3
52+
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 #v3
5353
with:
5454
registry: ghcr.io
5555
username: ${{ github.actor }}
5656
password: ${{ secrets.GITHUB_TOKEN }}
5757

5858
- name: Extract metadata
5959
id: meta
60-
uses: docker/metadata-action@v5
60+
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f #v5
6161
with:
6262
images: ghcr.io/${{ github.repository }}
6363
tags: |
6464
type=semver,pattern={{version}}
6565
type=raw,value=latest
6666
6767
- name: Build and push Docker image
68-
uses: docker/build-push-action@v5
68+
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 #v5
6969
with:
7070
context: .
7171
file: ./Dockerfile

0 commit comments

Comments
 (0)