Skip to content

Read Words xargs Appends to a gh Write in the Write Guard #3336

Closed

Description

@ptr727

Context

Found by the local review of the lane closing #3074, which fails closed on a merge, commit, or push that xargs runs. Develop's guard shares it, and it was confirmed with a classify probe on a constructed command.

Words xargs Appends to a gh Write Are Not Read for Its Target

xargs appends the words it reads from its input to the command it runs. Rule 3 reads a gh write's target from the words written after gh, so an appended repo flag goes unread:

  • printf -- '-R stranger/example' | xargs gh pr comment 5 -b x is allowed, and gh comments on stranger/example.

The same holds for any gh write whose target or body flag xargs may supply.

Possible Direction

Read a gh write that xargs runs as one whose target the guard does not read, and fail closed with the advice to write every word out, as #3074's change does for a merge.

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

    bugpre-existingscript

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions