-
Notifications
You must be signed in to change notification settings - Fork 36
Fix shell quoting issues (SC2086) across workflows and engines #3131
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
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There 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 adds proper quoting to shell variable references and paths in GitHub Actions workflows to improve shell script safety and prevent potential issues with special characters or spaces. The changes ensure consistent best practices for shell scripting by wrapping variable expansions and file paths in double quotes.
Key changes:
- Added double quotes around environment variable references (e.g.,
$CODEX_HOME,$GITHUB_OUTPUT,$GH_AW_MCP_CONFIG,${{ github.repository }}) - Added double quotes around file paths with variable expansions (e.g.,
/tmp/gh-aw/prompt-cache/pr-full-data/pr-${pr_number}.json) - Added double quotes around npm package specifications with variable expansions (e.g.,
opencode-ai@${GH_AW_AGENT_VERSION})
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/codex_engine.go | Added quotes around $CODEX_HOME/logs in mkdir commands |
| .github/workflows/video-analyzer.lock.yml | Added quotes around $GITHUB_OUTPUT in echo command |
| .github/workflows/test-post-steps.md | Added quotes around $GITHUB_STEP_SUMMARY in shell redirect |
| .github/workflows/test-post-steps.lock.yml | Added quotes around $GITHUB_STEP_SUMMARY in compiled workflow |
| .github/workflows/smoke-opencode.lock.yml | Added quotes around opencode-ai@${GH_AW_AGENT_VERSION} in npm install |
| .github/workflows/smoke-codex.lock.yml | Added quotes around $CODEX_HOME/logs in mkdir commands |
| .github/workflows/shared/opencode.md | Added quotes around opencode-ai@${GH_AW_AGENT_VERSION} in npm install |
| .github/workflows/shared/genaiscript.md | Added quotes around $GH_AW_MCP_CONFIG in genaiscript command |
| .github/workflows/shared/ffmpeg.md | Added quotes around $GITHUB_OUTPUT in echo command |
| .github/workflows/prompt-clustering-analysis.md | Added quotes around ${{ github.repository }} and file paths with variable expansion |
| .github/workflows/prompt-clustering-analysis.lock.yml | Added quotes around repository references and output file paths in compiled workflow |
| .github/workflows/duplicate-code-detector.lock.yml | Added quotes around $CODEX_HOME/logs in mkdir commands |
| .github/workflows/daily-test-improver.md | Added quotes around $GITHUB_OUTPUT in echo commands |
| .github/workflows/daily-test-improver.lock.yml | Added quotes around $GITHUB_OUTPUT in compiled workflow |
| .github/workflows/daily-perf-improver.md | Added quotes around $GITHUB_OUTPUT in echo commands |
| .github/workflows/daily-perf-improver.lock.yml | Added quotes around $GITHUB_OUTPUT in compiled workflow |
| .github/workflows/copilot-session-insights.md | Added quotes around $GITHUB_OUTPUT in multiple echo commands |
| .github/workflows/copilot-session-insights.lock.yml | Added quotes around $GITHUB_OUTPUT in compiled workflow |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot merge main |
…ting-issues # Conflicts: # .github/workflows/copilot-session-insights.lock.yml # .github/workflows/prompt-clustering-analysis.lock.yml
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Head branch was pushed to by a user without write access
Fix Shell Quoting Issues (SC2086) - ✅ COMPLETE
Objective
Add double quotes around variable references in shell scripts across 9 workflows to prevent globbing and word splitting issues (shellcheck SC2086).
Recent Changes
Plan Completion
Files Modified (9 total)
Workflow Files (5):
.github/workflows/copilot-session-insights.md- Fixed 6 unquoted$GITHUB_OUTPUTand$GITHUB_STEP_SUMMARY.github/workflows/prompt-clustering-analysis.md- Fixed 3 unquoted variables (${{ github.repository }}, file path with variable).github/workflows/daily-perf-improver.md- Fixed 2 unquoted$GITHUB_OUTPUT.github/workflows/daily-test-improver.md- Fixed 2 unquoted$GITHUB_OUTPUT.github/workflows/test-post-steps.md- Fixed 1 unquoted$GITHUB_STEP_SUMMARYShared Configuration Files (3):
6.
.github/workflows/shared/opencode.md- Fixed 1 unquoted npm package version variable7.
.github/workflows/shared/genaiscript.md- Fixed 1 unquoted$GH_AW_MCP_CONFIG8.
.github/workflows/shared/ffmpeg.md- Fixed 1 unquoted$GITHUB_OUTPUTSource Code (1):
9.
pkg/workflow/codex_engine.go- Fixed 2 unquoted$CODEX_HOME/logsin codex engineAcceptance Criteria - All Met ✅
Verification Results
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.