mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-12-03 10:18:18 +00:00
739688730f9ddf3dc43e4669aa0c06bab7faefab
10
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
55583b34c3 |
fix(images): the replay entry leaves benchmarks/unseen, so the replay stage builds (item 5b)
The maintainer's answer of 2026-11-27 to question 1 of the ninth session's menu, "Move the file, fix now": the script leaves benchmarks/unseen for a path the build context keeps, and the four references follow. .dockerignore:32 has excluded benchmarks/unseen since |
||
|
|
5ad9e7781d |
fix(contributor-scan): compose refuses a target that does not exist (item 5a)
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
|
||
|
|
88ea171dbe |
fix(contributor-scan): the release builds the scan image from the pinned base (3.2, part 2)
The `images` job of `.github/workflows/release.yml` built `Dockerfile` with no build arguments, so the file's own defaults applied: `TASK_BASE_TAG=base-unpublished` and an empty digest. The first `FROM` could not be resolved. The log of the `v2.1.0-alpha.1` tag's run (42229293910, job `images (openultrasast, Dockerfile)`, 2026-11-06T13:54:46Z) reads `ERROR: failed to build: failed to solve: failed to parse stage name "ghcr.io/norandom/ousast-task-base:base-unpublished@": invalid reference format`. Compose had the same defect, closed in |
||
|
|
9d53c320a5 |
fix(contributor-scan): compose leaves the reports directory to the user (3.2, part 2)
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
|
||
|
|
a706a7d811 |
build(image): the app layers name the runtime user, so the chown layer is gone
By the maintainer's decision of 2026-11-25, recorded in the handover. The option as offered: "Drop the duplicate chown layer", as offered: "`COPY --chown` on the app file layers instead of a final `chown -R`. Every file under `/app` stays owned by uid 1000, compared file by file in the rebuilt image." `RUN chown -R ousast /app` ran after the last COPY, so it copied every file of `/app` into a second layer: 194 MB beside the 189 MB `benchmarks` layer in the local image, and the build of 2026-11-25 spent 311 of its 470 seconds in it. The line is removed, and the copies it covered take `--chown=1000` as `benchmarks` already did: `pyproject.toml`, `README.md` and `LICENSE` in one, `src` in the other. Nothing after the last COPY writes under `/app`: the pip install runs with the uv_build backend and left nothing there in the image built on 2026-11-25. Two things are expected to change besides the layer. `/app` itself, which `WORKDIR` creates, is owned by root, where `chown -R` made it uid 1000. And the files that were gid 0 take gid 1000. No tracked use writes into `/app` as the runtime user: compose runs in `/work` and writes under `/reports`, the wrapper `ops/ousast-docker` works in the mounted repository, and the workflows build and push. Tests: the new `tests/test_task_images.py::test_app_layers_carry_their_owner` fails on a `RUN chown` in the final stage and on a `COPY` into it that does not start with `COPY --chown=1000 `. It failed before the change (1 failed, 15 passed) and passes after; with `tests/test_search_image.py`, 17 passed. On scratch copies it fails when the chown line is put back and when the flag is dropped from `COPY src ./src`. `test_digest_required_and_code_last` found its code line by `COPY src `; it accepts the new prefix, and its ordering check is unchanged. ruff, 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. Not claimed here: the rebuilt image. It follows in this step's next part, with the proof that every file under `/app` is owned by uid 1000 and that `/app` holds the tracked files only. |
||
|
|
005bffb677 |
build(image): the image leaves the search pilot's git-ignored working files out
By the maintainer's decision of 2026-11-25, recorded in the handover. The option as offered: "One line in `.dockerignore` names `benchmarks/search/private/`, with a test that pins it. The local image then holds what a checkout holds." `.gitignore` ignores `benchmarks/search/private/`, where the feasibility pilot keeps its local identities and working files. `.dockerignore` did not, so `COPY --chown=1000 benchmarks` baked the directory of a local tree, 49,961 files, into the local image `openultrasast:dev`; nothing under it is tracked. A checkout has none of these files, so an image built from one never held them. Nothing under `src/` names the directory: the pilot scripts, `benchmarks/search/pilot_run.py` and `pilot_select.py`, run on the host and take the image under test as an argument. Tests: `tests/test_task_images.py::test_search_pilot_files_stay_out_of_the_image` pins the pattern, and that no `!` line with its exact prefix, with or without the trailing slash, lets it back in. It failed before the change (1 failed, 14 deselected) and passes after; with `tests/test_search_image.py`, 16 passed. On scratch copies the test fails when the line is removed, and when `!benchmarks/search/private` or `!benchmarks/search/private/` is appended. ruff, 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 remark on the re-include check is applied. Not claimed here: the rebuilt image. It follows in this step's next part, with the check that the directory is absent from it. |
||
|
|
90170380ec |
fix(docker): keep the reserved populations out of the image (contributor-scan 3.2)
The root image copies benchmarks/ (Dockerfile:43), and .dockerignore let benchmarks/valid and benchmarks/unseen through, about 18 MB of reserved-population material. RELEASE_NOTES.md says every version tag is pushed to ghcr.io/norandom/openultrasast. Decided by the maintainer on 2026-11-24: both stay out of the image. The scan path reads neither. The one run-time reader is the hunter's contamination report (hunt/contamination.py), which runs from a checkout: a missing pool contributes nothing to it, and it imports benchmarks.unseen.eligibility late, so inside the image that report has no eligibility module and fails at the import rather than silently. A test pins both patterns and fails if a later negation lets either back in. The built image is checked for their absence in task 3.2 part 2, when it is rebuilt. |
||
|
|
89d08e01d3 |
fix(contributor-scan): build the image from the pinned base and keep runs on the writable mount (3.2, part 1)
`docker compose build` has failed since
|
||
|
|
0d7d3f0dc9 |
chore: format the whole tree and lint the scratch measurement scripts; CI has been red since 25ae4b4
CI runs ruff format --check and ruff check over the whole repository; 29 files had drifted from the formatter and
four measurement scripts carried lint findings, so every push since
|
||
|
|
1b9d1ca85c |
images: shared task base, code-last layers, no per-push rebuilds [skip ci]
One base (Temurin 21 JDK, node/npm/tsc, php/composer, maven, sqlite, bwrap) built only when its Dockerfile or dependencies change, plus a browser variant; engine/search/VM images FROM base@sha256 with the code in the last layer; the image workflow runs on dispatch, tags, Dockerfile or pin changes, with a build cache. Executor NPROC bound relative to the current process count. Co-Authored-By: Claude Fable 5.1 <[email protected]> |