The version bump of 8efad0d changed pyproject.toml and uv.lock, so the Task base
image workflow ran (run 46200304759) and printed a new pin. The pin had not
moved since b696c08 (2026-10-05). pyproject.toml changed in seven commits before
the bump, and the new base carries tree-sitter-php (4063fd1, 2026-10-14), which
the old one lacked: the base installs the semantic extra from pyproject.toml. So
the new base is not the old one with a new version string. The note in
plane/task-base.digest says: rebuild only when plane/Dockerfile.base,
pyproject.toml or uv.lock change. The release job builds the scan image from
this pin.
What changed
- plane/task-base.digest: base is base-8efad0d at
sha256:ac342c3d663d50165bc9ecdbfec0a70526f05cd9d546d45596ca6c97270e552e,
base-browser is base-8efad0d-browser at
sha256:37d8c489f6aa02872ad93caf14247901fe6782f5a4bb3785f10404251823a94d,
the content key is the hash of the three files, and the note names the run
and main 8efad0d.
- docker-compose.yml: the defaults of TASK_BASE_TAG and TASK_BASE_DIGEST follow
the pin, as tests/test_task_images.py requires. A bare docker compose build
resolves whatever these defaults say.
- RELEASE_NOTES.md: two sentences in the entry of v2.2.0-alpha.1 say that the
base of the scan image is new, that it carries tree-sitter-php, and that the
pin had stood at a base from 2026-10-05, which lacked the package.
Checks
- s10_rel1_base_pins.out: the two pins as the run printed them. The run
inspected both images anonymously after it logged out (s10_rel1_base_job.log).
- s10_rel2_pins_check.out: both pins match the regex of the tests; the content
key equals the hash computed here from the three files; the JSON parses.
- s10_rel2_diffcheck.out: git diff --check exits 0; no tracked line holds an old
value; no non-ASCII character added; the widest added line of the notes is 94
columns.
- s10_rel2_pytest.out: with the new pin and the old compose defaults,
tests/test_task_images.py and tests/test_search_image.py: 1 failed, 27 passed
(test_compose_builds_from_the_pinned_base).
- s10_rel2_pytest_green.out: after the compose change, those two files and
tests/test_shell_wrapper.py: 34 passed.
- s10_rel2_exits.txt: the gates with label rel2, ten zeros. Three files,
+12 -10.
- The s10 files are under /tmp/opencode, outside the repository.
Not verified
- The Engine image workflow and the CI run that this push starts.
- A build of the scan image from the new base: the release job does it.
Review.
Round one checked the pin: both digests equal the BASE and BROWSER values of the
job log, from a run on 8efad0d that inspected both images after its logout; the content
key and the compose defaults were recomputed, the RED was rebuilt in a scratch tree, and
no old value was left anywhere. It asked three corrections of the message, which were
made. Round two found the pin files byte-identical and stopped one sentence of the
notes: the previous prerelease pinned base-b696c08, but its release job passed no base
to the scan image, so the comparison with it did not hold. Round three found the pin
files unchanged again and the notes differing from round two in that bullet's six lines
only; the two sentences now stand against the record, and the three image test files
give 34 passed here. Not checked: the browser layer prefix, the Engine image run this
push starts, a scan image build, and the registry now.
A mistyped TARGET read as a clean scan. The `/target` mount was in the short syntax, so
Docker created a path that does not exist as an empty directory owned by 0:0, and the
scan ended with exit 0 and no findings (the eighth session, 2026-11-26: file_targets=0,
findings=0, exit=0).
The mount is now in the long syntax with `create_host_path: false`, as `/reports` is
since 9d53c32. The source is still `${TARGET:-.}` and the mount is still read-only. A
path that does not exist is refused by the daemon before the container starts ("bind
source path does not exist"), and nothing is created. Measured on 2026-11-26 with the
new file alone in a scratch directory, Docker 29.8.1 and Compose v5.5.1, image
openultrasast:dev (3f959b31f2f2), both API keys unset: a TARGET that does not exist
gives exit 1 in one second and no directory; the documented command with `--mode quick`
on a copy of libpng's contrib/examples gives file_targets=4, findings=4, exit 0;
`touch /target/x` ends with "Read-only file system", exit 1; with TARGET unset the
default source mounts (exit 0).
Tests: the new
`tests/test_task_images.py::test_compose_refuses_a_target_that_does_not_exist` fails on
the short syntax (1 failed, 22 deselected) and passes after; with
`tests/test_search_image.py`, 24 passed. ruff format, ruff check, mypy, the three gates
and compileall pass, and the gates print what they printed before the change. An
independent reviewer approved the change in one round; its remarks on two wordings are
applied.
Left as they are: `docs/detection-techniques.md` cites `docker-compose.yml` by line
numbers that were already off before this change; that is the next docs commit of item
5a. An empty directory that exists still scans clean, natively and in the image; the
menu did not choose to fail that.
On a fresh checkout the documented command, `TARGET=/path/to/repo docker compose run
--rm ousast scan /target`, died before scanning. The `/reports` mount was in the short
syntax, so Docker created a missing `./reports` as root, and the image runs as uid 1000.
On 2026-11-26, from a copy of the compose file at 8daca3d, Docker created the directory
owned by 0:0 and the scan stopped after one second with exit 1 and `PermissionError:
[Errno 13] Permission denied: '/reports/runs'`.
The mount is now in the long syntax with `create_host_path: false`, so nothing is
created. Without the directory the daemon refuses the container ("bind source path does
not exist") and leaves nothing behind. After `mkdir -p reports` the same command
completes with exit 0 and writes the run directory owned by the user (quick mode on four
C files: file_targets=4, findings=4). The documented command in the compose header, in
`README.md` and in `ops/README.md` creates the directory first. Both shell wrappers
already did.
Tests: the new `tests/test_task_images.py::test_compose_leaves_the_reports_directory_to_the_user`
fails on the short syntax (1 failed, 16 deselected) and passes after; with
`tests/test_search_image.py`, 18 passed. The eight test files that read `README.md` pass
(183 tests). ruff format, ruff check, mypy, the three gates and compileall pass, and the
gates print what they printed before the change. An independent reviewer approved the
change in one round.
Left as it was, an open item for the maintainer: the `/target` mount is still in the
short syntax, so a `TARGET` that does not exist is created as an empty root-owned
directory and the scan ends with exit 0 and no findings (measured on 2026-11-26).
`docker compose build` has failed since 1b9d1ca (2026-10-05): the Dockerfile requires the task
base's tag and digest and deliberately has no floating fallback, but the compose file passed
neither argument. Compose now defaults both from plane/task-base.digest, the pin CI builds
from, and a test fails when the two drift apart or an argument goes missing.
The service also sets OPENULTRASAST_RUNS_DIR=/reports/runs, so a scan's run directory lands on
the one writable mount (Req 6.3) whatever the default location is.
Built and verified once, with no scan (2026-11-24, 11:02Z to 11:10Z): `docker compose build`
exit 0 in 8m03s, the Joern zip passing its sha512 check, and inside the image the CLI usage,
native PHP 8.4.26, lib/io.joern.joern-cli-4.0.625.jar, the installed package, and the pinned
base's 12 layers and 24 history entries as the image's prefix. That image held HEAD's source
and was removed from the build machine by a Docker prune at 12:56Z.
Task 3.2 stays open: the image must be rebuilt after task 3.1 lands, and part 2 (a real scan
through the image and the shell wrapper, parity with a native run) is not done. Known for part
2: on a fresh checkout Docker creates ./reports root-owned and the image runs as uid 1000, so
the first run cannot write its output.
source ops/shell/ousast.sh # bash / zsh
. ops\shell\ousast.ps1 # powershell
ousast scan .
ousast scan src/api
The container becomes an implementation detail. The engine is a JVM and ~2 GB
of Joern, and a contributor evaluating this tool should not have to install
either to try it -- what they get is a command.
Path rewriting is what makes it feel local: arguments under the working
directory are mapped to their mounted equivalents, so `src/api` means what the
user expects. Anything outside the mount is passed through unchanged WITH A
WARNING rather than silently rewritten into a path the container cannot see --
a wrong path that looks like it worked is worse than one that complains.
A native install wins when it is present. Someone who installed Joern
deliberately should not be quietly routed through a container, so the wrapper
uses a local joern-parse and venv when both exist; OUSAST_PREFER_NATIVE=0
forces the container. Verified end to end from an unrelated directory.
The image builds itself on first use and says why it is pausing. A first run
that prints a wall of build output and then works is worse than one that
explains itself.
Defaults stay conservative: the working directory mounts READ-ONLY, findings go
to ./.ousast as the only writable mount, and the network is off unless
`ousast-with-judge` asks for it.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01T7XD7x5KonMdmGRkp63EQG
A contributor should be able to run this with nothing installed but Docker:
docker compose build
TARGET=/path/to/repo docker compose run --rm ousast scan /target
One image rather than two services, and the reason is the seam. The model
layer reaches Joern by subprocess; putting both in the same image means Joern
is simply on PATH, so there is no container-to-container call, no docker socket
to mount, no host/container path translation, and no second code path in
cpg/backend.py to get wrong. Sibling services would need the tool to exec into
the engine's container, which means handing a linter the docker socket -- a
large amount of privilege for something that reads source code. The image is
big (a JRE plus ~2 GB of Joern); that is the honest cost of bundling an engine.
I had started building the two-service version with a docker-wrapper mode in
the backend and dropped it, tests included: once the engine is on PATH the
wrapper is complexity with no purpose.
Defaults chosen so an unfamiliar analyser is safe to try: the target mounts
READ-ONLY, /work is a tmpfs so CPG scratch never outlives the run or touches
the host, network_mode is `none` unless the LLM judge is wanted, and API keys
pass through the environment rather than into an image layer. mem_limit is set
because two Joern JVMs at once is what triggered an out-of-memory kill on a
7.7 GB machine during this feature's measurements.
pyinfra deploy kept for persistent host installs, with the same version pin and
the same checksum verification -- done as an explicit `sha512sum -c` step
because pyinfra's files.download offers sha384/sha256/sha1/md5 and Joern
publishes sha512. That mismatch was caught by validating against the installed
pyinfra rather than trusting the API from memory.
Both include php-cli: php2cpg drives PHP-Parser and shells out to a real
interpreter, and without it a PHP tree fails with an opaque "Process exited
with code 1" -- measured here, which is what makes a WordPress corpus feasible.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01T7XD7x5KonMdmGRkp63EQG