Files
Open_Ultra_SAST/docker-compose.yml
T
Marius Ciepluch 9b346ea3cc build(image): the base pin follows the version bump
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.
2026-11-29 00:27:57 +01:00

53 lines
2.5 KiB
YAML

# OpenUltraSAST as a contributor runs it: nothing installed on the host but Docker.
#
# docker compose build
# mkdir -p reports
# TARGET=/path/to/repo docker compose run --rm ousast scan /target
#
# The target is mounted READ-ONLY. A tool that reads your source to tell you about it has no business being
# able to write to it, and a contributor evaluating an unfamiliar analyser should not have to take that on
# trust.
services:
ousast:
build:
context: .
args:
JOERN_VERSION: ${JOERN_VERSION:-v4.0.625}
# The base is pinned by digest, the same pin CI builds from (plane/task-base.digest): a bare tag can move.
TASK_BASE_TAG: ${TASK_BASE_TAG:-base-8efad0d}
TASK_BASE_DIGEST: ${TASK_BASE_DIGEST:-sha256:ac342c3d663d50165bc9ecdbfec0a70526f05cd9d546d45596ca6c97270e552e}
image: openultrasast:${OUSAST_VERSION:-dev}
volumes:
# The repository under analysis, read-only. In the long syntax, like /reports below: in the short syntax Docker
# creates a TARGET that does not exist, as an empty directory, and an empty target scans clean.
- type: bind
source: ${TARGET:-.}
target: /target
read_only: true
bind:
create_host_path: false
# Where findings land, the one writable mount. Long syntax on purpose: the short syntax lets Docker create a
# missing source, as root, and the image runs as uid 1000. Create the directory first; the wrapper does.
- type: bind
source: ${OUSAST_REPORTS:-./reports}
target: /reports
bind:
create_host_path: false
working_dir: /work
tmpfs:
# CPG construction is scratch-heavy and none of it should outlive the run or touch the host.
- /work:size=${WORK_SIZE:-4g}
environment:
# The LLM endpoint is optional: without it the model layer still entails, and the suspicion band simply
# goes unasked. Passed through rather than baked in, so no key is ever in an image layer.
DEEPSEEK_API_KEY: ${DEEPSEEK_API_KEY:-}
OPENROUTER_API_KEY: ${OPENROUTER_API_KEY:-}
# A scan's run directory would otherwise land in the container's home and be lost when the container exits.
OPENULTRASAST_RUNS_DIR: /reports/runs
TMPDIR: /work
# A CPG build is memory-hungry, and two Joern JVMs at once is what triggered an out-of-memory kill on a
# 7.7 GB machine during this project's measurements.
mem_limit: ${OUSAST_MEM_LIMIT:-6g}
network_mode: ${OUSAST_NETWORK:-none} # `bridge` only when the LLM judge is wanted