Commit Graph

322 Commits

Author SHA1 Message Date
Fintan Halpenny 3486c028ea term: Release 0.18.0 2026-05-06 21:00:14 +01:00
Fintan Halpenny 5991bdfa9a systemd: Release 0.13.0 2026-05-06 21:00:14 +01:00
Fintan Halpenny 2871417808 oid: Release 0.2.0 2026-05-06 21:00:14 +01:00
Fintan Halpenny 4ca2098cb7 core: Release 0.3.0 2026-05-06 21:00:14 +01:00
Fintan Halpenny 64a419d79c crypto: Release 0.17.0 2026-05-06 21:00:14 +01:00
Fintan Halpenny 1a31a9f541 cli: Handle broken pipe (SIGPIPE) gracefully
Prevent `rad` from panicking when its stdout is a closed pipe, e.g.
when running `rad config | head`.

The broken pipes are handled at the output boundaries using three
layers of defence:

1. Inner: Route all stdout output through `term::print()` and
   `term::print_inline()`, which use explicit `writeln!`/`write!` to
   a locked stdout and silently ignore write errors. All `println!`
   calls in `radicle-cli` and `radicle-term` are converted.
2. Middle: Catch `BrokenPipe` errors that propagate up via `anyhow`
   from subcommands in `main::run()`, and exit cleanly with code 0.
3. Outer: Install a panic hook that intercepts `println!` panics
   containing "Broken pipe" (from dependencies like clap) and exits
   cleanly, chained in front of human_panic's hook.

To prevent regressions, `#![deny(clippy::print_stdout)]` is added to
`radicle-cli`, requiring all future stdout output to go through the
safe `term::` functions.

Note: `eprintln!` calls (stderr) are not handled, as broken stderr
pipes are extremely rare in practice.
2026-04-29 10:57:24 +02:00
Lorenz Leutgeb 3bc8abdc29
radicle/node/config: Use `IndexSet`
With `connect: std::collections::HashSet`, we suffer unpredictable reordering
of values in our test cases.

Use `connect: indexmap::IndexSet` instead, which preserves insertion
order for iteration.
2026-04-27 17:36:20 +02:00
Lorenz Leutgeb 9b9b5ca996 cargo: Update `cyphernet` from 0.5.2 to 0.5.3
The main change that needs adjustment on our side is that
`impl EcPk for ec25519::PublicKey` changed from `Compressed = [u8; 32]`
to `Compressed = amplify::Bytes32`.

Also remove `impl Deref for PublicKey` to avoid dependents of
`radicle-crypto` depend on a particular implementation, and make the
anonymous member private.

See
<f42396139a>.
2026-04-15 11:59:15 +01:00
Lorenz Leutgeb 94f65a71db
cargo: Remove unused dependencies
A number of dependencies were unused, causing confusion. Remove them.
2026-04-15 01:50:14 +02:00
Wiktor Kwapisiewicz 48551cde93 crypto: Use `ssh-agent-lib` for SSH Agent
This makes the `radicle-ssh` crate obsolete.

Signed-off-by: Wiktor Kwapisiewicz <wiktor@metacode.biz>
Co-authored-by: Lorenz Leutgeb <lorenz.leutgeb@radicle.xyz>
2026-04-02 16:03:23 +01:00
Fintan Halpenny 0080813c91 term: Update inquire to 0.9.4
The `fxhash` crate has become unmaintained and was a transitive
dependency of `inquire`.
The `inquire` crate moved to use `stdlib` instead of `fxhash`[^0].
Update `inquire` to 0.9.4 to get the latest version of the crate.

