Fix container smoke detection fallback#106
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes containerized smoke threat detection running inside the AWF container by pointing /reflect at the host (via host.docker.internal) instead of container loopback, and updates the Codex CLI invocation to use the supported codex exec positional prompt instead of --prompt-file.
Changes:
- Update generated container smoke workflows (and the generator) to set
THREAT_DETECTION_REFLECT_URLtohttp://host.docker.internal:8080/reflect. - Change Codex engine execution to pass the prompt as a positional argument to
codex exec, and update unit tests accordingly. - Regenerate the Copilot / Claude / Codex
*-container.lock.ymlworkflow siblings with the new reflect URL.
Show a summary per file
| File | Description |
|---|---|
| scripts/create-threat-detection-sibling-workflows.py | Updates container sibling generation to use host.docker.internal for reflect. |
| pkg/engine/engine.go | Changes Codex CLI invocation from prompt-file to positional prompt. |
| pkg/engine/engine_test.go | Updates tests to assert the new Codex argument format. |
| .github/workflows/smoke-copilot-container.lock.yml | Regenerated to use host.docker.internal reflect URL. |
| .github/workflows/smoke-codex-container.lock.yml | Regenerated to use host.docker.internal reflect URL. |
| .github/workflows/smoke-claude-container.lock.yml | Regenerated to use host.docker.internal reflect URL. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 6/6 changed files
- Comments generated: 2
This was referenced May 14, 2026
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This was referenced May 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
http://host.docker.internal:8080/reflectinstead of container loopback.codex execprompt instead of using unsupported--prompt-file.Why
Container smoke detection was falling back to engine CLIs because
/reflectwas configured ashttp://127.0.0.1:8080/reflectinside the AWF container, where that points at container loopback and returns connection refused. Claude happened to succeed via CLI fallback, but Copilot and Codex did not. Codex also failed explicitly because@openai/codex@0.128.0rejectscodex exec --prompt-file.Validation
python3 scripts/create-threat-detection-sibling-workflows.py --checkgo test ./...make docker-smoke IMAGE_TAG=reflect-and-codex-fix