Skip to content

Commit 88330f6

Browse files
committed
Merge #1778: ci: apply zizmor security audit
30dce98 fix(cont-integration): template injection audit (Leonardo Lima) 4ce9139 fix(ci): do not persist credentials (Leonardo Lima) Pull request description: fixes #1775 <!-- You can erase any parts of this template not applicable to your Pull Request. --> ### Description I used `zizmor` on all current CI workflows, it's a tool that helps detecting possible vulnerabilities in our CI jobs, see https://woodruffw.github.io/zizmor/. It can run against most of it's audit rules, however the ones that require the GitHub API Token would require some with access to it in order to test against it. So this PR does not cover for impostor-commit, ref-confusion known-vulnerable-actions audit rules. <!-- Describe the purpose of this PR, what's being adding and/or fixed --> ### Notes to the reviewers <!-- In this section you can include notes directed to the reviewers, like explaining why some parts of the PR were done in a specific way --> ### Changelog notice - Do not persist credentials on GitHub Actions. <!-- Notice the release manager should include in the release tag message changelog --> <!-- See https://keepachangelog.com/en/1.0.0/ for examples --> ### Checklists #### All Submissions: * [x] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md) * [x] I ran `cargo fmt` and `cargo clippy` before committing ACKs for top commit: notmandatory: ACK 30dce98 Tree-SHA512: 611b51bdac3278c86954b4c7a8ecb405db0889fd65f58cf4035058433233340bd5c83f135184dd53e2e1cc6f547d8ce88a7e4433da39d621479b17dd9e2e06d1
2 parents 82a2423 + 30dce98 commit 88330f6

File tree

5 files changed

+26
-1
lines changed

5 files changed

+26
-1
lines changed

.github/workflows/audit.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,7 @@ jobs:
2424
issues: write
2525
steps:
2626
- uses: actions/checkout@v4
27+
with:
28+
persist-credentials: false
2729
- uses: actions-rust-lang/audit@v1
2830
name: Audit Rust Dependencies

.github/workflows/code_coverage.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
steps:
1515
- name: Checkout
1616
uses: actions/checkout@v4
17+
with:
18+
persist-credentials: false
1719
- name: Install lcov tools
1820
run: sudo apt-get install lcov -y
1921
- name: Install Rust toolchain

.github/workflows/cont_integration.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ jobs:
1111
steps:
1212
- name: "Checkout repo"
1313
uses: actions/checkout@v4
14+
with:
15+
persist-credentials: false
1416
- name: "Read rust version"
1517
id: read_toolchain
1618
run: echo "rust_version=$(cat rust-version)" >> $GITHUB_OUTPUT
@@ -32,6 +34,8 @@ jobs:
3234
steps:
3335
- name: checkout
3436
uses: actions/checkout@v4
37+
with:
38+
persist-credentials: false
3539
- name: Install Rust toolchain
3640
uses: actions-rs/toolchain@v1
3741
with:
@@ -48,8 +52,10 @@ jobs:
4852
if: matrix.rust.version == '1.63.0'
4953
run: ./ci/pin-msrv.sh
5054
- name: Build + Test
55+
env:
56+
MATRIX_RUST_VERSION: ${{ matrix.rust.version }}
5157
run: |
52-
if [ "${{matrix.rust.version}}" = '1.63.0' ]; then
58+
if [ $MATRIX_RUST_VERSION = '1.63.0' ]; then
5359
cargo build --workspace --exclude 'example_*' --exclude 'bdk_electrum' ${{ matrix.features }}
5460
cargo test --workspace --exclude 'example_*' --exclude 'bdk_electrum' ${{ matrix.features }}
5561
else
@@ -64,6 +70,8 @@ jobs:
6470
steps:
6571
- name: Checkout
6672
uses: actions/checkout@v4
73+
with:
74+
persist-credentials: false
6775
- name: Install Rust toolchain
6876
uses: actions-rs/toolchain@v1
6977
with:
@@ -96,6 +104,8 @@ jobs:
96104
steps:
97105
- name: Checkout
98106
uses: actions/checkout@v4
107+
with:
108+
persist-credentials: false
99109
# Install a recent version of clang that supports wasm32
100110
- run: wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - || exit 1
101111
- run: sudo apt-get update || exit 1
@@ -123,6 +133,8 @@ jobs:
123133
steps:
124134
- name: Checkout
125135
uses: actions/checkout@v4
136+
with:
137+
persist-credentials: false
126138
- name: Install Rust toolchain
127139
uses: actions-rs/toolchain@v1
128140
with:
@@ -141,6 +153,8 @@ jobs:
141153
checks: write
142154
steps:
143155
- uses: actions/checkout@v4
156+
with:
157+
persist-credentials: false
144158
- uses: actions-rs/toolchain@v1
145159
with:
146160
toolchain: ${{ needs.prepare.outputs.rust_version }}
@@ -172,6 +186,8 @@ jobs:
172186
steps:
173187
- name: checkout
174188
uses: actions/checkout@v4
189+
with:
190+
persist-credentials: false
175191
- name: Install Rust toolchain
176192
uses: actions-rs/toolchain@v1
177193
with:

.github/workflows/cron-update-rust.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v4
12+
with:
13+
persist-credentials: false
1214
- uses: dtolnay/rust-toolchain@stable
1315
- uses: tibdex/github-app-token@v2
1416
id: generate-token

.github/workflows/nightly_docs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ jobs:
99
steps:
1010
- name: Checkout sources
1111
uses: actions/checkout@v4
12+
with:
13+
persist-credentials: false
1214
- name: Set default toolchain
1315
run: rustup default nightly
1416
- name: Set profile
@@ -36,6 +38,7 @@ jobs:
3638
- name: Checkout `bitcoindevkit.org`
3739
uses: actions/checkout@v4
3840
with:
41+
persist-credentials: false
3942
ssh-key: ${{ secrets.DOCS_PUSH_SSH_KEY }}
4043
repository: bitcoindevkit/bitcoindevkit.org
4144
ref: master

0 commit comments

Comments
 (0)