`cargo deny check` output:
```
error[unmaintained]: fxhash - no longer maintained
    ┌─ /home/fintohaps/Developer/heartwood/Cargo.lock:111:1
    │
111 │ fxhash 0.2.1 registry+https://github.com/rust-lang/crates.io-index
    │ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ unmaintained advisory detected
    │
    ├ ID: RUSTSEC-2025-0057
    ├ Advisory: https://rustsec.org/advisories/RUSTSEC-2025-0057
    ├ The fxhash crate is no longer maintained.
      
      The repository is stale and owner is no longer active on GitHub.
      
      Please take a look at [rustc-hash](https://github.com/rust-lang/rustc-hash) instead.
      ```
    ├ Announcement: https://github.com/cbreeden/fxhash/issues/20
    ├ Solution: No safe upgrade is available!
    ├ fxhash v0.2.1
      └── inquire v0.7.5
          └── radicle-term v0.17.0
              └── radicle-cli v0.19.0
                  └── radicle-remote-helper v0.15.0
```

[^0]: 3d5b65422a/CHANGELOG.md?plain=1#L72
2026-04-02 14:46:41 +01:00
Fintan Halpenny 5b6ae0ac4a Update radicle-surf to 0.27.1
This version resolves the vulnerability from the `tar-rs` transitive
dependency.

`cargo deny check` output:
```
error[vulnerability]: tar-rs incorrectly ignores PAX size headers if header size is nonzero
    ┌─ /home/fintohaps/Developer/heartwood/Cargo.lock:362:1
    │
362 │ tar 0.4.44 registry+https://github.com/rust-lang/crates.io-index
    │ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ security vulnerability detected
    │
    ├ ID: RUSTSEC-2026-0068
    ├ Advisory: https://rustsec.org/advisories/RUSTSEC-2026-0068
    ├ Versions 0.4.44 and below of tar-rs have conditional logic that skips the PAX
      size header in cases where the base header size is nonzero.
      
      As part of [CVE-2025-62518][astral-cve], the [astral-tokio-tar]
      project was changed to correctly honor PAX size headers in the case where it
      was different from the base header. This is almost the inverse of the
      astral-tokio-tar issue.
      
      Any discrepancy in how tar parsers honor file size can be used to create
      archives that appear differently when unpacked by different archivers. In this
      case, the tar-rs (Rust tar) crate is an outlier in checking for the header size
      — other tar parsers (including e.g. Go [`archive/tar`][go-tar]) unconditionally
      use the PAX size override. This can affect anything that uses the tar crate to
      parse archives and expects to have a consistent view with other parsers.
      
      This issue has been fixed in version 0.4.45.
      
      [astral-cve]: https://www.cve.org/CVERecord?id=CVE-2025-62518
      [astral-tokio-tar]: https://github.com/astral-sh/tokio-tar
      [go-tar]: https://pkg.go.dev/archive/tar
    ├ Solution: Upgrade to >=0.4.45 (try `cargo update -p tar`)
    ├ tar v0.4.44
      └── (build) radicle-surf v0.27.0
          └── radicle-cli v0.19.0
              └── radicle-remote-helper v0.15.0
```
2026-04-02 14:46:41 +01:00
Fintan Halpenny 546001253a protocol: Use pastey fork
The `paste` crate is no longer maintained, and the `pastey` fork is a
drop-in replacement.

`cargo deny check` output:
```
error[unmaintained]: paste - no longer maintained
    ┌─ /home/fintohaps/Developer/heartwood/Cargo.lock:239:1
    │
