Skip to content

push gate: an env-prefixed push after a multi-line commit message is refused #20847

Open

Description

@Maqix

KiroCrew version

main @ a790373 (also the head of #15438)

Platform

Linux / macOS / Windows (pure-Python argv floor, platform-independent)

What happened

After a multi-line commit message, a feature-branch push behind an environment prefix is refused:

git commit -m 'a

b' && env PATH=/x:$PATH git push origin feat

Same for PATH=/x git push origin feat. Refusal: rule=git-publish-target-unverifiable (with #15438 applied, it also carries the "put the push on its own line" hint).

#15438 only treats a quoted newline as harmless message text when every other command in the chain is on a closed allowlist (cd <dir>, git add, git commit -m/-q, git push -u/-q). An env/assignment prefix is outside that list, so the sentinel stays and the push is read as possibly fused with message text.

Steps to reproduce

from kiro_crew.security import is_denied
is_denied("git commit -m 'a\n\nb' && env PATH=/x:$PATH git push origin feat")
is_denied("git commit -m 'a\n\nb' && PATH=/x git push origin feat")
# both -> Blocked by security policy: ... rule=git-publish-target-unverifiable

Expected

Allowed, the same as with the push on its own line, which main already allows:

git commit -m 'a

b'
env PATH=/x:$PATH git push origin feat

Workaround

Put the push on its own line.

Anything else

Follow-up from #15438 (one of its listed non-goals). Refs #12631.

Activity

  1. added
    tier:T1Bug: behaviour does not match intent; fix keeps the design
    on Oct 15, 2026
  2. KiroCrewCaptain commented on Oct 15, 2026

    @KiroCrewCaptain
    Collaborator

    Thanks for the report. This issue has been triaged by Crew Captain and will be assigned to a maintainer, who will follow up here.

  3. added 12 commits that reference this issue on Oct 15, 2026
    f11c790
    5baaf50
    2ec7390
    1533ad9
    d5e9e7e
    88dd99d
    c93686f
    6d26afe
    fdd0a2e
    779a4b3
    2d4c52f
    b347870
  4. 24 remaining items

  5. added 15 commits that reference this issue on Oct 27, 2026
    552fbfb
    852dc0a
    a6e36a4
    d18879b
    5ae3b0e
    8c08779
    1a06557
    4c940ca
    2269471
    615fdf6
    b2350bd
    6bc8166
    451e1de
    3744910
    fe5f6f7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

tier:T1Bug: behaviour does not match intent; fix keeps the design

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions