Skip to content

fix(deps): drop vergen-gix; fixes 7 gix-family CVEs + remove unused anstream#5

Merged
catinspace-au merged 4 commits into
mainfrom
chore/deps-update-rust
May 27, 2026
Merged

fix(deps): drop vergen-gix; fixes 7 gix-family CVEs + remove unused anstream#5
catinspace-au merged 4 commits into
mainfrom
chore/deps-update-rust

Conversation

@catinspace-au
Copy link
Copy Markdown
Contributor

Summary

Two changes from a /deps check against the 7-day cooldown rule.

1. Drop vergen-gix build-dep (fixes 7 GHSA)

GitHub reported 7 open Dependabot alerts (6 high + 1 medium) in the gix family, all reachable through vergen-gix 9.1.0 -> gix 0.77.0:

  • gix-fs: symlink prefix-reuse worktree escape
  • gix: 4x .gitmodules path traversal / submodule name validation bypass / arbitrary command execution
  • gix-pack: panic + OOM via crafted pack data
  • gix-transport: HTTP credentials leak on redirect

vergen-gix is a build-dependency only — the shipped binary never carried gix code, but every cargo build did. Upstream fixes land in gix >= 0.83, which is only reachable via vergen-gix 10.0.0-betaN (pre-release).

Rather than depend on a beta build-tool for two env vars, replaced vergen-gix with a 50-line build.rs that emits the same outputs via git rev-parse HEAD and SystemTime::now(). --version is identical.

Cargo.lock: 2278 -> 940 lines. dep count: 218 -> 103.

2. Drop unused anstream dep

Declared in Cargo.toml but never imported in src/ — only anstyle is used. Removing it drops the parallel anstream/anstyle-parse 0.2.x chain.

Frozen by 7-day cooldown (held for next /deps cycle)

  • serde_json 1.0.150 (6d), gix-trace 0.1.20 (1d) [no longer in tree post-vergen-gix removal]
  • jiff 0.2.27 (1d) [no longer in tree], log 0.4.30 (2d) [no longer in tree]
  • autocfg 1.5.1 (5d) [no longer in tree]

Test plan

  • cargo build --release
  • cargo test --release (61 passed)
  • cargo audit (0 advisories)
  • ./target/release/macbash --version (correct sha + RFC3339 timestamp)
  • CI green on this branch
  • GitHub Dependabot alerts close on merge

anstream was declared in Cargo.toml but never used in src/ — only
anstyle is imported (src/output.rs). Dropping it removes a transitive
chain (anstream + anstyle-parse 0.2.x + anstyle-query + utf8parse +
is_terminal_polyfill old versions) without touching any code.

/deps scan: every in-major candidate (serde_json 1.0.150,
gix-trace 0.1.20, gix-utils 0.3.3, jiff 0.2.27, log 0.4.30,
autocfg 1.5.1) is inside the 7-day cooldown and held.
vergen-gix 9.1.0 pulled gix 0.77.0, which is below the patched
versions for 7 RustSec advisories (6 high + 1 medium) covering
.gitmodules path traversal, symlink worktree escape, gix-pack DoS,
and credential leakage in gix-transport HTTP.

vergen-gix is build-only so the shipped binary never carried gix code,
but every cargo build pulled and compiled the affected versions.

Replacement is a 50-line build.rs that emits the same two env vars
(`VERGEN_GIT_SHA`, `VERGEN_BUILD_TIMESTAMP`) via `git rev-parse HEAD`
and `SystemTime::now()`. `--version` output is unchanged.

Cargo.lock: 2278 -> 940 lines, 218 -> 103 dep count.
cargo audit: clean. cargo test: 61 passed.
Three pre-existing semgrep findings escalated to blocking on the PR
quality gate:

1. .github/workflows/package.yml: indirect `inputs.tag` through env:
   instead of direct ${{ }} interpolation in run: block
2. .github/workflows/cross-build.yml: same fix for the `Pick tag`
   step (covers github.event_name, inputs.tag, github.ref_name)
3. packaging/templates/uninstall.sh: replace global `IFS=:` with a
   heredoc + `tr ':' '\\n'` to feed lines into `while read`

Surfaced because semgrep runs only on pull_request events, not push;
findings were sitting on main quietly until PR #5 triggered the gate.
No runtime behaviour change.
@catinspace-au catinspace-au merged commit 59b2144 into main May 27, 2026
10 checks passed
catinspace-au added a commit that referenced this pull request May 27, 2026
Three pre-existing semgrep findings escalated to blocking on the PR
quality gate:

1. .github/workflows/package.yml: indirect `inputs.tag` through env:
   instead of direct ${{ }} interpolation in run: block
2. .github/workflows/cross-build.yml: same fix for the `Pick tag`
   step (covers github.event_name, inputs.tag, github.ref_name)
3. packaging/templates/uninstall.sh: replace global `IFS=:` with a
   heredoc + `tr ':' '\\n'` to feed lines into `while read`

Surfaced because semgrep runs only on pull_request events, not push;
findings were sitting on main quietly until PR #5 triggered the gate.
No runtime behaviour change.
catinspace-au added a commit that referenced this pull request May 27, 2026
Cuts a release containing the gix-family CVE fixes (drop vergen-gix
build-dep) and the anstream removal from PR #5.

Publish: true
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