239 │ paste 1.0.15 registry+https://github.com/rust-lang/crates.io-index
    │ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ unmaintained advisory detected
    │
    ├ ID: RUSTSEC-2024-0436
    ├ Advisory: https://rustsec.org/advisories/RUSTSEC-2024-0436
    ├ The creator of the crate `paste` has stated in the [`README.md`](https://github.com/dtolnay/paste/blob/master/README.md) 
      that this project is not longer maintained as well as archived the repository
      
      ## Possible Alternative(s)
      
      - [`pastey`]: a fork of paste and is aimed to be a drop-in replacement with additional features for paste crate
      - [`with_builtin_macros`]: crate providing a [superset of `paste`'s functionality including general `macro_rules!` eager expansions](https://docs.rs/with_builtin_macros/0.1.0/with_builtin_macros/macro.with_eager_expansions.html)  and `concat!`/`concat_idents!` macros
      
      [`pastey`]: https://crates.io/crates/pastey
      [`with_builtin_macros`]: https://crates.io/crates/with_builtin_macros
    ├ Announcement: https://github.com/dtolnay/paste
    ├ Solution: No safe upgrade is available!
    ├ paste v1.0.15
      └── (dev) radicle-protocol v0.6.0
          └── radicle-node v0.18.0
              └── (dev) radicle-cli v0.19.0
                  └── radicle-remote-helper v0.15.0
```
2026-04-02 14:46:41 +01:00
Lorenz Leutgeb 96f573b767 cargo: Update dependencies with `cargo update` 2026-04-02 14:46:41 +01:00
Fintan Halpenny 263d04b5ea schemars: Update to 0.7.0 2026-03-26 15:32:50 +00:00
Fintan Halpenny 597b514d6c remote-helper: Update to 0.16.0 2026-03-26 15:32:43 +00:00
Fintan Halpenny d685d6f91d cli: Update to 0.20.0 2026-03-26 15:32:43 +00:00
Fintan Halpenny 78908682df node: Update to 0.19.0 2026-03-26 15:32:43 +00:00
Fintan Halpenny 6e40a617de protocol: Update to 0.7.0 2026-03-26 15:28:39 +00:00
Fintan Halpenny 5a2e7841c7 fetch: Update to 0.19.0 2026-03-26 15:28:39 +00:00
Fintan Halpenny 9f91817d25 radicle: Update to 0.23.0 2026-03-26 15:25:11 +00:00
Fintan Halpenny 9fda8c6d8f radicle: Update to 0.22.1 2026-03-20 16:15:32 +00:00
Fintan Halpenny 9fd4f00c23 remote-helper: Update to 0.15.0 2026-03-18 20:53:00 +00:00
Fintan Halpenny d7e7db35ed cli: Update to 0.19.0 2026-03-18 20:53:00 +00:00
Fintan Halpenny 026dcdb24a node: Update 0.18.0 2026-03-18 20:53:00 +00:00
Fintan Halpenny a9c1c6ef54 protocol: Update to 0.6.0 2026-03-18 20:53:00 +00:00
Fintan Halpenny 8660b2f004 fetch: Update to 0.18.0 2026-03-18 20:53:00 +00:00
Fintan Halpenny 4a731e34e1 radicle: Update to 0.22.0 2026-03-18 20:52:18 +00:00
Fintan Halpenny dafd3527ee git-metadata: Update to 0.2.0 2026-03-18 20:52:18 +00:00
Fintan Halpenny c9450fe84a cob: Update to 0.19.0 2026-03-18 20:44:25 +00:00
Fintan Halpenny 244be71596 core: Update to 0.2.0 2026-03-18 20:44:25 +00:00
Fintan Halpenny 6745865197 crypto: Update to 0.16.0 2026-03-18 20:44:25 +00:00
Matthias Beyer 99d9242122 Use humantime to parse timeouts
In issue

    29c6c6fc8171287faa0079798ba2d6e3e7fd86f3

was noted that it would be nice to use value parsers for the timeouts in
the CLI.

This patch implements this.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Co-Authored-by: Fintan Halpenny <fintan.halpenny@gmail.com>
2026-03-17 11:39:09 +00:00
Fintan Halpenny a1fd9e04fe radicle: Update `sqlite` to 0.37
The `concat` function is not present in version 0.32 of `sqlite`, since
it was introduced in 3.44[^0].
Update the `sqlite` to version 0.37, which brings in 3.45[^1], via
`sqlite3_sys`.

[^0]: https://sqlite.org/forum/forumpost/c14028be1b9c0e20de9e39d70706adc9f5a36bb5ccaad6db22f7d99633eafff8
[^1]: https://docs.rs/sqlite3-sys/0.18.0/sqlite3_sys/constant.SQLITE_VERSION.html
2026-03-17 10:19:40 +01:00
Fintan Halpenny b04f487b3a term: Update to 0.17.0 2026-02-20 14:09:35 +00:00
Fintan Halpenny 9a98cf7b16 keccak: Update to 0.1.6
The dependency version 0.1.5 is yanked from crates.io.

Update the dependency to use 0.1.6.
2026-02-20 14:06:01 +00:00
Fintan Halpenny bab3f82abd fetch: Update to 0.17.0 2026-02-20 14:04:16 +00:00
Fintan Halpenny f9a36ef7ac systemd: Update to 0.12.0 2026-02-20 13:11:50 +00:00
Fintan Halpenny 18d6ce9477 protocol: Update 0.5.0 2026-02-19 21:06:43 +01:00
Fintan Halpenny c0ae5e32d9 node: Update to 0.17.0 2026-02-19 21:06:43 +01:00
Fintan Halpenny 963b4ded2b crypto: Update to 0.15.0 2026-02-19 21:06:43 +01:00
Fintan Halpenny 84e9ffe4dc cob: Update to 0.18.0 2026-02-19 21:06:43 +01:00
Fintan Halpenny 186d8d30fe cli: Update to 0.18.0 2026-02-19 21:06:43 +01:00
Fintan Halpenny 3a11074600 radicle: Update to 0.21.0 2026-02-19 21:06:43 +01:00
Fintan Halpenny 89478b16fe cargo/git2: Update to 0.20.4
Update to `git2` to 0.20.4` and `radicle-surf` to 0.27.0.

This fixes a low severity vulnerability[^0].

[^0]: https://github.com/advisories/GHSA-j39j-6gw9-jw6h
2026-02-19 20:57:18 +01:00
Lorenz Leutgeb 5fa68ed814
node: Use `gix_packetline`
`gix-packetline` already is in the dependency closure of `radicle-node`.
Use the well-tested and -used reader instead of ours.
2026-02-16 21:42:59 +01:00
Fintan Halpenny 7862e108b6 Update gix-* crates
Fixes [CVE-2026-0810].

The `gix` crates require updating due to the security vulnerability above.
They require updating together in lock-step so both `radicle-fetch`
and `radicle-oid` are affected.

`radicle-oid` handles the non-exhaustive nature of `ObjectId`.

`radicle-fetch` updates to the new API types, however, this comes with
some updates to the `ls_refs` protocol.

A regression is documented in [gitoxide issue 2429].
The regression highlighted that it is the duty of the caller to also
filter the outcome of ls-refs, and `ref-prefix` is simply an
optimisation.

The ls-refs code is refactored to better represent and handle this operation.

[CVE-2026-0810]: https://www.cve.org/CVERecord?id=CVE-2026-0810
[gitoxide issue 2429]: https://github.com/GitoxideLabs/gitoxide/issues/2429
2026-02-16 17:13:39 +00:00
Lorenz Leutgeb a1fa38018e protocol: Depend on `cypheraddr` not `cyphernet`
`radicle-protocol` depends on `cyphernet`, but only uses the module
`cyphernet::addr`, which is a re-export of `cypheraddr`, which is
unnecessary (as `cypheraddr` alone would do), and invites accidentally
pulling in more dependencies via `cyphernet`.

To prevent accidentally depending on further types from `cyphernet`,
change this to more conservativeley depend on `cypheraddr`.
2026-02-16 09:43:38 +00:00
Fintan Halpenny c06b00e330 CVE-2026-25727
Report: <https://www.cve.org/CVERecord?id=CVE-2026-25727>

The `time` crate was a transitivie dependency of `human-panic`.
Updating `human-panic` to 2.0.6 removes the `plist`, and in turn,
`time` dependencies.
2026-02-13 19:08:26 +01:00
Fintan Halpenny 31607cf7ad CVE-2026-25541
Report: <https://www.cve.org/CVERecord?id=CVE-2026-25541>

This vulnerability was introduced via the `bytes` crate.

Update to 1.11.1, as recommended.
2026-02-13 19:07:39 +01:00