openai / openai/codex-security

Detect and warn from HEAD drifting earlier

Open
#164 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:cost area:reports enhancement priority:p2
Dominant language
TypeScript
Stars
10.8k
Forks
801
Avg merge
1d 8h
Merged PRs (30d)
257

Description

I started a security scan and a few seconds later I make sure I was up to dated on the current branch (some files were updated... 🤦 one recent merge... )

I did not realized it would impact the security scan... which then ran for more than ~15 min... before telling me HEAD change -> malformed finding...

It would be nice to advertise the user earlier and detect a HEAD drift if this is going to impact the security scan.

>> ❯ npx @openai/codex-security scan . --model gpt-5.6-terra --effort high --python /usr/bin/python3.12
[00:00] Preparing scan
[00:00] Authentication: stored Codex credentials.
[00:02] Preparing scan
[00:46] Running scan
[00:47] Preflight: worker delegation supported (up to 8 worker slots).
[15:25] Running scancodex-security: warning: Repository HEAD changed while the scan was running; results were saved for the original revision.
codex-security: warning: Skipped malformed finding 1: findings.findings[0].identity: expected an object.

[15:25] Scan complete
codex-security: Findings: 0. Coverage: partial.
codex-security: Elapsed: 923s.
codex-security: Tokens: 28,697,814 input, 26,873,088 cached, 148,144 output.
codex-security: Estimated cost: $13.502247 USD.
codex-security: Report: /root/.codex/state/plugins/codex-security/scans/xxxx/codex-security-xxxx-4vYGZw/report.md
codex-security: Results: /root/.codex/state/plugins/codex-security/scans/xxxx/codex-security-xxxx-4vYGZw
codex-security: Scan coverage is partial; results may be incomplete.

could be related to #20

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the scan lifecycle around the existing HEAD-change warning shown in the command output, and compare it with the behavior discussed in issue #20. Reproduce the scan while changing the current branch, then identify where an earlier warning can be emitted before the long-running scan. Done means users are warned promptly when HEAD drifts and the resulting coverage limitation is clear.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
cli, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.