Skip to content

Commit 0e01ca7

Browse files
authored
chore(ci): pin deps in workflow and add dependabot to update them weekly (#730)
Pinning hashes for dependencies in workflows is a security best practice Excluded from pinning are actions from the `github/*` and `actions/*` given that these are officially managed by Github and are not raised by `zizmor` By configuring dependabot with `package-ecosystem: "github-actions"` it will open a pull request only for updating pinned hashes (not cargo, etc..): https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot#enabling-dependabot-version-updates-for-actions The `<hash> #<branch_name>` syntax is what dependabot picks up on Note: `foundry-toolchain@v1` has been left unpinned as it will help us catch issues more easily and it is in our interest to be up to date. Let me know if this makes sense @grandizzy or if we should pin instead.
1 parent e458886 commit 0e01ca7

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ jobs:
8888
- uses: actions/checkout@v5
8989
with:
9090
persist-credentials: false
91-
- uses: crate-ci/typos@v1
91+
- uses: crate-ci/typos@85f62a8a84f939ae994ab3763f01a0296d61a7ee # v1
9292

9393
ci-success:
9494
runs-on: ubuntu-latest
@@ -102,6 +102,6 @@ jobs:
102102
timeout-minutes: 10
103103
steps:
104104
- name: Decide whether the needed jobs succeeded or failed
105-
uses: re-actors/alls-green@release/v1
105+
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # release/v1
106106
with:
107107
jobs: ${{ toJSON(needs) }}

.github/workflows/codeql.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: CodeQL
22

3+
permissions:
4+
contents: read
5+
36
on:
47
push:
58
branches: ["master"]
@@ -19,9 +22,7 @@ jobs:
1922
runs-on: ubuntu-latest
2023
permissions:
2124
security-events: write
22-
packages: read
2325
actions: read
24-
contents: read
2526

2627
strategy:
2728
fail-fast: false

0 commit comments

Comments
 (0)