You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Windows: scan fails while saving scan-manifest.json #51
Repository: private repository authorized for scanning
Reproduction
The scan was run against a fresh local Git clone outside the Documents folder, using a fresh temporary output directory:
$scanRoot=Join-Path$env:TEMP"codex-security-repro"New-Item-ItemType Directory -Force $scanRoot|Out-Null
npx @openai/codex-security scan `
C:\dev\ship-nexus-security `--output-dir "$scanRoot\results"`--format json
Authentication and scan preparation completed successfully.
Expected behavior
The scan should complete and write a valid scan manifest and findings to the specified output directory.
Actual behavior
The scan failed while saving the scan manifest:
codex-security: Could not save the Codex Security scan:
scan-manifest.json: expected a regular file inside the scan directory.
Partial output was retained, but no complete scan result was produced.
Additional failure
When the same output directory was reused, the CLI failed with:
sqlite3.IntegrityError: UNIQUE constraint failed: scans.scan_dir
Notes
Reproduced on Windows.
Reproduced from a fresh local Git clone.
Reproduced with a fresh output directory.
Reproduced with both --json and --format json.
The output directory was outside the repository.
No repository files were modified.
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 with WindowsSandboxLevel::Disabled (the default) render_decision_for_unmatched_command in exec_policy.rs returns Forbidden for every unmatched command. The agent's PowerShell helpers are all "rejected: blocked by policy", it writes nothing, and complete-scan still 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.
PR #67 addressed the default Windows sandbox configuration that can prevent scan artifacts from being written and automatically closed this report. Other causes of the same missing-manifest error remain under investigation in #20, #27, and #73. Thank you for documenting the Windows reproduction and workaround.
Activity
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 3, 2026
PR #67 addressed the default Windows sandbox configuration that can prevent scan artifacts from being written and automatically closed this report. Other causes of the same missing-manifest error remain under investigation in #20, #27, and #73. Thank you for documenting the Windows reproduction and workaround.