Skip to content

feat: flag inactive Compose dependency targets - #230

Open
Joncallim wants to merge 1 commit into
codex/68-cron-provenance-webfrom
codex/69-compose-target-finding-core
Open

feat: flag inactive Compose dependency targets#230
Joncallim wants to merge 1 commit into
codex/68-cron-provenance-webfrom
codex/69-compose-target-finding-core

Conversation

@Joncallim

Copy link
Copy Markdown
Owner

Summary

  • add the closed docker.compose_declared_target_not_active advisory
  • emit it only for one metadata-free, fresh V1 Docker Compose dependency between unique Docker container nodes, with a running source and stopped/failed target
  • clear cached advisory and Docker evidence when the source switches to mock

Verification

  • npm run test:rust:core
  • npm run test:rust:daemon
  • npm run fmt:rust:check
  • npm run lint:rust
  • npm run generate:contracts
  • npm run check:contracts

Follow-up

API/web consumers must add strict handling for the closed rule before it is presented in browser-facing findings.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-02T14:54:52.333295Z 91f7e08 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 91f7e08606

ℹ️ 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".

"finding_docker_compose_declared_target_not_active_{}",
collision_resistant_id_component(&format!("{}\u{1f}{}", edge.source, edge.target))
),
rule_id: FindingRule::DockerComposeDeclaredTargetNotActive,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Accept the new finding at the API boundary

When this branch emits DockerComposeDeclaredTargetNotActive, the browser-facing /api/findings route becomes unavailable: hasCoherentFindings in apps/api/src/daemonResponseValidation.ts accepts only the three pre-existing rules and returns false for every other rule at line 285, after which validateDaemonResponse rejects the entire payload and daemonClient.ts converts that rejection to HTTP 502. Add strict coherence validation for this new rule in the same change so a running service with an inactive Compose target does not hide all findings.

Useful? React with 👍 / 👎.

.status
.as_deref()
.map(RuntimeServiceStatus::from_status_text),
Some(RuntimeServiceStatus::Stopped | RuntimeServiceStatus::Failed)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve completion semantics before flagging stopped targets

For a Compose dependency declared with condition: service_completed_successfully, the expected healthy state is that the target exits successfully while the dependent remains running, but this condition is discarded by parse_depends_on_label in crates/dockermap-daemon/src/docker_collector.rs:296-310. Consequently an Exited (0) one-shot migration or initialization service normalizes to Stopped here and generates a misleading inactive-target advisory even though its declared condition was satisfied; preserve and inspect the condition, or otherwise exclude successful completion from this rule.

Useful? React with 👍 / 👎.

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.

1 participant