Files
codex-security/docker/verify-container-compose.sh
T
c26ae34f36 refactor(findings)!: remove the local findings serve command (#1340)
* feat: deduplicate saved scans directly in local SQLite

* test: update migration fixtures for local dedupe cache

* fix: bind local dedupe scope and preserve cancellation

* fix: include local dedupe in package archive checks

* refactor!: remove the local findings serve command

* test: drop the obsolete findings container check

* fix: forward custom embedding endpoints in Compose

* perf(dedupe): batch local preparation and preserve recovery coverage

* test: quote the empty Compose embedding endpoint

* fix(dedupe): protect target during Python discovery

* docs: simplify deduplication guidance

* fix: protect repository Python discovery in dedupe workflows

* fix: honor nonblank embedding API key fallback

* docs: clarify local deduplication workflows and embeddings

* feat(dedupe): support embedding bindings and configured review models

* refactor: finish findings service review cleanup

* fix(dedupe): preserve discovery protections and package bootstrap

* fix(dedupe): protect CLI bootstrap and isolate local embedding cache

* fix(dedupe): invalidate cached vectors on finding body updates

* fix(dedupe): protect enclosing checkouts and Windows endpoint settings

* test(workbench): update schema expectations for local embedding cache

* fix(dedupe): scope bootstrap to the requested saved scan

* fix(cli): resolve latest scans before legacy database migrations

* fix(cli): trim saved scan identifiers in linear time

* fix(cli): protect saved non-Git targets during Git discovery

* fix(cli): read saved WAL history with Apple SQLite

* fix(cli): release saved history statements before closing SQLite

* fix: wait for concurrent saved-scan database writers

* test: synchronize cancellation with the Python probe marker

* fix: protect surviving checkouts of missing saved targets

* test: close the legacy migration fixture statement

* fix: preserve lexical checkout protection for saved targets

* fix: retain checkout protection around inaccessible history

* fix: explain explicit scan fallback when Git matching is unavailable

* test: canonicalize the protected Git fixture path

* fix: preserve caller protection and no-Git workflow recovery

* fix(dedupe): preserve source context and native review diagnostics

* fix(devcontainer): retire obsolete Ona findings tasks

---------

Co-authored-by: QA Integration <qa-integration@example.invalid>
Co-authored-by: Codex <codex@users.noreply.github.com>
Co-authored-by: Michael D'Angelo <mdangelo@openai.com>
2026-10-09 08:28:02 -04:00

41 lines
1.6 KiB
Bash

#!/usr/bin/env bash
set -euo pipefail
# Resolve the environment on the host; these checks need no running container.
for compose_file in compose.yaml compose.runner.yaml; do
endpoint="https://embeddings.example.com/custom/v1/embeddings?api-version=synthetic"
CODEX_SECURITY_EMBEDDINGS_URL="$endpoint" \
docker compose --env-file /dev/null -f "$compose_file" config --format json |
jq --exit-status --arg endpoint "$endpoint" \
'.services["codex-security"].environment.CODEX_SECURITY_EMBEDDINGS_URL == $endpoint' > /dev/null
env -u CODEX_SECURITY_EMBEDDINGS_URL \
docker compose --env-file /dev/null -f "$compose_file" config --format json |
jq --exit-status \
'.services["codex-security"].environment.CODEX_SECURITY_EMBEDDINGS_URL == null' > /dev/null
CODEX_SECURITY_EMBEDDINGS_URL="" \
docker compose --env-file /dev/null -f "$compose_file" config --format json |
jq --exit-status \
'.services["codex-security"].environment.CODEX_SECURITY_EMBEDDINGS_URL == ""' > /dev/null
done
mkdir -p results state
chmod 700 results state
printf 'id,repository,revision\n' > repositories.csv
CODEX_SECURITY_USER="$(id -u):$(id -g)"
export CODEX_SECURITY_USER
docker compose config --quiet
docker compose run --rm codex-security --version
if output="$(docker compose run --rm codex-security 2>&1)"; then
echo 'An empty repository CSV must not start a security scan.' >&2
exit 1
else
status=$?
fi
if [[ "$status" -ne 2 ]] || ! grep -Fq 'Multiscan CSV must contain at least one repository.' <<< "$output"; then
printf 'Unexpected empty-repository scan behavior:\n%s\n' "$output" >&2
exit 1
fi