Skip to content

fix(review): a scanner finding that names a kubernetes object the reviewed commit lacks is rejected as object-not-in-commit #1352

Description

@dan-petty

Problem

This is a Copilot thread on release PR #1283, verified at b57ef7f. No admission call passes manifest_objects [code: src/devops_cli/ai/review/pipeline.py:648], so object-not-in-commit can never fire. A kube-linter or Pluto result that names a Kubernetes object the reviewed revision lacks is admitted. A probe showed k8s/app.yaml:Deployment/ghost admitted as OPEN. The path, line range and region hash are already checked. #871 introduced this.

Acceptance criteria

  • Admission receives the reviewed revision's Kind/name objects. They are read with yaml.safe_load_all, including List items, from the reviewed revision's manifests. A result naming an object that is not there is rejected as object-not-in-commit.
  • The test key matches what the scanners emit (Deployment/web, not Deployment/default/web).
  • lockfile_packages stays unset until a scanner emits name@version locators.
  • uv run devops ci passes.

Strategic alignment

Added scope (Copilot thread on #1283, 2026-10-07)

  • A finding with only a logical location, and no physical path, reaches the logical-location check instead of being rejected for its empty path [code: src/devops_cli/review/location.py:77]. With no physical region, it is admitted only with the matching manifest object as evidence.

Update 2026-10-08: refinement

Kube-linter and Pluto write <manifest>:<Kind>/<name> today; #1045 moves them to #1141's kind/namespace/name, so Deployment/web goes stale.

  • The manifest reader and the adapters build the key with one function, tested with and without metadata.namespace; tests/test_review_admission.py:129 moves to it.

Activity

  1. added
    type/bug
    scope/review
    priority/p3-low
    on Oct 7, 2026
  2. dan-petty-bot commented on Oct 8, 2026

    @dan-petty-bot
    Collaborator

    Intake placed this item to the backlog: at intake only a critical fix goes into a release; a release start pulls Ready items in, P0 features first.

    • Priority: P2-Medium. A correctness defect in the review pipeline that admits false findings, but it does not block the system or expose a direct security vulnerability.
    • Value: Medium. Prevents scanner findings that reference non-existent Kubernetes objects from polluting review results, improving trust in the pipeline's verdicts.
    • Effort: Medium. Requires wiring manifest_objects through the admission call, parsing manifests with yaml.safe_load_all including List items, matching the scanner's Kind/name key format, and adding tests.
  3. dan-petty commented on Oct 8, 2026

    @dan-petty
    OwnerAuthor

    Linked: #1301 and #1143. _admit_single_candidate (ai/review/pipeline.py:636-656) passes none of severity_caps, manifest_objects or canary_passed; whichever lands second rebases. Found by the 2026-10-08 backlog review.

  4. dan-petty commented on Oct 9, 2026

    @dan-petty
    OwnerAuthor

    Folded in from the #1045 re-scope (2026-10-09)

    This item's refinement says kube-linter and Pluto omit the namespace until #1045. After #1045, kube-linter's symbol is Kind/<namespace>/<name> (or Kind/name without one); Pluto gets the same form with #1434.

  5. added a commit that references this issue on Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p3-lowscope/reviewtype/bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions