feat: validate Compose target findings at API boundary - #231
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0d9a7de20d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| && evidence.kind === "docker_compose_depends_on" | ||
| && evidence.assertionKind === "observed" | ||
| && evidence.summary === "Docker recorded Compose dependency declaration" | ||
| && evidence.subjectRef === finding.subjectRef | ||
| && (evidence.providerSlot === undefined || evidence.providerSlot === null) |
There was a problem hiding this comment.
Bind Compose evidence IDs to the target
When the daemon returns an otherwise valid Compose finding whose evidence ID names another target—or contains arbitrary daemon-controlled text—this branch accepts it because it binds only evidence.subjectRef, never evidence.id. Core's docker_runtime_evidence derives the evidence ID from both source and target (crates/dockermap-core/src/snapshot_runtime.rs:423-426), so this gap can publish a conclusion unsupported by its attached evidence and provides an unnecessary string channel to browser clients; recompute and compare the canonical Compose evidence ID here.
AGENTS.md reference: AGENTS.md:L17-L20
Useful? React with 👍 / 👎.
Summary
Verification
npm run typechecknpm run test:contractsnpm run buildnpm run check:contractsThe full API wrapper was also started twice; this environment cuts its output at 30 seconds after all shown tests passed. Focused tests cover the changed paths to completion.