Skip to content

test(fluxcontract): the shared-read pin accepts any command name that starts with kubectl #4755

Closed

Description

The shared-read pin in internal/fluxcontract/snapshot_shape_test.go does not end the command name at a separator. So $(kubectlx get hr -o"jsonpath=${HELMRELEASE_HISTORY_JSONPATH}") and $(_cozy_guard_kubectl_v2 get hr ...) both pass as the shared read, though neither runs kubectl or the bounded wrapper.

No suite has either form today, and an unknown command fails loudly with exit 127. The case that matters is a second or renamed wrapper: it would pass the pin without anyone checking what it does with the jsonpath.

Requiring a space or tab after the command name, with a refuse case for each form, would close it.

Activity

  1. added a commit that references this issue on Oct 6, 2026
    a5d12e7
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

    triage/needs-triageIndicates an issue needs triage by a maintainer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions