Skip to content

Commit 8e2eeb1

Browse files
committed
Merge #8: Add zizmor github actions security analysis workflow
f6fd985 fix: deprecated method bitcoin::key::TweakedKeypair::to_inner, changed to to_keypair (Steve Myers) bb105a0 ci: add zizmor github actions security analysis workflow (Steve Myers) Pull request description: ### Description Added workflow to run zizmor github actions security analysis. See: https://woodruffw.github.io/zizmor/usage/#use-in-github-actions ### Notes to the reviewers Original PR: bitcoindevkit/bdk#1813 I pinned zizmor to version 1.6.0. ### Changelog notice * ci: add zizmor github actions security analysis workflow and fix possible vulnerabilities ### 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 Top commit has no ACKs. Tree-SHA512: 1476391c8ae702e19a78d4a271eb3ea17c52ff83928400d5f060c300eed652ec8f3d246371cf196c375bc18a6bd9025a468e6833d7232ebe933398b289fd2857
2 parents 8b0555a + f6fd985 commit 8e2eeb1

File tree

6 files changed

+44
-2
lines changed

6 files changed

+44
-2
lines changed

.github/workflows/code_coverage.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ on: [push, pull_request]
22

33
name: Code Coverage
44

5+
permissions: {}
6+
57
jobs:
68
Codecov:
79
name: Code Coverage

.github/workflows/cont_integration.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ on: [push, pull_request]
22

33
name: CI
44

5+
permissions: {}
6+
57
jobs:
68

79
prepare:

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
name: Update rust version
2+
3+
permissions: {}
4+
25
on:
36
schedule:
47
- cron: "0 0 15 * *" # At 00:00 on day-of-month 15.

.github/workflows/zizmor.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Zizmor Actions Analysis
2+
3+
on:
4+
push:
5+
branches: ["master"]
6+
pull_request:
7+
branches: ["**"]
8+
9+
jobs:
10+
zizmor:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
security-events: write
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
with:
18+
persist-credentials: false
19+
20+
- name: Rust Cache
21+
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
22+
23+
- name: Install zizmor
24+
run: cargo install zizmor --locked --version 1.6.0
25+
26+
- name: Run zizmor 🌈
27+
run: zizmor --format sarif . > results.sarif
28+
env:
29+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
31+
- name: Upload SARIF file
32+
uses: github/codeql-action/upload-sarif@v3
33+
with:
34+
sarif_file: results.sarif
35+
category: zizmor

wallet/src/wallet/signer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ fn sign_psbt_schnorr(
577577
let keypair = match leaf_hash {
578578
None => keypair
579579
.tap_tweak(secp, psbt_input.tap_merkle_root)
580-
.to_inner(),
580+
.to_keypair(),
581581
Some(_) => keypair, // no tweak for script spend
582582
};
583583

wallet/tests/psbt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ fn test_psbt_multiple_internalkey_signers() {
214214
let message = Message::from(sighash);
215215

216216
// add tweak. this was taken from `signer::sign_psbt_schnorr`
217-
let keypair = keypair.tap_tweak(&secp, None).to_inner();
217+
let keypair = keypair.tap_tweak(&secp, None).to_keypair();
218218
let (xonlykey, _parity) = XOnlyPublicKey::from_keypair(&keypair);
219219

220220
// Must verify if we used the correct key to sign

0 commit comments

Comments
 (0)