fix: strip heredoc body before pipe/chain checks (#21)#23
Merged
Conversation
Owner
Author
|
@coderabbitai can you please review? |
|
✅ Actions performedReview triggered.
|
…ives Literal | characters inside a <<'EOF' heredoc body were surviving the quote-stripping pass and being misidentified as pipe operators. This caused commands like `gh issue create --body "$(cat <<'EOF' ... EOF )"` to be incorrectly blocked whenever the body contained markdown tables, option lists, or type unions with | in them. Fix: after quote-stripping, if the stripped command contains a heredoc opener (<<), keep only the first line for chaining analysis. The heredoc body is literal text and cannot contain shell operators. Closes #21
312d5e8 to
9fa4c5b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
|characters inside a<<'EOF'heredoc body were surviving the quote-stripping pass and being misidentified as pipe operatorsgh issue create --body "$(cat <<'EOF' ... | table | ... EOF )"were incorrectly blocked whenever the body contained markdown tables, option lists, or type unions<<), keep only the first line for chaining analysis — the heredoc body is literal text and cannot contain shell operatorsTest plan
bash hooks/no-chaining.test.sh— 49 tests, all pass|, markdown table|, type-union|Closes #21