* fix(sdk): forward component scan lifecycle and deep progress
* ci: retry managed Code Quality after GitHub rate limiting
GitHub rejected direct retries for the managed workflow. Recheck the identical source tree after its installation quota recovered.
* Deliver fixture signals before advancing the verification batch
* fix(deep-scan): recover the latest public findings on interruption
* ci: retry managed Code Quality after GitHub rate limiting
GitHub rejected direct retries for the managed workflow. Recheck the identical source tree after its installation quota recovered.
* ci: retry managed Code Quality after GitHub installation rate limit
---------
Co-authored-by: mldangelo-oai <269034524+mldangelo-oai@users.noreply.github.com>
* fix(sdk): persist canceled scans with their measured cost
* test(sdk): check canceled status in the installed package
* test(sdk): distinguish explicit cancellation from budget failure
* fix(sdk): retain cost monitor failures in saved scan history
* fix(hosted): align the final scan receipt with its saved lifecycle
* fix(hosted): distinguish a caller deadline from explicit cancellation
* ci: retry managed Code Quality after GitHub installation rate limit
---------
Co-authored-by: mldangelo-oai <269034524+mldangelo-oai@users.noreply.github.com>
* fix(knowledge-base): preserve documents with AppleDouble-style names
* ci: retry managed Code Quality after GitHub rate limiting
GitHub rejected direct retries for the managed workflow. Recheck the identical source tree after its installation quota recovered.
* ci: retry managed Code Quality after GitHub installation rate limit
* fix: align the severity badge column in finding tables
`severity.padEnd(8)` is a no-op for INFORMATIONAL, which is thirteen
characters, so informational findings pushed their title five columns to
the right of every other severity and broke the table:
HIGH Short severity row
INFORMATIONAL Long severity row
The badge width and the two indents that line up beneath it were three
independent literals (8, 14, 14), so they only agreed while every label
happened to fit in eight columns.
Derive all of them from the label set and abbreviate INFORMATIONAL to
INFO. Both values are unchanged at 8 and 14, so only the informational
label differs; spelling the word out instead would cost every finding
title five characters, which matters most at the 48-column minimum.
* fix(cli): preserve aligned finding details with compact severity badges
* fix(docs): keep generated Action reference formatted
Render the generated Action inputs and outputs as Markdown lists so documentation generation and repository formatting agree. Preserve all names, defaults, descriptions, and workflow examples.
---------
Co-authored-by: mldangelo-oai <mdangelo@openai.com>
Co-authored-by: mldangelo-oai <269034524+mldangelo-oai@users.noreply.github.com>
* Harden sandbox seccomp: drop ptrace and tighten socket domain allowlist
Two fixes from a security audit of this repo:
- Remove process_vm_readv/process_vm_writev/ptrace from the allowlist.
All sandboxed processes share the same uid, so ptrace let one process
inspect/modify another's memory (e.g. read a secret held by a sibling
process) inside the sandbox -- inter-process isolation was effectively
void despite the seccomp profile's intent.
- Replace the 3 socket-domain rules with an explicit allowlist of
AF_UNIX(1)/AF_INET(2)/AF_INET6(10). The previous rules (domain<38,
domain==39, domain>40) only actually blocked AF_ALG(38) and
AF_VSOCK(40) -- AF_NETLINK(16) and AF_PACKET(17) were allowed, along
with everything else outside that narrow gap, making the egress
control close to a no-op.
Verified with a real Docker build + run on a separate host, under the
exact production security contract (--cap-drop ALL --security-opt
no-new-privileges + this seccomp profile):
- DNS resolution (getaddrinfo) and `git clone` over HTTPS still work
(AF_INET/AF_INET6 unaffected) -- confirms this doesn't break the
scanner's own legitimate network use.
- AF_NETLINK and AF_PACKET socket() calls now fail with EPERM inside
the container (previously succeeded) -- confirms the fix is real, not
cosmetic.
Local commit only -- this is an audit clone of openai/codex-security,
not a fork with push access.
* Fail closed if not launched with --cap-drop ALL --security-opt no-new-privileges
docker/codex-security-seccomp.json unconditionally allows mount/pivot_root/
unshare/setns/clone for Codex's own unprivileged Bubblewrap sandboxing --
those syscalls can't be removed without breaking that feature entirely.
Their safety previously depended entirely on a comment in the seccomp
profile asserting the caller runs with --cap-drop ALL and
--security-opt no-new-privileges (true for compose.yaml, not enforced for
a bare `docker run`).
Adds a runtime self-check at the top of the entrypoint: read
/proc/self/status, refuse to start (exit 3, clear message) unless CapEff
is all-zero and NoNewPrivs is 1. Converts an undocumented-until-you-read-
the-seccomp-comment assumption into a loud, immediate failure.
Verified with a real Docker build + run on a separate host, 4 launch
scenarios:
- --cap-drop ALL --security-opt no-new-privileges (contract met): starts
normally.
- No flags, default non-root user (10001 from the Dockerfile): blocked by
the NoNewPrivs check.
- --security-opt no-new-privileges only, no --cap-drop: starts -- correct,
not a false block, since a non-root process already has an empty
effective capability set regardless of --cap-drop.
- --user root, no flags: blocked by the CapEff check, message shows the
actual non-empty capability bitmask (00000000a80425fb).
Local commit only -- this is an audit clone of openai/codex-security, not
a fork with push access.
* Address Codex review: CI hardening flags, AF_NETLINK for bwrap, drop socketcall
Three fixes for the automated review findings on this PR:
1. .github/workflows/container-ci.yml: the bare `docker run` smoke-test
invocations (Verify bundled scanner, Reject interactive repository
discovery) never passed --cap-drop ALL --security-opt no-new-privileges,
so entrypoint.sh's new fail-closed check aborted them with exit 3 before
--version/help/discovery validation could run. Added the flags to match
the production contract these tests are supposed to exercise.
2. docker/codex-security-seccomp.json: the AF_UNIX/AF_INET/AF_INET6-only
socket() allowlist rejected AF_NETLINK, which Bubblewrap needs (a
NETLINK_ROUTE socket) to run RTM_NEWLINK/RTM_NEWADDR when configuring
the loopback interface inside its own isolated network namespace during
codex sandbox startup. The CI workflow already silently tolerated this
by retrying with --enable use_legacy_landlock; added an explicit
AF_NETLINK(16) rule restricted to protocol NETLINK_ROUTE(0) so the
normal Bubblewrap path succeeds without needing that fallback.
3. docker/codex-security-seccomp.json: "socketcall" was unconditionally
allowed in the generic syscall list with no argument filtering. On the
supported SCMP_ARCH_X86 subarchitecture, this legacy multiplexer lets a
32-bit executable open sockets (including AF_NETLINK/AF_PACKET) via
socketcall's own SYS_SOCKET dispatch, bypassing the domain-restricted
socket() rules entirely -- seccomp can't filter socketcall by socket
domain since that lives behind a pointer argument, not a plain integer,
so the safe fix is to stop allowing it unconditionally. socketpair (only
ever AF_UNIX by kernel definition) stays allowed.
Verified with a real Docker build + container runs on a separate host
(not the CI runner, not the openai org):
- Bare `docker run` (no flags): still fails closed with exit 3, unchanged.
- With the added flags: --version, bulk-scan --help, info --json all
exit 0; the discovery-rejection test still returns exit 2 with the
expected message.
- A/B on the sandbox seccomp: the pre-fix profile reproduces the exact
error from the review ("bwrap: loopback: Failed to create NETLINK_ROUTE
socket: Operation not permitted"); the fixed profile runs the same
`codex sandbox /usr/bin/true` command to completion (exit 0) without
the use_legacy_landlock fallback.
- Normal HTTPS egress (AF_INET, via Node's https module) still works
under the fixed profile, confirming the socketcall removal doesn't
regress git-clone/API access on x86_64.
---------
Co-authored-by: mldangelo-oai <mdangelo@openai.com>
Co-authored-by: mldangelo-oai <269034524+mldangelo-oai@users.noreply.github.com>
* feat: add Hugging Face Inference Providers support
Route scans through Hugging Face's OpenAI-compatible router with HF_TOKEN,
matching the existing OpenRouter and Fireworks provider pattern.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(runtime): keep Hugging Face tokens out of workbench helpers
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: mldangelo-oai <269034524+mldangelo-oai@users.noreply.github.com>
Co-authored-by: Michael D'Angelo <mdangelo@openai.com>
* fix(cost): report an inaccessible session log once, not on every poll
readSessionUsage quarantines a log it cannot parse, so the guard at the top
of the function skips it on later polls, but a log it cannot open records
nothing. The next poll opens the same file and fails identically for the life
of the scan, and because an unopenable log never produced a thread id, the
failure also escapes the thread-tree filter in #readSessions. stop() awaits
refresh() unguarded, so the final poll can reject after the turn completed and
discard the caller's usage.
Quarantine the session on an access refusal the process cannot clear by
retrying, mirroring the parse-failure exit. Other open failures keep retrying:
a process-wide shortage such as EMFILE clears on its own, and retiring a
session for it would stop observing usage that could still be read.
* fix(sdk): keep reporting healthy worker activity on session read errors
* Preserve retry diagnostics for unknown resource errors
* Preserve fail-fast cost limits and session error priority
* Keep the first blocking session error when traversal stops
---------
Co-authored-by: Michael D'Angelo <mdangelo@openai.com>
Co-authored-by: mldangelo-oai <269034524+mldangelo-oai@users.noreply.github.com>
* fix(targets): reject special path targets in preflight
Resolved against current target validation.
* fix(targets): validate canonical path types during preflight
* Handle unsupported realpath errors for special targets on macOS
Signed-off-by: Sylvester Kaczmarek <16242628+sylvesterkaczmarek@users.noreply.github.com>
* test(targets): exercise socket preflight in Node
* test(targets): exercise socket rejection in Node and Bun
* fix(targets): validate the resolved path and classify unsupported sockets
* fix(targets): verify filesystem type without losing canonical path bytes
* Scope cancellation test gates to the protected-root lookups
---------
Signed-off-by: Sylvester Kaczmarek <16242628+sylvesterkaczmarek@users.noreply.github.com>
Co-authored-by: Michael D'Angelo <mdangelo@openai.com>
Co-authored-by: mldangelo-oai <269034524+mldangelo-oai@users.noreply.github.com>
* fix(scan): report a failed ignored-but-tracked file listing
`generate_in_scope_files` adds files that Git tracks but `.gitignore`
excludes, because ripgrep omits them. That `git ls-files` call treated a
spawn failure and any non-zero exit as "no such files", so a repository
whose Git listing fails still produced an inventory and reported success
with those files missing.
Raise `InventoryError` with Git's message instead, matching the ripgrep
call a few lines above, which already fails the inventory on a spawn
error or an unexpected exit status. When no trusted Git executable exists,
`git_command` reports status 127 with no output; the listing is still
skipped then, as Git stays optional for this inventory.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(targets): preserve inventory on Git listing failures
* test: reuse accepted source path coverage
* Recognize an empty Git sandbox marker outside a worktree
* Keep shared Git launch and path decoding helpers available to their callers
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Michael D'Angelo <mdangelo@openai.com>
Co-authored-by: mldangelo-oai <269034524+mldangelo-oai@users.noreply.github.com>
* fix(knowledge-base): extract DOCX text boxes once without layout values
* fix(knowledge-base): extract DOCX text boxes once
* fix(knowledge-base): keep one readable DOCX alternate without layout values
* fix(sdk): omit DOCX drawing coordinates from knowledge text
---------
Co-authored-by: Michael D'Angelo <mdangelo@openai.com>
Co-authored-by: mldangelo-oai <269034524+mldangelo-oai@users.noreply.github.com>
* fix: preserve cyber access program in scan configuration
Preserve cyber_access_program across scan preflight configuration, profiles, and project configuration schema so the setting is retained during execution.
* refactor(config): simplify Cyber access feature selection
Read the API-key feature gate from the selected profile and root settings
without serializing and reparsing the entire Codex configuration. Preserve
explicit disables and nullish inheritance, and cover profile precedence in
scan configuration and fresh/resumed worker launches.
Co-authored-by: erantianantha <177647815+erantianantha@users.noreply.github.com>
---------
Co-authored-by: mldangelo-oai <269034524+mldangelo-oai@users.noreply.github.com>
Co-authored-by: erantianantha <177647815+erantianantha@users.noreply.github.com>
Co-authored-by: Michael D'Angelo <mdangelo@openai.com>