Skip to content

Conversation

@genos
Copy link

@genos genos commented Sep 22, 2025

Hello! And thanks for relrc, it's really interesting.

According to cargo-audit, relrc is vulnerable to a RUSTSEC advisory due to reliance on the unmaintained fxhash:

$ cargo audit
    Fetching advisory database from `https://github.com/RustSec/advisory-db.git`
      Loaded 820 security advisories (from /Users/graham/.cargo/advisory-db)
    Updating crates.io index
    Scanning Cargo.lock for vulnerabilities (73 crate dependencies)
Crate:     fxhash
Version:   0.2.1
Warning:   unmaintained
Title:     fxhash - no longer maintained
Date:      2025-09-05
ID:        RUSTSEC-2025-0057
URL:       https://rustsec.org/advisories/RUSTSEC-2025-0057
Dependency tree:
fxhash 0.2.1
└── relrc 0.5.0

warning: 1 allowed warning found

This tiny PR replaces fxhash with the suggested rustc-hash.

Hello! And thanks for `relrc`, it's really interesting.

According to [`cargo-audit`](https://crates.io/crates/cargo-audit), this
is vulnerable to a RUSTSEC advisory due to reliance on hte unmaintained
`fxhash`:

```
$ cargo audit
    Fetching advisory database from `https://github.com/RustSec/advisory-db.git`
      Loaded 820 security advisories (from /Users/graham/.cargo/advisory-db)
    Updating crates.io index
    Scanning Cargo.lock for vulnerabilities (73 crate dependencies)
Crate:     fxhash
Version:   0.2.1
Warning:   unmaintained
Title:     fxhash - no longer maintained
Date:      2025-09-05
ID:        RUSTSEC-2025-0057
URL:       https://rustsec.org/advisories/RUSTSEC-2025-0057
Dependency tree:
fxhash 0.2.1
└── relrc 0.5.0

warning: 1 allowed warning found
```

This tiny PR replaces `fxhash` with the suggested `rustc-hash`.
github-merge-queue bot pushed a commit to Quantinuum/hugr that referenced this pull request Sep 22, 2025
…2572)

According to [`cargo-audit`](https://crates.io/crates/cargo-audit),
there are a few RUSTSEC advisories lurking in `hugr` due to unmaintained
dependencies:

- `fxhash`, both directly and transitively via `relrc`
- `instant`, transitively via `ascent`
- `paste`, both directly and transitively via `ascent`

This PR replaces local `fxhash` usage with the suggested
[`rustc-hash`](https://crates.io/crates/rustc-hash) and `paste` with the
successor [`pastey`](https://crates.io/crates/pastey).

**Of note:** switching to `rustc-hash` changed a couple of the testing
snapshots. I think everything is still in there, but the ordering has
shuffled a bit.

Of course, the transitive dependencies require updates to `ascent` and
`relrc`; see [this `ascent`](s-arash/ascent#73)
PR and [this `relrc`](lmondada/relrc#8) one.
If/when those get merged and released, we'd want to bump the versions of
those packages here, too.

<details>
<summary>Output of cargo audit</summary>

```
$ cargo audit
    Fetching advisory database from `https://github.com/RustSec/advisory-db.git`
      Loaded 820 security advisories (from /Users/graham/.cargo/advisory-db)
    Updating crates.io index
    Scanning Cargo.lock for vulnerabilities (416 crate dependencies)
Crate:     fxhash
Version:   0.2.1
Warning:   unmaintained
Title:     fxhash - no longer maintained
Date:      2025-09-05
ID:        RUSTSEC-2025-0057
URL:       https://rustsec.org/advisories/RUSTSEC-2025-0057
Dependency tree:
fxhash 0.2.1
├── relrc 0.4.6
│   ├── hugr-persistent 0.2.3
│   │   └── hugr 0.22.3
│   │       ├── hugr-core 0.22.3
│   │       │   ├── hugr-persistent 0.2.3
│   │       │   ├── hugr-passes 0.22.3
│   │       │   │   └── hugr 0.22.3
│   │       │   ├── hugr-llvm 0.22.3
│   │       │   │   ├── hugr-llvm 0.22.3
│   │       │   │   └── hugr 0.22.3
│   │       │   └── hugr 0.22.3
│   │       └── hugr-cli 0.22.3
│   └── hugr-core 0.22.3
├── hugr-model 0.22.3
│   ├── hugr-py 0.1.0
│   ├── hugr-core 0.22.3
│   └── hugr 0.22.3
└── hugr-core 0.22.3

Crate:     instant
Version:   0.1.13
Warning:   unmaintained
Title:     `instant` is unmaintained
Date:      2024-09-01
ID:        RUSTSEC-2024-0384
URL:       https://rustsec.org/advisories/RUSTSEC-2024-0384
Dependency tree:
instant 0.1.13
└── ascent 0.8.0
    └── hugr-passes 0.22.3
        └── hugr 0.22.3
            ├── hugr-core 0.22.3
            │   ├── hugr-persistent 0.2.3
            │   │   └── hugr 0.22.3
            │   ├── hugr-passes 0.22.3
            │   ├── hugr-llvm 0.22.3
            │   │   ├── hugr-llvm 0.22.3
            │   │   └── hugr 0.22.3
            │   └── hugr 0.22.3
            └── hugr-cli 0.22.3

Crate:     paste
Version:   1.0.15
Warning:   unmaintained
Title:     paste - no longer maintained
Date:      2024-10-07
ID:        RUSTSEC-2024-0436
URL:       https://rustsec.org/advisories/RUSTSEC-2024-0436
Dependency tree:
paste 1.0.15
├── hugr-py 0.1.0
├── hugr-passes 0.22.3
│   └── hugr 0.22.3
│       ├── hugr-core 0.22.3
│       │   ├── hugr-persistent 0.2.3
│       │   │   └── hugr 0.22.3
│       │   ├── hugr-passes 0.22.3
│       │   ├── hugr-llvm 0.22.3
│       │   │   ├── hugr-llvm 0.22.3
│       │   │   └── hugr 0.22.3
│       │   └── hugr 0.22.3
│       └── hugr-cli 0.22.3
├── hugr-core 0.22.3
├── ascent_base 0.8.0
│   ├── ascent_macro 0.8.0
│   │   └── ascent 0.8.0
│   │       └── hugr-passes 0.22.3
│   └── ascent 0.8.0
└── ascent 0.8.0

warning: 3 allowed warnings found
```

</details>

BREAKING CHANGE: replaced `fxhash` and `paste` with `rustc-hash` and
`pastey`, respectively.
@genos genos closed this by deleting the head repository Sep 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant