Skip to content

Conversation

@nithishr
Copy link
Contributor

Potential fix for https://github.com/Couchbase-Ecosystem/mcp-server-couchbase/security/code-scanning/6

To fix the code injection risk, values that may be influenced by untrusted input (such as version strings from files committed to the repo) must not be interpolated into run: blocks using ${{ ... }} syntax. Instead, these should be set as environment variables at the step level and referenced using native shell variable syntax ($VAR). Specifically: in the "Notify completion" step (lines 142-148), move the assignment of steps.version.outputs.version to an environment variable, then reference it within the run block using $VERSION. The rest of the use of $VERSION remains unchanged. This avoids shell injection, as the shell variable is properly quoted and parsed.

Changes involved:

  • In step 142 ("Notify completion"), add an env: section to assign VERSION: ${{ steps.version.outputs.version }}.
  • In the associated shell script (lines 145-147), replace references to ${{ steps.version.outputs.version }} with $VERSION.

No changes are needed elsewhere in the file to accomplish this error fix.


Suggested fixes powered by Copilot Autofix. Review carefully before merging.

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@nithishr nithishr marked this pull request as ready for review November 12, 2025 17:06
@nithishr nithishr merged commit 9e5e0c3 into main Nov 13, 2025
6 checks passed
@nithishr nithishr deleted the alert-autofix-6 branch November 13, 2025 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants