Skip to content

Commit 10dccdb

Browse files
committed
feat(git-workflow): add audit, zizmor & dependabot
- add audit, zizmor workflows and dependabot - set MSRV to 1.75.0
1 parent cbba98c commit 10dccdb

File tree

8 files changed

+125
-41
lines changed

8 files changed

+125
-41
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+
enable-beta-ecosystems: true
3+
4+
updates:
5+
6+
- package-ecosystem: github-actions
7+
directory: "/"
8+
schedule:
9+
interval: daily
10+
time: "03:00"
11+
12+
- package-ecosystem: cargo
13+
directory: "/"
14+
schedule:
15+
interval: weekly
16+
day: monday
17+
time: "04:00"
18+

.github/workflows/audit.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Security Audit
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- '**/Cargo.toml'
7+
- '**/Cargo.lock'
8+
merge_group:
9+
push:
10+
branches: [master]
11+
paths:
12+
- '**/Cargo.toml'
13+
- '**/Cargo.lock'
14+
schedule:
15+
# weekly
16+
- cron: '0 0 * * 0'
17+
18+
env:
19+
CARGO_TERM_COLOR: always
20+
21+
permissions:
22+
contents: read
23+
security-events: write
24+
issues: write
25+
26+
jobs:
27+
cargo-audit:
28+
name: RustSec Audit (vulnerabilities)
29+
runs-on: ubuntu-latest
30+
timeout-minutes: 15
31+
steps:
32+
- name: Checkout code
33+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
34+
35+
- name: Install Rust toolchain
36+
uses: dtolnay/rust-toolchain@stable
37+
38+
- name: Cache cargo registry/index/target
39+
uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1
40+
with:
41+
cache-on-failure: true
42+
43+
- name: Install cargo-audit
44+
run: cargo install cargo-audit --locked
45+
46+
- name: Run cargo audit (raw output — you will see this clearly)
47+
run: cargo audit --deny warnings
48+
49+
- name: Run cargo audit again for GitHub Security tab upload
50+
uses: rustsec/audit-check@69366f33c96575abad1ee0dba8212ae3e3c0d700
51+
with:
52+
token: ${{ secrets.GITHUB_TOKEN }}
53+
deny: warnings
54+

.github/workflows/cont_integration.yml

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

33
name: CI
44

5+
env:
6+
CARGO_TERM_COLOR: always
7+
RUST_BACKTRACE: 1
8+
59
jobs:
610
fmt:
711
name: Rust fmt
@@ -22,11 +26,10 @@ jobs:
2226

2327
# Clippy lints
2428
clippy:
25-
name: Clippy (${{ matrix.rust }}, ${{ matrix.features }})
29+
name: Clippy (${{ matrix.features }})
2630
runs-on: ubuntu-latest
2731
strategy:
2832
matrix:
29-
rust: [stable, beta]
3033
features:
3134
- --no-default-features
3235
- --all-features
@@ -36,7 +39,7 @@ jobs:
3639
- name: Install Rust toolchain
3740
uses: actions-rust-lang/setup-rust-toolchain@v1
3841
with:
39-
toolchain: ${{matrix.rust}}
42+
toolchain: stable
4043
components: clippy
4144
cache: true
4245

@@ -45,38 +48,21 @@ jobs:
4548

4649
# Build and test
4750
test:
48-
name: Test (${{ matrix.os }}, ${{ matrix.rust }}, ${{ matrix.features }})
51+
name: Test (stable, ${{ matrix.features }})
52+
runs-on: ubuntu-latest
4953
strategy:
5054
fail-fast: false
5155
matrix:
52-
os: [ubuntu-latest, windows-latest, macos-latest]
53-
rust: [stable, beta, nightly]
5456
features:
5557
- --no-default-features
5658
- --all-features
57-
exclude:
58-
- os: windows-latest
59-
rust: beta
60-
- os: windows-latest
61-
features: --no-default-features
62-
- os: macos-latest
63-
rust: beta
64-
- os: macos-latest
65-
features: --no-default-features
66-
- os: windows-latest
67-
rust: nightly
68-
features: --no-default-features
69-
- os: macos-latest
70-
rust: nightly
71-
features: --no-default-features
72-
runs-on: ${{ matrix.os }}
7359
steps:
7460
- uses: actions/checkout@v4
7561

