2026-09-08 19:36:10 +02:00
|
|
|
# OpenUltraSAST as a contributor runs it: nothing installed on the host but Docker.
|
|
|
|
|
#
|
|
|
|
|
# docker compose build
|
2026-11-26 13:25:20 +01:00
|
|
|
# mkdir -p reports
|
2026-09-08 19:36:10 +02:00
|
|
|
# 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:
|
2026-09-12 18:32:18 +02:00
|
|
|
JOERN_VERSION: ${JOERN_VERSION:-v4.0.625}
|
2026-11-24 14:04:33 +01:00
|
|
|
# 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-b696c08}
|
|
|
|
|
TASK_BASE_DIGEST: ${TASK_BASE_DIGEST:-sha256:0f374138fcb49fef41609d323cc80b6c2324b1e798d3a2aee5c8038b8c7ac3aa}
|
2026-09-08 19:36:10 +02:00
|
|
|
image: openultrasast:${OUSAST_VERSION:-dev}
|
|
|
|
|
volumes:
|
2026-11-26 17:44:46 +01:00
|
|
|
# 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
|
2026-11-26 13:25:20 +01:00
|
|
|
# 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
|
2026-09-08 19:36:10 +02:00
|
|
|
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:-}
|
2026-11-24 14:04:33 +01:00
|
|
|
# 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
|
2026-09-08 19:36:10 +02:00
|
|
|
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
|