Repository navigation
Closed
Labels
area:costToken usage, cost estimates, spending limits, and quota visibility.area:reportsHuman-readable reports, source excerpts, exports, and SARIF projections.area:sandboxExecution permissions, isolation, trusted paths, and filesystem access controls.bugSomething isn't workingplatform:windowsWindows, PowerShell, Windows paths, or Windows ACLspriority:p2Significant defect or product gap with narrower impact or a workaroundquestionFurther information is requestedstatus:needs-infoWaiting for reporter details or a reliable reproduction
Description
Windows: codex-security scan fails with scan-manifest.json: expected a regular file inside the scan directory
Summary
Running codex-security scan on Windows successfully authenticates and starts scanning the repository, but fails when saving the scan results with the following error:
scan-manifest.json: expected a regular file inside the scan directory
The scan runs for several minutes before failing and leaves a partial scan output in the local Codex state directory.
Environment
- OS: Windows 11
- Shell: PowerShell
- Codex Security CLI: 0.1.1
- Node.js: v24.14.0
- npm: 11.9.0
Steps to Reproduce
- Open PowerShell.
- Navigate to a local Git repository.
- Run:
codex-security scan- Wait for the scan to finish.
Expected Behavior
The scan completes successfully and saves the scan results.
Actual Behavior
The scan appears to complete its analysis but fails while saving the scan results.
PS C:\...\SecureOn> codex-security scan
[00:01] Preparing scan
[00:01] Authentication: stored Codex credentials.
[00:07] Preparing scan
[06:32] Running scan
codex-security: Could not save the Codex Security scan: scan-manifest.json: expected a regular file inside the scan directory.
codex-security: Partial output was kept at C:\Users\<redacted>\.codex\state\plugins\codex-security\scans\SecureOn\codex-security-SecureOn-Gp6lAZ.
Additional Information
- Authentication succeeds without issue.
- The scan runs for approximately 6 minutes before failing.
- A partial scan directory is created under the Codex state directory.
- The error appears to occur while writing or packaging the final scan output rather than during the scan itself.
Please let me know if additional logs or the contents of the partial scan directory would help with debugging.
Reacted by xtclovver, hjo12, serge shima and Corie Watson
Metadata
Metadata
Assignees
Labels
area:costToken usage, cost estimates, spending limits, and quota visibility.area:reportsHuman-readable reports, source excerpts, exports, and SARIF projections.area:sandboxExecution permissions, isolation, trusted paths, and filesystem access controls.bugSomething isn't workingplatform:windowsWindows, PowerShell, Windows paths, or Windows ACLspriority:p2Significant defect or product gap with narrower impact or a workaroundquestionFurther information is requestedstatus:needs-infoWaiting for reporter details or a reliable reproduction
Activity
hjo12 commentedon Jul 29, 2026
receiving same error after ~3 minutes, on node version
v24.16.0and npm version11.13.0, with package info below:smixs commentedon Jul 29, 2026
same here
wellnotedhq commentedon Jul 29, 2026
Root cause and a working workaround posted on #20: #20 (comment)
Short version: on Windows the SDK combines a managed filesystem permission profile with
approvalPolicy: "never", and withWindowsSandboxLevel::Disabled(the default)render_decision_for_unmatched_commandinexec_policy.rsreturnsForbiddenfor every unmatched command. The agent's PowerShell helpers are all "rejected: blocked by policy", it writes nothing, andcomplete-scanstill runs - producing the misleading missing-manifest error.Workaround:
codex-security scan <repo> --output-dir <dir> --codex features.experimental_windows_sandbox=true. Verified A/B on one machine: without the flag, three runs died in preflight at ~7 min with zero files written; with it, the scan ran 49 min and wrote every canonical artifact.mldangelo-oai commentedon Aug 15, 2026
Thanks for the reports. #67 fixed the original disabled Windows sandbox, but later comments suggest there may be a separate failure. Could you retry with
@openai/[email protected]or newer and share the Windows version, scan mode, sandbox backend, first error, and a sanitized artifact listing? Please leave out source code, credentials, and repository details.mldangelo-oai commentedon Aug 31, 2026
Thanks for reporting this. I believe #67 resolved the original Windows sandbox issue. If this still happens on the latest version, please feel free to reopen with your Windows version and the error you’re seeing.
fix(ui): re-vendor c8s-verify for the client-first protocol; drop the…
feat(ui): attested console for the scan API (#2)