Skip to content

Commit bd8ed25

Browse files
authored
chore(ci): harden (#183)
This PR hardens the CI by explicitly pinning all GitHub actions to their exact commit SHAs. Additionally, it enables Dependabot for future upgrades + security alerts. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Added automated dependency update configuration for GitHub Actions, scheduled weekly. * Updated multiple GitHub Actions workflows to use newer, more secure action versions. * Enhanced Docker publishing workflow with updated actions and additional deployment configuration. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent d55d635 commit bd8ed25

File tree

4 files changed

+19
-8
lines changed

4 files changed

+19
-8
lines changed

.github/dependabot.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: "/"
5+
schedule:
6+
interval: weekly
7+
day: monday
8+
time: "02:00"
9+
open-pull-requests-limit: 10

.github/workflows/add-to-project.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
name: Add issue to project
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/add-to-project@v0.3.0
13+
- uses: actions/add-to-project@244f685bbc3b7adfa8466e08b698b5577571133e # v1.0.2
1414
with:
1515
project-url: https://github.com/orgs/cowprotocol/projects/8
16-
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
16+
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}

.github/workflows/cla.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
steps:
1313
- name: "CLA Assistant"
1414
if: ((github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target') && github.repository_owner == 'cowprotocol' && github.repository != 'cowprotocol/cla'
15-
uses: contributor-assistant/[email protected]
15+
uses: contributor-assistant/github-action@ca4a40a7d1004f18d9960b404b97e5f30a505a08 # v2.6.1
1616
env:
1717
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1818
with:

.github/workflows/docker.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,31 +12,33 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout
15-
uses: actions/checkout@v3
15+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
16+
with:
17+
persist-credentials: false
1618

1719
- name: Login to GitHub Container Registry
18-
uses: docker/login-action@v2
20+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
1921
with:
2022
registry: ghcr.io
2123
username: ${{ github.repository_owner }}
2224
password: ${{ secrets.GITHUB_TOKEN }}
2325

2426
- name: Image metadata
2527
id: image_meta
26-
uses: docker/metadata-action@v4
28+
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
2729
with:
2830
images: ghcr.io/${{ github.repository }}
2931

3032
- name: Build and push
31-
uses: docker/build-push-action@v4
33+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
3234
with:
3335
context: .
3436
file: Dockerfile
3537
push: true
3638
tags: ${{ steps.image_meta.outputs.tags }}
3739
labels: ${{ steps.image_meta.outputs.labels }}
3840

39-
- uses: cowprotocol/autodeploy-action@v1
41+
- uses: cowprotocol/autodeploy-action@0c950eb2856af4f520a652b59e786bd349516480 # v2
4042
if: ${{ github.ref == 'refs/heads/main' }}
4143
with:
4244
images: ghcr.io/cowprotocol/watch-tower:main

0 commit comments

Comments
 (0)