Files
codex-security/docker/verify-container-compose.sh
Michael D'AngeloandMichael D'Angelo 0ed54be43a feat(imports): enable external scanner imports by default (#2360)
* feat(imports): enable external scanner imports by default

Register collection, publication, and readback commands directly. Keep provider credential checks, repository access checks, and upload confirmation in their existing paths. Clients can remove the retired environment variable.

* docs(imports): make scanner provider guides evergreen

Index the scanner report readers and supported destinations. Use installed CLI examples, distinguish repository helpers from packaged tools, and describe Cloud verification and retry steps from the preview and receipt.

* docs(integrations): clarify connector setup and publication paths

* docs(integrations): simplify publication history and storage guidance

* docs(triage): specify how to exhaust Jira search results

---------

Co-authored-by: Michael D'Angelo <269034524+mldangelo-oai@users.noreply.github.com>
2026-11-05 15:30:02 -08:00

48 lines
2.0 KiB
Bash

#!/usr/bin/env bash
set -euo pipefail
# Keep the legacy i386 socket interface available on amd64.
jq -e '
any(.archMap[]; .architecture == "SCMP_ARCH_X86_64" and (.subArchitectures | index("SCMP_ARCH_X86"))) and
any(.syscalls[]; (.names | index("socketcall")) and .action == "SCMP_ACT_ALLOW" and
all(.args, .includes, .excludes; length == 0))
' docker/codex-security-seccomp.json > /dev/null
# 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