| [ |
| { |
| "id": "sbd-0097", |
| "split": "challenge", |
| "title": "Dockerfile leaks CARGO_TOKEN through ARG", |
| "summary": "The Dockerfile passes a secret through ARG and writes it into a layer instead of using a BuildKit secret mount.", |
| "failure_type": "build_secret_leak", |
| "ecosystem": "security", |
| "difficulty": "hard", |
| "tags": [ |
| "dockerfile", |
| "buildkit", |
| "secrets", |
| "security" |
| ], |
| "files": [ |
| { |
| "path": "Dockerfile", |
| "content": [ |
| "FROM alpine:3.20", |
| "WORKDIR /app", |
| "ARG CARGO_TOKEN", |
| "RUN echo \"token=${CARGO_TOKEN}\" > .credentials", |
| "RUN wget -q https://crates.io -O /dev/null || true", |
| "CMD [\"true\"]" |
| ] |
| } |
| ], |
| "failure_log": [ |
| "security-scan: SecretsUsedInArgOrEnv", |
| "security-scan: secret may persist in image layer history" |
| ], |
| "build": { |
| "command": "DOCKER_BUILDKIT=1 docker build --secret id=cargo_token,src=.cargo_token -t sabnock/sbd-0097 ." |
| }, |
| "verify": { |
| "commands": [ |
| "docker buildx build --check ." |
| ] |
| }, |
| "oracle_patch": [ |
| "--- a/Dockerfile", |
| "+++ b/Dockerfile", |
| "@@ -1,6 +1,5 @@", |
| "+# syntax=docker/dockerfile:1.7", |
| " FROM alpine:3.20", |
| " WORKDIR /app", |
| "-ARG CARGO_TOKEN", |
| "-RUN echo \"token=${CARGO_TOKEN}\" > .credentials", |
| "-RUN wget -q https://crates.io -O /dev/null || true", |
| "+RUN --mount=type=secret,id=cargo_token sh -c 'test -s /run/secrets/cargo_token && wget -q https://crates.io -O /dev/null || true'", |
| " CMD [\"true\"]" |
| ], |
| "scoring": { |
| "must_touch": [ |
| "Dockerfile" |
| ], |
| "must_contain": [ |
| { |
| "path": "Dockerfile", |
| "text": "# syntax=docker/dockerfile:1.7" |
| }, |
| { |
| "path": "Dockerfile", |
| "text": "--mount=type=secret,id=cargo_token" |
| } |
| ], |
| "must_not_contain": [ |
| { |
| "path": "Dockerfile", |
| "text": "ARG CARGO_TOKEN" |
| }, |
| { |
| "path": "Dockerfile", |
| "text": "${CARGO_TOKEN}" |
| } |
| ] |
| } |
| }, |
| { |
| "id": "sbd-0098", |
| "split": "challenge", |
| "title": "Dockerfile leaks NUGET_TOKEN through ARG", |
| "summary": "The Dockerfile passes a secret through ARG and writes it into a layer instead of using a BuildKit secret mount.", |
| "failure_type": "build_secret_leak", |
| "ecosystem": "security", |
| "difficulty": "hard", |
| "tags": [ |
| "dockerfile", |
| "buildkit", |
| "secrets", |
| "security" |
| ], |
| "files": [ |
| { |
| "path": "Dockerfile", |
| "content": [ |
| "FROM alpine:3.20", |
| "WORKDIR /app", |
| "ARG NUGET_TOKEN", |
| "RUN echo \"token=${NUGET_TOKEN}\" > .credentials", |
| "RUN wget -q https://nuget.org -O /dev/null || true", |
| "CMD [\"true\"]" |
| ] |
| } |
| ], |
| "failure_log": [ |
| "security-scan: SecretsUsedInArgOrEnv", |
| "security-scan: secret may persist in image layer history" |
| ], |
| "build": { |
| "command": "DOCKER_BUILDKIT=1 docker build --secret id=nuget_token,src=.nuget_token -t sabnock/sbd-0098 ." |
| }, |
| "verify": { |
| "commands": [ |
| "docker buildx build --check ." |
| ] |
| }, |
| "oracle_patch": [ |
| "--- a/Dockerfile", |
| "+++ b/Dockerfile", |
| "@@ -1,6 +1,5 @@", |
| "+# syntax=docker/dockerfile:1.7", |
| " FROM alpine:3.20", |
| " WORKDIR /app", |
| "-ARG NUGET_TOKEN", |
| "-RUN echo \"token=${NUGET_TOKEN}\" > .credentials", |
| "-RUN wget -q https://nuget.org -O /dev/null || true", |
| "+RUN --mount=type=secret,id=nuget_token sh -c 'test -s /run/secrets/nuget_token && wget -q https://nuget.org -O /dev/null || true'", |
| " CMD [\"true\"]" |
| ], |
| "scoring": { |
| "must_touch": [ |
| "Dockerfile" |
| ], |
| "must_contain": [ |
| { |
| "path": "Dockerfile", |
| "text": "# syntax=docker/dockerfile:1.7" |
| }, |
| { |
| "path": "Dockerfile", |
| "text": "--mount=type=secret,id=nuget_token" |
| } |
| ], |
| "must_not_contain": [ |
| { |
| "path": "Dockerfile", |
| "text": "ARG NUGET_TOKEN" |
| }, |
| { |
| "path": "Dockerfile", |
| "text": "${NUGET_TOKEN}" |
| } |
| ] |
| } |
| }, |
| { |
| "id": "sbd-0099", |
| "split": "challenge", |
| "title": "Dockerfile leaks GITLAB_TOKEN through ARG", |
| "summary": "The Dockerfile passes a secret through ARG and writes it into a layer instead of using a BuildKit secret mount.", |
| "failure_type": "build_secret_leak", |
| "ecosystem": "security", |
| "difficulty": "hard", |
| "tags": [ |
| "dockerfile", |
| "buildkit", |
| "secrets", |
| "security" |
| ], |
| "files": [ |
| { |
| "path": "Dockerfile", |
| "content": [ |
| "FROM alpine:3.20", |
| "WORKDIR /app", |
| "ARG GITLAB_TOKEN", |
| "RUN echo \"token=${GITLAB_TOKEN}\" > .credentials", |
| "RUN wget -q https://gitlab.com -O /dev/null || true", |
| "CMD [\"true\"]" |
| ] |
| } |
| ], |
| "failure_log": [ |
| "security-scan: SecretsUsedInArgOrEnv", |
| "security-scan: secret may persist in image layer history" |
| ], |
| "build": { |
| "command": "DOCKER_BUILDKIT=1 docker build --secret id=gitlab_token,src=.gitlab_token -t sabnock/sbd-0099 ." |
| }, |
| "verify": { |
| "commands": [ |
| "docker buildx build --check ." |
| ] |
| }, |
| "oracle_patch": [ |
| "--- a/Dockerfile", |
| "+++ b/Dockerfile", |
| "@@ -1,6 +1,5 @@", |
| "+# syntax=docker/dockerfile:1.7", |
| " FROM alpine:3.20", |
| " WORKDIR /app", |
| "-ARG GITLAB_TOKEN", |
| "-RUN echo \"token=${GITLAB_TOKEN}\" > .credentials", |
| "-RUN wget -q https://gitlab.com -O /dev/null || true", |
| "+RUN --mount=type=secret,id=gitlab_token sh -c 'test -s /run/secrets/gitlab_token && wget -q https://gitlab.com -O /dev/null || true'", |
| " CMD [\"true\"]" |
| ], |
| "scoring": { |
| "must_touch": [ |
| "Dockerfile" |
| ], |
| "must_contain": [ |
| { |
| "path": "Dockerfile", |
| "text": "# syntax=docker/dockerfile:1.7" |
| }, |
| { |
| "path": "Dockerfile", |
| "text": "--mount=type=secret,id=gitlab_token" |
| } |
| ], |
| "must_not_contain": [ |
| { |
| "path": "Dockerfile", |
| "text": "ARG GITLAB_TOKEN" |
| }, |
| { |
| "path": "Dockerfile", |
| "text": "${GITLAB_TOKEN}" |
| } |
| ] |
| } |
| }, |
| { |
| "id": "sbd-0100", |
| "split": "challenge", |
| "title": "Dockerfile leaks SENTRY_AUTH_TOKEN through ARG", |
| "summary": "The Dockerfile passes a secret through ARG and writes it into a layer instead of using a BuildKit secret mount.", |
| "failure_type": "build_secret_leak", |
| "ecosystem": "security", |
| "difficulty": "hard", |
| "tags": [ |
| "dockerfile", |
| "buildkit", |
| "secrets", |
| "security" |
| ], |
| "files": [ |
| { |
| "path": "Dockerfile", |
| "content": [ |
| "FROM alpine:3.20", |
| "WORKDIR /app", |
| "ARG SENTRY_AUTH_TOKEN", |
| "RUN echo \"token=${SENTRY_AUTH_TOKEN}\" > .credentials", |
| "RUN wget -q https://sentry.io -O /dev/null || true", |
| "CMD [\"true\"]" |
| ] |
| } |
| ], |
| "failure_log": [ |
| "security-scan: SecretsUsedInArgOrEnv", |
| "security-scan: secret may persist in image layer history" |
| ], |
| "build": { |
| "command": "DOCKER_BUILDKIT=1 docker build --secret id=sentry_token,src=.sentry_token -t sabnock/sbd-0100 ." |
| }, |
| "verify": { |
| "commands": [ |
| "docker buildx build --check ." |
| ] |
| }, |
| "oracle_patch": [ |
| "--- a/Dockerfile", |
| "+++ b/Dockerfile", |
| "@@ -1,6 +1,5 @@", |
| "+# syntax=docker/dockerfile:1.7", |
| " FROM alpine:3.20", |
| " WORKDIR /app", |
| "-ARG SENTRY_AUTH_TOKEN", |
| "-RUN echo \"token=${SENTRY_AUTH_TOKEN}\" > .credentials", |
| "-RUN wget -q https://sentry.io -O /dev/null || true", |
| "+RUN --mount=type=secret,id=sentry_token sh -c 'test -s /run/secrets/sentry_token && wget -q https://sentry.io -O /dev/null || true'", |
| " CMD [\"true\"]" |
| ], |
| "scoring": { |
| "must_touch": [ |
| "Dockerfile" |
| ], |
| "must_contain": [ |
| { |
| "path": "Dockerfile", |
| "text": "# syntax=docker/dockerfile:1.7" |
| }, |
| { |
| "path": "Dockerfile", |
| "text": "--mount=type=secret,id=sentry_token" |
| } |
| ], |
| "must_not_contain": [ |
| { |
| "path": "Dockerfile", |
| "text": "ARG SENTRY_AUTH_TOKEN" |
| }, |
| { |
| "path": "Dockerfile", |
| "text": "${SENTRY_AUTH_TOKEN}" |
| } |
| ] |
| } |
| }, |
| { |
| "id": "sbd-0101", |
| "split": "challenge", |
| "title": "Poetry install runs before service source exists", |
| "summary": "Poetry tries to install the root project before the package directory is copied into the image.", |
| "failure_type": "poetry_root_install_order", |
| "ecosystem": "python", |
| "difficulty": "medium", |
| "tags": [ |
| "dockerfile", |
| "python", |
| "poetry", |
| "dependency-install" |
| ], |
| "files": [ |
| { |
| "path": "Dockerfile", |
| "content": [ |
| "FROM python:3.12-slim", |
| "WORKDIR /app", |
| "RUN pip install --no-cache-dir poetry==1.8.3", |
| "COPY pyproject.toml ./", |
| "RUN poetry install --only main", |
| "COPY service ./service", |
| "CMD [\"poetry\", \"run\", \"python\", \"-m\", \"service\"]" |
| ] |
| }, |
| { |
| "path": "pyproject.toml", |
| "content": [ |
| "[tool.poetry]", |
| "name = \"sbd-0101\"", |
| "version = \"0.1.0\"", |
| "description = \"synthetic task\"", |
| "authors = [\"Sabnock <bench@example.com>\"]", |
| "packages = [{ include = \"service\" }]", |
| "", |
| "[tool.poetry.dependencies]", |
| "python = \"^3.12\"", |
| "", |
| "[build-system]", |
| "requires = [\"poetry-core\"]", |
| "build-backend = \"poetry.core.masonry.api\"" |
| ] |
| }, |
| { |
| "path": "service/__main__.py", |
| "content": [ |
| "print('ok')" |
| ] |
| } |
| ], |
| "failure_log": [ |
| "Error: No file/folder found for package service" |
| ], |
| "build": { |
| "command": "docker build -t sabnock/sbd-0101 ." |
| }, |
| "verify": { |
| "commands": [ |
| "docker build -t sabnock/sbd-0101 ." |
| ] |
| }, |
| "oracle_patch": [ |
| "--- a/Dockerfile", |
| "+++ b/Dockerfile", |
| "@@ -2,6 +2,6 @@", |
| " WORKDIR /app", |
| " RUN pip install --no-cache-dir poetry==1.8.3", |
| " COPY pyproject.toml ./", |
| "-RUN poetry install --only main", |
| "+RUN poetry install --only main --no-root", |
| " COPY service ./service", |
| " CMD [\"poetry\", \"run\", \"python\", \"-m\", \"service\"]" |
| ], |
| "scoring": { |
| "must_touch": [ |
| "Dockerfile" |
| ], |
| "must_contain": [ |
| { |
| "path": "Dockerfile", |
| "text": "poetry install --only main --no-root" |
| } |
| ], |
| "must_not_contain": [] |
| } |
| }, |
| { |
| "id": "sbd-0102", |
| "split": "challenge", |
| "title": "Poetry install runs before api source exists", |
| "summary": "Poetry tries to install the root project before the package directory is copied into the image.", |
| "failure_type": "poetry_root_install_order", |
| "ecosystem": "python", |
| "difficulty": "medium", |
| "tags": [ |
| "dockerfile", |
| "python", |
| "poetry", |
| "dependency-install" |
| ], |
| "files": [ |
| { |
| "path": "Dockerfile", |
| "content": [ |
| "FROM python:3.12-slim", |
| "WORKDIR /app", |
| "RUN pip install --no-cache-dir poetry==1.8.3", |
| "COPY pyproject.toml ./", |
| "RUN poetry install --only main", |
| "COPY api ./api", |
| "CMD [\"poetry\", \"run\", \"python\", \"-m\", \"api\"]" |
| ] |
| }, |
| { |
| "path": "pyproject.toml", |
| "content": [ |
| "[tool.poetry]", |
| "name = \"sbd-0102\"", |
| "version = \"0.1.0\"", |
| "description = \"synthetic task\"", |
| "authors = [\"Sabnock <bench@example.com>\"]", |
| "packages = [{ include = \"api\" }]", |
| "", |
| "[tool.poetry.dependencies]", |
| "python = \"^3.12\"", |
| "", |
| "[build-system]", |
| "requires = [\"poetry-core\"]", |
| "build-backend = \"poetry.core.masonry.api\"" |
| ] |
| }, |
| { |
| "path": "api/__main__.py", |
| "content": [ |
| "print('ok')" |
| ] |
| } |
| ], |
| "failure_log": [ |
| "Error: No file/folder found for package api" |
| ], |
| "build": { |
| "command": "docker build -t sabnock/sbd-0102 ." |
| }, |
| "verify": { |
| "commands": [ |
| "docker build -t sabnock/sbd-0102 ." |
| ] |
| }, |
| "oracle_patch": [ |
| "--- a/Dockerfile", |
| "+++ b/Dockerfile", |
| "@@ -2,6 +2,6 @@", |
| " WORKDIR /app", |
| " RUN pip install --no-cache-dir poetry==1.8.3", |
| " COPY pyproject.toml ./", |
| "-RUN poetry install --only main", |
| "+RUN poetry install --only main --no-root", |
| " COPY api ./api", |
| " CMD [\"poetry\", \"run\", \"python\", \"-m\", \"api\"]" |
| ], |
| "scoring": { |
| "must_touch": [ |
| "Dockerfile" |
| ], |
| "must_contain": [ |
| { |
| "path": "Dockerfile", |
| "text": "poetry install --only main --no-root" |
| } |
| ], |
| "must_not_contain": [] |
| } |
| }, |
| { |
| "id": "sbd-0103", |
| "split": "challenge", |
| "title": "Poetry install runs before worker source exists", |
| "summary": "Poetry tries to install the root project before the package directory is copied into the image.", |
| "failure_type": "poetry_root_install_order", |
| "ecosystem": "python", |
| "difficulty": "medium", |
| "tags": [ |
| "dockerfile", |
| "python", |
| "poetry", |
| "dependency-install" |
| ], |
| "files": [ |
| { |
| "path": "Dockerfile", |
| "content": [ |
| "FROM python:3.12-slim", |
| "WORKDIR /app", |
| "RUN pip install --no-cache-dir poetry==1.8.3", |
| "COPY pyproject.toml ./", |
| "RUN poetry install --only main", |
| "COPY worker ./worker", |
| "CMD [\"poetry\", \"run\", \"python\", \"-m\", \"worker\"]" |
| ] |
| }, |
| { |
| "path": "pyproject.toml", |
| "content": [ |
| "[tool.poetry]", |
| "name = \"sbd-0103\"", |
| "version = \"0.1.0\"", |
| "description = \"synthetic task\"", |
| "authors = [\"Sabnock <bench@example.com>\"]", |
| "packages = [{ include = \"worker\" }]", |
| "", |
| "[tool.poetry.dependencies]", |
| "python = \"^3.12\"", |
| "", |
| "[build-system]", |
| "requires = [\"poetry-core\"]", |
| "build-backend = \"poetry.core.masonry.api\"" |
| ] |
| }, |
| { |
| "path": "worker/__main__.py", |
| "content": [ |
| "print('ok')" |
| ] |
| } |
| ], |
| "failure_log": [ |
| "Error: No file/folder found for package worker" |
| ], |
| "build": { |
| "command": "docker build -t sabnock/sbd-0103 ." |
| }, |
| "verify": { |
| "commands": [ |
| "docker build -t sabnock/sbd-0103 ." |
| ] |
| }, |
| "oracle_patch": [ |
| "--- a/Dockerfile", |
| "+++ b/Dockerfile", |
| "@@ -2,6 +2,6 @@", |
| " WORKDIR /app", |
| " RUN pip install --no-cache-dir poetry==1.8.3", |
| " COPY pyproject.toml ./", |
| "-RUN poetry install --only main", |
| "+RUN poetry install --only main --no-root", |
| " COPY worker ./worker", |
| " CMD [\"poetry\", \"run\", \"python\", \"-m\", \"worker\"]" |
| ], |
| "scoring": { |
| "must_touch": [ |
| "Dockerfile" |
| ], |
| "must_contain": [ |
| { |
| "path": "Dockerfile", |
| "text": "poetry install --only main --no-root" |
| } |
| ], |
| "must_not_contain": [] |
| } |
| }, |
| { |
| "id": "sbd-0104", |
| "split": "challenge", |
| "title": "Poetry install runs before jobs source exists", |
| "summary": "Poetry tries to install the root project before the package directory is copied into the image.", |
| "failure_type": "poetry_root_install_order", |
| "ecosystem": "python", |
| "difficulty": "medium", |
| "tags": [ |
| "dockerfile", |
| "python", |
| "poetry", |
| "dependency-install" |
| ], |
| "files": [ |
| { |
| "path": "Dockerfile", |
| "content": [ |
| "FROM python:3.12-slim", |
| "WORKDIR /app", |
| "RUN pip install --no-cache-dir poetry==1.8.3", |
| "COPY pyproject.toml ./", |
| "RUN poetry install --only main", |
| "COPY jobs ./jobs", |
| "CMD [\"poetry\", \"run\", \"python\", \"-m\", \"jobs\"]" |
| ] |
| }, |
| { |
| "path": "pyproject.toml", |
| "content": [ |
| "[tool.poetry]", |
| "name = \"sbd-0104\"", |
| "version = \"0.1.0\"", |
| "description = \"synthetic task\"", |
| "authors = [\"Sabnock <bench@example.com>\"]", |
| "packages = [{ include = \"jobs\" }]", |
| "", |
| "[tool.poetry.dependencies]", |
| "python = \"^3.12\"", |
| "", |
| "[build-system]", |
| "requires = [\"poetry-core\"]", |
| "build-backend = \"poetry.core.masonry.api\"" |
| ] |
| }, |
| { |
| "path": "jobs/__main__.py", |
| "content": [ |
| "print('ok')" |
| ] |
| } |
| ], |
| "failure_log": [ |
| "Error: No file/folder found for package jobs" |
| ], |
| "build": { |
| "command": "docker build -t sabnock/sbd-0104 ." |
| }, |
| "verify": { |
| "commands": [ |
| "docker build -t sabnock/sbd-0104 ." |
| ] |
| }, |
| "oracle_patch": [ |
| "--- a/Dockerfile", |
| "+++ b/Dockerfile", |
| "@@ -2,6 +2,6 @@", |
| " WORKDIR /app", |
| " RUN pip install --no-cache-dir poetry==1.8.3", |
| " COPY pyproject.toml ./", |
| "-RUN poetry install --only main", |
| "+RUN poetry install --only main --no-root", |
| " COPY jobs ./jobs", |
| " CMD [\"poetry\", \"run\", \"python\", \"-m\", \"jobs\"]" |
| ], |
| "scoring": { |
| "must_touch": [ |
| "Dockerfile" |
| ], |
| "must_contain": [ |
| { |
| "path": "Dockerfile", |
| "text": "poetry install --only main --no-root" |
| } |
| ], |
| "must_not_contain": [] |
| } |
| }, |
| { |
| "id": "sbd-0105", |
| "split": "challenge", |
| "title": "Poetry install runs before billing source exists", |
| "summary": "Poetry tries to install the root project before the package directory is copied into the image.", |
| "failure_type": "poetry_root_install_order", |
| "ecosystem": "python", |
| "difficulty": "medium", |
| "tags": [ |
| "dockerfile", |
| "python", |
| "poetry", |
| "dependency-install" |
| ], |
| "files": [ |
| { |
| "path": "Dockerfile", |
| "content": [ |
| "FROM python:3.12-slim", |
| "WORKDIR /app", |
| "RUN pip install --no-cache-dir poetry==1.8.3", |
| "COPY pyproject.toml ./", |
| "RUN poetry install --only main", |
| "COPY billing ./billing", |
| "CMD [\"poetry\", \"run\", \"python\", \"-m\", \"billing\"]" |
| ] |
| }, |
| { |
| "path": "pyproject.toml", |
| "content": [ |
| "[tool.poetry]", |
| "name = \"sbd-0105\"", |
| "version = \"0.1.0\"", |
| "description = \"synthetic task\"", |
| "authors = [\"Sabnock <bench@example.com>\"]", |
| "packages = [{ include = \"billing\" }]", |
| "", |
| "[tool.poetry.dependencies]", |
| "python = \"^3.12\"", |
| "", |
| "[build-system]", |
| "requires = [\"poetry-core\"]", |
| "build-backend = \"poetry.core.masonry.api\"" |
| ] |
| }, |
| { |
| "path": "billing/__main__.py", |
| "content": [ |
| "print('ok')" |
| ] |
| } |
| ], |
| "failure_log": [ |
| "Error: No file/folder found for package billing" |
| ], |
| "build": { |
| "command": "docker build -t sabnock/sbd-0105 ." |
| }, |
| "verify": { |
| "commands": [ |
| "docker build -t sabnock/sbd-0105 ." |
| ] |
| }, |
| "oracle_patch": [ |
| "--- a/Dockerfile", |
| "+++ b/Dockerfile", |
| "@@ -2,6 +2,6 @@", |
| " WORKDIR /app", |
| " RUN pip install --no-cache-dir poetry==1.8.3", |
| " COPY pyproject.toml ./", |
| "-RUN poetry install --only main", |
| "+RUN poetry install --only main --no-root", |
| " COPY billing ./billing", |
| " CMD [\"poetry\", \"run\", \"python\", \"-m\", \"billing\"]" |
| ], |
| "scoring": { |
| "must_touch": [ |
| "Dockerfile" |
| ], |
| "must_contain": [ |
| { |
| "path": "Dockerfile", |
| "text": "poetry install --only main --no-root" |
| } |
| ], |
| "must_not_contain": [] |
| } |
| }, |
| { |
| "id": "sbd-0106", |
| "split": "challenge", |
| "title": "Poetry install runs before search source exists", |
| "summary": "Poetry tries to install the root project before the package directory is copied into the image.", |
| "failure_type": "poetry_root_install_order", |
| "ecosystem": "python", |
| "difficulty": "medium", |
| "tags": [ |
| "dockerfile", |
| "python", |
| "poetry", |
| "dependency-install" |
| ], |
| "files": [ |
| { |
| "path": "Dockerfile", |
| "content": [ |
| "FROM python:3.12-slim", |
| "WORKDIR /app", |
| "RUN pip install --no-cache-dir poetry==1.8.3", |
| "COPY pyproject.toml ./", |
| "RUN poetry install --only main", |
| "COPY search ./search", |
| "CMD [\"poetry\", \"run\", \"python\", \"-m\", \"search\"]" |
| ] |
| }, |
| { |
| "path": "pyproject.toml", |
| "content": [ |
| "[tool.poetry]", |
| "name = \"sbd-0106\"", |
| "version = \"0.1.0\"", |
| "description = \"synthetic task\"", |
| "authors = [\"Sabnock <bench@example.com>\"]", |
| "packages = [{ include = \"search\" }]", |
| "", |
| "[tool.poetry.dependencies]", |
| "python = \"^3.12\"", |
| "", |
| "[build-system]", |
| "requires = [\"poetry-core\"]", |
| "build-backend = \"poetry.core.masonry.api\"" |
| ] |
| }, |
| { |
| "path": "search/__main__.py", |
| "content": [ |
| "print('ok')" |
| ] |
| } |
| ], |
| "failure_log": [ |
| "Error: No file/folder found for package search" |
| ], |
| "build": { |
| "command": "docker build -t sabnock/sbd-0106 ." |
| }, |
| "verify": { |
| "commands": [ |
| "docker build -t sabnock/sbd-0106 ." |
| ] |
| }, |
| "oracle_patch": [ |
| "--- a/Dockerfile", |
| "+++ b/Dockerfile", |
| "@@ -2,6 +2,6 @@", |
| " WORKDIR /app", |
| " RUN pip install --no-cache-dir poetry==1.8.3", |
| " COPY pyproject.toml ./", |
| "-RUN poetry install --only main", |
| "+RUN poetry install --only main --no-root", |
| " COPY search ./search", |
| " CMD [\"poetry\", \"run\", \"python\", \"-m\", \"search\"]" |
| ], |
| "scoring": { |
| "must_touch": [ |
| "Dockerfile" |
| ], |
| "must_contain": [ |
| { |
| "path": "Dockerfile", |
| "text": "poetry install --only main --no-root" |
| } |
| ], |
| "must_not_contain": [] |
| } |
| }, |
| { |
| "id": "sbd-0107", |
| "split": "challenge", |
| "title": "Poetry install runs before gateway source exists", |
| "summary": "Poetry tries to install the root project before the package directory is copied into the image.", |
| "failure_type": "poetry_root_install_order", |
| "ecosystem": "python", |
| "difficulty": "medium", |
| "tags": [ |
| "dockerfile", |
| "python", |
| "poetry", |
| "dependency-install" |
| ], |
| "files": [ |
| { |
| "path": "Dockerfile", |
| "content": [ |
| "FROM python:3.12-slim", |
| "WORKDIR /app", |
| "RUN pip install --no-cache-dir poetry==1.8.3", |
| "COPY pyproject.toml ./", |
| "RUN poetry install --only main", |
| "COPY gateway ./gateway", |
| "CMD [\"poetry\", \"run\", \"python\", \"-m\", \"gateway\"]" |
| ] |
| }, |
| { |
| "path": "pyproject.toml", |
| "content": [ |
| "[tool.poetry]", |
| "name = \"sbd-0107\"", |
| "version = \"0.1.0\"", |
| "description = \"synthetic task\"", |
| "authors = [\"Sabnock <bench@example.com>\"]", |
| "packages = [{ include = \"gateway\" }]", |
| "", |
| "[tool.poetry.dependencies]", |
| "python = \"^3.12\"", |
| "", |
| "[build-system]", |
| "requires = [\"poetry-core\"]", |
| "build-backend = \"poetry.core.masonry.api\"" |
| ] |
| }, |
| { |
| "path": "gateway/__main__.py", |
| "content": [ |
| "print('ok')" |
| ] |
| } |
| ], |
| "failure_log": [ |
| "Error: No file/folder found for package gateway" |
| ], |
| "build": { |
| "command": "docker build -t sabnock/sbd-0107 ." |
| }, |
| "verify": { |
| "commands": [ |
| "docker build -t sabnock/sbd-0107 ." |
| ] |
| }, |
| "oracle_patch": [ |
| "--- a/Dockerfile", |
| "+++ b/Dockerfile", |
| "@@ -2,6 +2,6 @@", |
| " WORKDIR /app", |
| " RUN pip install --no-cache-dir poetry==1.8.3", |
| " COPY pyproject.toml ./", |
| "-RUN poetry install --only main", |
| "+RUN poetry install --only main --no-root", |
| " COPY gateway ./gateway", |
| " CMD [\"poetry\", \"run\", \"python\", \"-m\", \"gateway\"]" |
| ], |
| "scoring": { |
| "must_touch": [ |
| "Dockerfile" |
| ], |
| "must_contain": [ |
| { |
| "path": "Dockerfile", |
| "text": "poetry install --only main --no-root" |
| } |
| ], |
| "must_not_contain": [] |
| } |
| }, |
| { |
| "id": "sbd-0108", |
| "split": "challenge", |
| "title": "Poetry install runs before scheduler source exists", |
| "summary": "Poetry tries to install the root project before the package directory is copied into the image.", |
| "failure_type": "poetry_root_install_order", |
| "ecosystem": "python", |
| "difficulty": "medium", |
| "tags": [ |
| "dockerfile", |
| "python", |
| "poetry", |
| "dependency-install" |
| ], |
| "files": [ |
| { |
| "path": "Dockerfile", |
| "content": [ |
| "FROM python:3.12-slim", |
| "WORKDIR /app", |
| "RUN pip install --no-cache-dir poetry==1.8.3", |
| "COPY pyproject.toml ./", |
| "RUN poetry install --only main", |
| "COPY scheduler ./scheduler", |
| "CMD [\"poetry\", \"run\", \"python\", \"-m\", \"scheduler\"]" |
| ] |
| }, |
| { |
| "path": "pyproject.toml", |
| "content": [ |
| "[tool.poetry]", |
| "name = \"sbd-0108\"", |
| "version = \"0.1.0\"", |
| "description = \"synthetic task\"", |
| "authors = [\"Sabnock <bench@example.com>\"]", |
| "packages = [{ include = \"scheduler\" }]", |
| "", |
| "[tool.poetry.dependencies]", |
| "python = \"^3.12\"", |
| "", |
| "[build-system]", |
| "requires = [\"poetry-core\"]", |
| "build-backend = \"poetry.core.masonry.api\"" |
| ] |
| }, |
| { |
| "path": "scheduler/__main__.py", |
| "content": [ |
| "print('ok')" |
| ] |
| } |
| ], |
| "failure_log": [ |
| "Error: No file/folder found for package scheduler" |
| ], |
| "build": { |
| "command": "docker build -t sabnock/sbd-0108 ." |
| }, |
| "verify": { |
| "commands": [ |
| "docker build -t sabnock/sbd-0108 ." |
| ] |
| }, |
| "oracle_patch": [ |
| "--- a/Dockerfile", |
| "+++ b/Dockerfile", |
| "@@ -2,6 +2,6 @@", |
| " WORKDIR /app", |
| " RUN pip install --no-cache-dir poetry==1.8.3", |
| " COPY pyproject.toml ./", |
| "-RUN poetry install --only main", |
| "+RUN poetry install --only main --no-root", |
| " COPY scheduler ./scheduler", |
| " CMD [\"poetry\", \"run\", \"python\", \"-m\", \"scheduler\"]" |
| ], |
| "scoring": { |
| "must_touch": [ |
| "Dockerfile" |
| ], |
| "must_contain": [ |
| { |
| "path": "Dockerfile", |
| "text": "poetry install --only main --no-root" |
| } |
| ], |
| "must_not_contain": [] |
| } |
| } |
| ] |
|
|