Skip to content

chore(security): patch dependency advisories and close cache-poisoning alerts - #166

Open
panos-xyz wants to merge 3 commits into
mainfrom
deps/patch-security-advisories
Open

chore(security): patch dependency advisories and close cache-poisoning alerts#166
panos-xyz wants to merge 3 commits into
mainfrom
deps/patch-security-advisories

Conversation

@panos-xyz

@panos-xyz panos-xyz commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Clears the open security alerts on main: 2 of 3 Dependabot advisories and all 3 code-scanning alerts.

Source Alert Severity Target Status
Dependabot GHSA-4w2j-m93h-cj5j high quinn-proto < 0.11.15 fixed → 0.11.17
Dependabot GHSA-7gcf-g7xr-8hxj moderate serde_with < 3.21.0 fixed → 3.22.0
Dependabot GHSA-xwfj-jgwm-7wp5 low tracing-subscriber 0.2.25 not fixable, see below
Code scanning #46 / #47 / #48 high actions/cache-poisoning/poisonable-step fixed
cargo-deny RUSTSEC-2026-0247 bitmaps unmaintained ignored, see below

1. Dependency advisories (Cargo.lock only)

Both are transitive, so this is a lockfile-only bump.

  • serde_with is reachable from the built binary via alloy-consensus, so this alert was real.
  • quinn-proto resolves in the lockfile but cargo tree -i quinn-proto finds nothing — it is not in the compiled graph. Bumped to clear the alert rather than because it was exploitable.

The new lockfile entries (jiff*, defmt*, bitflags 1.x, rand_pcg, portable-atomic-util) are optional dependencies of the two upgraded crates, recorded by the resolver without being compiled.

The low-severity one is not fixable

GHSA-xwfj-jgwm-7wp5 against tracing-subscriber 0.2.25 has no in-range patch and is unreachable:

revm-precompile → ark-bn254 → ark-r1cs-std → ark-relations 0.5.1
                                              └── tracing-subscriber = "0.2"  (optional)
  • ark-relations declares it optional and the enabling feature is off, so cargo tree -i tracing-subscriber@0.2.25 returns nothing — it never compiles into morph-reth.
  • The advisory is fixed in 0.3.20; ark-relations requires version = "0.2", so no patch exists in range.

Suggest dismissing that alert as not-affected rather than forcing a resolution.


2. Cache poisoning in release.yml

Alert Line Step
#46 68 Verify Cargo.toml version matches tag (cargo metadata)
#47 110 Install cross main (cargo install cross --git)
#48 135 Build binary (make build-*)

The workflow takes a tag input on workflow_dispatch and feeds it to actions/checkout as needs.extract-version.outputs.ref. Dispatch runs hold write access to the default-branch cache scope, so an arbitrary ref could be built and its output written into a cache entry that privileged workflows later restore.

The untrusted checkout is the source; the cache is the sink. This PR removes the sink.

Why remove the cache rather than the dispatch input

  1. It is CodeQL's own first recommendation: "Avoid using caching in workflows that handle sensitive operations like releases."
  2. Upstream reth does exactly this. Its release workflow uses the same untrusted-ref pattern —
    env:
      RELEASE_REF: ${{ inputs.ref || github.ref }}
    ...
    - uses: actions/checkout@3d3c42e... # v7.0.1
      with:
        ref: ${{ env.RELEASE_REF }}
    — and caches nothing, which is why the alert does not apply to them.
  3. No capability is lost. workflow_dispatch, dry_run and profile all stay.

Removing workflow_dispatch instead would also clear the alerts but would drop the manual dry-run and maxperf reference-build path.

Cost: a cold build per release. Releases are infrequent — ten runs over the past five months, all tag pushes — so the isolation is worth more than the build time.

Other workflows are not affected

  • test.yml, lint.yml, build.yml: pull_request / push: [main], and they check out github.ref. PR runs are scoped to the PR branch cache.
  • docker.yml: its workflow_dispatch takes no inputs and its checkout has no ref: override.

None combine an untrusted ref with a cache, which matches code scanning flagging only release.yml.


3. cargo-deny: RUSTSEC-2026-0247

Unrelated to the two changes above, but it blocks this PR (and every other open PR).
The advisory was published after main last ran CI:

error[unmaintained]: bitmaps is unmaintained
  ID: RUSTSEC-2026-0247
  the bitmaps repository was archived on 2026-05-03
  all versions affected -- Solution: No safe upgrade is available!

bitmaps 3.2.1 is unchanged from main; it is not one of the entries this PR adds
to the lockfile. It reaches us only transitively, and only through upstream reth:

bitmaps 3.2.1 <- imbl 7.0.0 <- reth-transaction-pool 2.4.0 <- morph-*

There is nothing to bump on our side, and unmaintained is not a vulnerability.
Upstream reth already ignores this advisory with the same reasoning, so this
follows it rather than pinning around a dependency we do not own. The entry
matches the three unmaintained-crate entries already in deny.toml.


Verification

cargo check --workspace --all-targets   # passes

CodeQL on this branch reports zero cache-poisoning alerts, so all three are resolved — including #46, which sits in check-version and has no cache step of its own. That confirms the query's cache condition is evaluated per workflow, not per job, so removing the single caching action clears every flagged step. The default-branch alerts close once this merges.

Follow-up, not in this PR

Upstream also pins actions by SHA and declares workflow-level permissions: {} with explicit per-job grants; we use floating @v7 / @v2 tags. Upstream additionally audits workflows with zizmor rather than CodeQL. Worth doing, but out of scope here.

Dependabot flags two advisories against the lockfile:

- GHSA-4w2j-m93h-cj5j (high) quinn-proto < 0.11.15 -> 0.11.17
- GHSA-7gcf-g7xr-8hxj (moderate) serde_with < 3.21.0 -> 3.22.0

Both are transitive, so this is a lockfile-only bump. `serde_with` is reachable
from the built binary via alloy-consensus; `quinn-proto` resolves in the
lockfile but is not in the compiled graph, and is bumped to clear the alert
rather than because it was exploitable.

The added lockfile entries (jiff*, defmt*, bitflags 1.x, rand_pcg,
portable-atomic-util) are optional dependencies of the two upgraded crates and
are recorded by the resolver without being compiled.

`cargo check --workspace --all-targets` passes.

The third open Dependabot alert, GHSA-xwfj-jgwm-7wp5 (low) against
tracing-subscriber 0.2.25, is deliberately not addressed here. That version is
an optional dependency of ark-relations 0.5.1 (reached via
revm-precompile -> ark-bn254 -> ark-r1cs-std), its feature is not enabled, so
it never compiles into morph-reth. The advisory is fixed in 0.3.20, and
ark-relations pins `version = "0.2"`, so no in-range patch exists.
@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@panos-xyz, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 46 minutes

Limit details: You’ve used all 1 included review currently available under your plan.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 227698de-c78c-4c2d-9b7b-a3c7cec03412

📥 Commits

Reviewing files that changed from the base of the PR and between 7db29dd and b8d598b.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • .github/workflows/release.yml
  • deny.toml

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Code scanning reports three high-severity
`actions/cache-poisoning/poisonable-step` alerts against release.yml, at the
`cargo metadata`, `cargo install cross`, and `make build-*` steps.

The workflow accepts a `tag` input on workflow_dispatch and feeds it to
`actions/checkout` as `needs.extract-version.outputs.ref`. Dispatch runs hold
write access to the default-branch cache scope, so an arbitrary ref could
build and write a cache entry that later privileged workflows restore.

The untrusted checkout is the source; the cache is the sink. Removing
`Swatinem/rust-cache` removes the sink and keeps workflow_dispatch, `dry_run`
and `profile` intact. This is also CodeQL's first recommendation ("avoid using
caching in workflows that handle sensitive operations like releases") and
matches upstream reth, whose release workflow uses the same
`inputs.ref || github.ref` checkout pattern and caches nothing.

Cost is a cold build per release. Releases are infrequent — ten runs over the
past five months, all tag pushes — so the isolation is worth more than the
build time.

The other cached workflows are unaffected: test/lint/build run on
`pull_request` or `push: main` and check out `github.ref`, and docker.yml's
workflow_dispatch takes no inputs, so none of them combine an untrusted ref
with a cache.
@panos-xyz panos-xyz changed the title deps: patch quinn-proto and serde_with advisories chore(security): patch dependency advisories and close cache-poisoning alerts Aug 18, 2026
cargo-deny started failing on every PR after RUSTSEC-2026-0247 was published:
the bitmaps repository was archived on 2026-05-03, so the crate is flagged
unmaintained with all versions affected and no upgrade available.

It reaches us only transitively, and only through upstream reth:

    bitmaps 3.2.1 <- imbl 7.0.0 <- reth-transaction-pool 2.4.0 <- morph-*

There is nothing to bump on our side, and unmaintained is not a vulnerability.
Upstream reth ignores the same advisory with the same reasoning, so follow it
rather than pinning around a dependency we do not own.

This matches the three unmaintained-crate entries already in the ignore list.
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