Rust with DevFlow: scanning, verification, isolation
DevFlow runs Rust tasks in devflow/agent-universal:stable, audits every committed lockfile in a bounded walk of the tree with cargo-audit, and caps every test container at 4 CPUs and 4 GB of memory.
- Manifests
Cargo.lock- Dependency scanner
cargo_audit- Agent image
devflow/agent-universal:stable- Scan timeout
- 300 s per scan by default
- Container caps
- 4 CPUs, 4 GB memory (6 GB with swap), 512 processes
How a Rust task runs
You describe the task, the planner reads the code and may ask questions, and implementation starts only after you approve the plan. The plan splits into at most 8 subtasks, implemented in a git worktree on the branch devflow/<id>, then verified, summarized and opened as a PR. Agents work in the image listed above.
Dependency scanning
The scanner looks for every committed lockfile in a bounded walk of the tree and runs cargo-audit when a task finishes and on recurring vulnerability polls. It also reports RustSec warnings for unmaintained, unsound and yanked crates, and DevFlow computes a base score from the CVSS vector. Each scan stops after 300 seconds by default (SCANNER_TIMEOUT_SECONDS) and never blocks the gate.
Verification gates
Gates run only the configured test_commands, stored as bare in-container commands, for example cargo build and cargo test. The universal image installs stable via rustup with the minimal profile, readable by any user. With no commands configured, the task can merge unverified, and the timeline shows it.
Isolation and limits
The toolchain sits under /usr/local/rustup, while CARGO_HOME stays unset so the registry cache lands under $HOME, a per-container tmpfs. Test and build commands run in Docker as a non-root user, capped by default at 4 GB of memory (6 GB with swap), 4 CPUs and 512 processes. The agent can write only to the task worktree and its git data, toolchain paths such as /usr stay read-only, and code-writing roles reach only allowlisted hosts.
A typical task
Replace a yanked crate. The scan flags the crate, and you open a task for it. After you approve the plan, the implementer updates the manifest and lockfile in the worktree, the gate runs the test command, and the PR goes up on a devflow branch.
FAQ
Does it report unmaintained crates?
Yes. The auditor's informational warnings for unmaintained, unsound and yanked crates are included alongside vulnerabilities.
Is a crate without a lockfile scanned?
No. The scanner looks only for committed lockfiles, so a library crate that leaves its lockfile out gets no audit.
How is severity decided?
The tool emits only a CVSS vector; DevFlow computes the base score from it and maps that to its shared severity buckets.