-
Notifications
You must be signed in to change notification settings - Fork 28
Remove bash wildcard restriction in strict mode #3407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Remove call to validateStrictBashTools from validateStrictMode
- Update documentation to reflect that bash wildcards are now allowed
- Mark validateStrictBashTools as deprecated but keep for historical reference
- Update tests: bash wildcards ("*" and ":*") now allowed in strict mode
- All tests passing, build successful
- Manual verification completed with test workflows
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
bash: ["*"] in strict modeThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR removes the bash wildcard restriction from strict mode validation, allowing workflows compiled with --strict to use bash wildcards like * and :*. The validation function validateStrictBashTools() is deprecated but retained for historical reference.
Key changes:
- Removed the call to
validateStrictBashTools()from the strict mode validation chain - Updated documentation comments to reflect that bash wildcards are now allowed in strict mode
- Changed test cases from expecting errors to expecting success for bash wildcard usage
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pkg/workflow/strict_mode.go | Removed the call to validateStrictBashTools() and updated documentation to remove bash wildcard validation from the list of strict mode checks |
| pkg/workflow/validation_strict_mode.go | Added deprecation notice to validateStrictBashTools() function and updated documentation comments |
| pkg/workflow/strict_mode_test.go | Updated test cases to expect bash wildcards to be allowed in strict mode rather than rejected |
Comments suppressed due to low confidence (1)
pkg/workflow/strict_mode.go:13
- Documentation comment is outdated. This line mentions 'Bash wildcard tool usage' as a constraint enforced by strict mode, but bash wildcards are now allowed. This line should be removed from the list.
// - Bash wildcard tool usage
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
🔍 Nitpick Review - Clean Code!I've reviewed PR #3407 and found no nitpicks to report. This is exceptionally clean code! 🎉 What I Reviewed
✅ Positive HighlightsYour code demonstrates excellent practices:
📋 Review Summary
This PR is a textbook example of how to deprecate functionality while maintaining code clarity and historical context. No changes needed! ✨ Reviewed: 2025-11-07
|
|
@copilot merge main and not |
|
@copilot lint |
The function was deprecated but unused, causing linting errors. Removed completely to fix linting issues. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Update documentation to reflect recent feature changes and improvements. Changes made: - Remove outdated bash wildcard restriction in strict mode (PR #3407) - Update CLI documentation for improved workflow discovery (PR #3402, #3406) - Document wildcard workflow addition with better error handling (PR #3404) - Update security guide to use neutral language about wildcards Referenced PRs: - #3407 - Remove bash wildcard restriction in strict mode - #3406 - Display workflow list as table with ID, Name, and Description - #3402 - Show available workflows when workflow not found in add command - #3404 - Emit warning instead of error when wildcard adds encounter existing workflows 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Update documentation to reflect recent feature changes and improvements. Changes made: - Remove outdated bash wildcard restriction in strict mode (PR #3407) - Update CLI documentation for improved workflow discovery (PR #3402, #3406) - Document wildcard workflow addition with better error handling (PR #3404) - Update security guide to use neutral language about wildcards Referenced PRs: - #3407 - Remove bash wildcard restriction in strict mode - #3406 - Display workflow list as table with ID, Name, and Description - #3402 - Show available workflows when workflow not found in add command - #3404 - Emit warning instead of error when wildcard adds encounter existing workflows 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com>
Remove the restriction of
bash: ["*"]in strict modeSummary
This PR removes the restriction that prevented bash wildcards (
*and:*) from being used in strict mode. Bash tools can now use wildcards even when strict mode is enabled.Changes Made
validateStrictBashToolsfunction call from strict mode validationvalidateStrictBashToolsfunction to fix linting errorsTechnical Details
Files Modified:
pkg/workflow/strict_mode.govalidateStrictBashToolsfrom the strict mode orchestratorpkg/workflow/validation_strict_mode.govalidateStrictBashToolsfunction completely (was causing linting errors as unused)pkg/workflow/strict_mode_test.gobash wildcard star allowed in strict modebash wildcard colon-star allowed in strict modebash wildcard star mixed with commands allowed in strict modeVerification
✅ All unit tests passing (including strict mode tests)
✅ Build successful
✅ Linting passes without errors
✅ Manual verification with test workflows:
bash: ["*"]compiles successfully in strict modebash: [":*"]compiles successfully in strict modebash: ["echo", "ls", "*", "pwd"]compiles successfully in strict mode✅ Merged with latest main branch changes
Other Strict Mode Validations (Still Active)
The following strict mode validations remain in effect:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.