7662
- name: Install Rust toolchain
7763
uses: actions-rust-lang/setup-rust-toolchain@v1
7864
with:
79-
toolchain: ${{ matrix.rust }}
65+
toolchain: stable
8066
cache: true
8167

8268
- name: Build
@@ -87,7 +73,6 @@ jobs:
8773

8874
- name: Run doc tests
8975
run: cargo test ${{ matrix.features }} --doc --verbose
90-
continue-on-error: ${{ matrix.rust == 'nightly' }}
9176

9277
# MSRV
9378
msrv:
@@ -99,7 +84,7 @@ jobs:
9984
- name: Install Rust toolchain
10085
uses: actions-rust-lang/setup-rust-toolchain@v1
10186
with:
102-
toolchain: 1.85.0
87+
toolchain: 1.75.0
10388
cache: true
10489

10590
- name: Check MSRV

.github/workflows/zizmor.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: GitHub Actions Security Analysis with zizmor
2+
3+
on:
4+
pull_request:
5+
branches: ["**"]
6+
push:
7+
branches: ["**"]
8+
schedule:
9+
- cron: '0 0 * * 0'
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: read
14+
security-events: write
15+
16+
jobs:
17+
zizmor:
18+
name: zizmor security scan
19+
runs-on: ubuntu-latest
20+
timeout-minutes: 10
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
24+
25+
- name: Run zizmor
26+
uses: zizmorcore/zizmor-action@e673c3917a1aef3c65c972347ed84ccd013ecda4

Cargo.lock

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
[package]
2-
name = "bdk_rpc_client"
2+
name = "bdk-bitcoind-client"
33
version = "0.1.0"
4-
edition = "2024"
5-
rust-version = "1.85.0"
4+
edition = "2021"
5+
rust-version = "1.75.0"
66
homepage = "https://bitcoindevkit.org"
7-
repository = "https://github.com/bitcoindevkit/bdk-rpc-client"
8-
documentation = "https://docs.rs/bdk_rpc_client"
7+
repository = "https://github.com/bitcoindevkit/bdk-bitcoind-client"
8+
documentation = "https://docs.rs/bdk-bitcoind-client"
99
description = "A minimal production-ready bitcoind RPC client for Bitcoin Dev Kit."
1010
license = "MIT OR Apache-2.0"
11+
authors = ["Bitcoin Dev Kit Developers"]
1112
readme = "README.md"
1213

1314
[dependencies]
1415
corepc-types = { version = "0.10.1", features = ["default"]}
1516
jsonrpc = { version = "0.18.0", features = ["simple_http", "simple_tcp", "minreq_http", "simple_uds", "proxy"] }
1617

1718
[features]
18-
v30_0 = [ ]
19+
v30_0 = []

src/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::{
77
use crate::error::Error;
88
use crate::jsonrpc::minreq_http::Builder;
99
use corepc_types::bitcoin::BlockHash;
10-
use jsonrpc::{Transport, serde, serde_json};
10+
use jsonrpc::{serde, serde_json, Transport};
1111

1212
/// client authentication methods
1313
#[derive(Clone, Debug, Hash, Eq, PartialEq, Ord, PartialOrd)]

tests/test_rpc_client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//! bitcoind -regtest -rpcuser=bitcoin -rpcpassword=bitcoin -rpcport=18443
88
//! ```
99
10-
use bdk_rpc_client::{Auth, Client, Error};
10+
use bdk_bitcoind_client::{Auth, Client, Error};
1111
use corepc_types::bitcoin::BlockHash;
1212
use std::path::PathBuf;
1313

0 commit comments

Comments
 (0)