Address review feedback: dedupe normalized Claude Bash tools and tighten release bash permissions#31615
Merged
Merged
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
Address review feedback from PR #31599
Address review feedback: dedupe normalized Claude Bash tools and tighten release bash permissions
May 12, 2026
Copilot created this pull request from a session on behalf of
pelikhan
May 12, 2026 02:04
View session
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses prior review feedback by ensuring normalized Claude bash tool permissions don’t produce duplicate Bash(...) entries and by tightening release workflow shell permissions while keeping tests and formatting consistent.
Changes:
- De-duplicates the final computed Claude
--allowed-toolslist to prevent repeatedBash(cmd)tokens after wildcard normalization. - Adds a regression test to lock in dedup behavior for
["jq *", "jq"]→ singleBash(jq). - Removes broad
bashpermission from the release workflow tool allowlist and regenerates the lockfile output accordingly.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/engine_helpers_test.go | gofmt formatting cleanup for TestNormalizeBashCommand. |
| pkg/workflow/claude_tools.go | Adds a dedupe pass over allowedTools before sorting/joining. |
| pkg/workflow/claude_engine_tools_test.go | Adds regression coverage to ensure normalized bash entries are deduplicated. |
| .github/workflows/release.md | Removes bash from the bash tool allowlist to avoid unrestricted bash -c .... |
| .github/workflows/release.lock.yml | Regenerated lock output reflecting the removed shell(bash) permission. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 4/5 changed files
- Comments generated: 0
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.
Bug Fix
This PR addresses all review comments from PR review 4268553507. It resolves formatting drift in new tests, removes duplicate normalized Claude
Bash(...)allowlist entries, and narrows overly broad release workflow shell permissions.What was the bug?
Bash(...)entries could be emitted after wildcard normalization (for example bothjq *andjqnormalizing tojq).release.mdallowed plainbash, which enabled arbitrarybash -c ...execution instead of command-scoped access.engine_helpers_test.gowas not gofmt-formatted.How did you fix it?
pkg/workflow/claude_tools.go— de-duplicate canonicalized allowlist entriesallowedToolsbefore sorting/joining, preventing repeatedBash(cmd)tokens in generated output.pkg/workflow/claude_engine_tools_test.go— lock in dedup behavior["jq *", "jq"]to verify output contains a singleBash(jq).pkg/workflow/engine_helpers_test.go— enforce style consistencyTestNormalizeBashCommandblock..github/workflows/release.md(+ regenerated.github/workflows/release.lock.yml) — tighten shell scopebashfrom the workflow bash tool list, preserving explicit command allowlisting only.Testing