Java with DevFlow: scanning, verification, isolation

DevFlow runs Java tasks in devflow/agent-universal:stable, audits pom.xml and Gradle lockfiles in a bounded walk of the tree with osv-scanner, and caps every test container at 4 CPUs and 4 GB of memory.

Manifests
pom.xml, gradle.lockfile, buildscript-gradle.lockfile
Dependency scanner
osv_scanner
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 Java 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 pom.xml and Gradle lockfiles in a bounded walk of the tree and runs osv-scanner when a task finishes and on recurring vulnerability polls. One static binary covers both JVM build tools, scoped to JVM manifests so it does not double-report what the other scanners find. 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 mvn -B -q package -DskipTests and mvn -B test. The universal image ships OpenJDK 17 and Maven from Debian bookworm. With no commands configured, the task can merge unverified, and the timeline shows it.

Isolation and limits

Caches resolve under $HOME, a per-container tmpfs, so a local Maven repository never persists into the image. 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

Add a null check to a service method. The planner traces the callers and proposes a plan you approve. The implementer adds the guard and a unit test in the worktree, the gate runs the repo's Maven test command, and the PR opens on a devflow branch.

FAQ

Is a Gradle project scanned?

Only when it commits a Gradle lockfile. A build script on its own is not a manifest the scanner reads.

Which JDK do agents get?

OpenJDK 17 with Maven, in devflow/agent-universal:stable.

What happens when a test container runs out of memory?

The container is killed at its memory cap (4 GB by default) and the failure is classed as a build environment error, so it is not sent back for rework.