oxidecomputer / oxidecomputer/falcon

Static evaluation of `CARGO_WORKSPACE_DIR` env var leaks to consumers.

Open
#41 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Rust
Stars
20
Forks
5
Avg merge
11d 13h
Merged PRs (30d)
2

Description

In the following code

https://github.com/oxidecomputer/falcon/blob/29deea13ca8a4ab92613983fc3e4e2ace6449fc9/ztest/src/lib.rs#L298-L337

the falcon ztest library is evaluating CARGO_WORKSPACE_DIR at compile time. This check also happens in any crate that consumes ztest and then goes on to transitively impact all crates in a dependency tree involving ztest. This is highly undesirable behavior. Figure out a better way to find workspace binaries than the current approach.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read ztest/src/lib.rs lines 298-337 and trace how CARGO_WORKSPACE_DIR is evaluated during compilation, including when ztest is consumed transitively. Investigate alternatives for locating workspace binaries without affecting consumer crates. Done means workspace binaries remain discoverable while the environment lookup no longer leaks through dependent builds.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
testing, tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.