Skip to content

feat: add Codex CLI agent adapter - #12

Merged
vsn411 merged 1 commit into
secfoo-com:mainfrom
Varunpoojari:feat/codex-agent
Sep 21, 2026
Merged

vsn411 merged 1 commit into
secfoo-com:mainfrom
Varunpoojari:feat/codex-agent

Conversation

@Varunpoojari

Copy link
Copy Markdown
Collaborator

What was missing

secfoo could only run assessments through Claude Code, Cursor, Antigravity, Gemini CLI and the built-in secfoo agent. Codex CLI was not selectable.

What this adds

  • CodexAdapter (codex exec) registered as --agent codex
  • Runs with --sandbox read-only, --skip-git-repo-check, --ephemeral, --color never; prompt passed after --
  • Report is the plain stdout final message, so no JSON parsing is needed
  • Docs and config example updated; secfoo mcp sync --agent codex gives a clear "not supported yet" error

Testing

  • 7 new adapter tests plus CLI tests; pytest tests/test_agents tests/test_cli.py passes (72)
  • Full suite: 650 passed, 4 pre-existing diagram-page failures that also occur on main
  • End-to-end: ran secfoo run --agent codex --skill sast on a sample app with a hardcoded password and os.system(input()); status success in 59s, report flagged both, target directory unchanged

Follow-up: MCP config sync for Codex.

@Varunpoojari

Copy link
Copy Markdown
Collaborator Author
Screenshot 2026-09-21 at 17 29 35 Screenshot 2026-09-21 at 17 30 10

@vsn411
vsn411 merged commit 999a8dc into secfoo-com:main Sep 21, 2026
2 checks passed
geet038 added a commit that referenced this pull request Sep 21, 2026
The conflict resolution kept both sides in several places:
- repository.py create_completed_run: two INSERT statements spliced
  together (unclosed paren -> SyntaxError, every test failed) and a
  duplicate cost_usd parameter
- repository.py complete_run: a leftover SQL line from #10 after the
  UPDATE string, so execute() received three arguments
- schema.sql: cost_usd declared twice (duplicate column name)
- cli.py: two `cost` commands and two Cost columns in `list`
- overview/project/run_detail templates: both cost renderings; README:
  interleaved intro sentence and an unclosed code fence

Keep one version of each (the one with tokens and "-" for unknown
cost), drop the now-unused total_cost_usd from the overview route, and
point #10's two `cost` CLI tests at the current command. Both the
`secfoo` and `codex` agents from main are kept.

Co-Authored-By: Claude Opus 5 <[email protected]>
@Melwinjoel20 Melwinjoel20 mentioned this pull request Oct 27, 2026
4 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants