Skip to content

Fix SC2086 shellcheck warnings in super-linter workflow#3645

Merged
pelikhan merged 2 commits intomainfrom
copilot/fix-missing-quotes-super-linter
Nov 11, 2025
Merged

Fix SC2086 shellcheck warnings in super-linter workflow#3645
pelikhan merged 2 commits intomainfrom
copilot/fix-missing-quotes-super-linter

Conversation

Copy link
Contributor

Copilot AI commented Nov 11, 2025

Three unquoted $GITHUB_OUTPUT variable references in the super-linter workflow triggered SC2086 warnings about missing quotes to prevent globbing and word splitting.

Changes

  • Added double quotes around $GITHUB_OUTPUT in the "Check for linting issues" step (3 instances)
- echo "needs-linting=true" >> $GITHUB_OUTPUT
+ echo "needs-linting=true" >> "$GITHUB_OUTPUT"

Fixes #3554

Original prompt

This section details on the original issue you should resolve

<issue_title>[task] Fix SC2086 missing quotes in super-linter workflow</issue_title>
<issue_description>## Objective
Review and fix variable quoting issues in the super-linter workflow to address 3 SC2086 shellcheck warnings.

Context

Static analysis identified 3 instances of SC2086 ("Double quote to prevent globbing and word splitting") in the super-linter workflow. This is a minor code quality issue that could lead to unexpected behavior with filenames containing spaces or glob characters.

Related to discussion #3527.

Approach

  1. Review the super-linter workflow markdown file (.github/workflows/super-linter.md)
  2. Identify unquoted variable references in shell commands
  3. Add double quotes around variable expansions (e.g., change $VAR to "$VAR")
  4. Test the workflow to ensure quoting doesn't break functionality

Files to Modify

  • .github/workflows/super-linter.md

Acceptance Criteria

  • All variable references properly quoted
  • Run gh aw compile super-linter successfully
  • Run gh aw compile super-linter --actionlint shows no SC2086 warnings
  • Workflow functionality unchanged (test by running workflow if possible)

Impact

Improves code robustness and eliminates 3 linting warnings.
Related to #3527

AI generated by Plan Command for discussion #3527</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

- Add double quotes around $GITHUB_OUTPUT variable references
- Fixes 3 SC2086 warnings about missing quotes to prevent globbing
- Verified with actionlint that warnings are resolved
- All unit tests pass

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix missing quotes in super-linter workflow Fix SC2086 shellcheck warnings in super-linter workflow Nov 11, 2025
Copilot AI requested a review from pelikhan November 11, 2025 19:17
@pelikhan pelikhan marked this pull request as ready for review November 11, 2025 19:31
Copilot AI review requested due to automatic review settings November 11, 2025 19:31
@pelikhan pelikhan merged commit 694d7f6 into main Nov 11, 2025
68 checks passed
@pelikhan pelikhan deleted the copilot/fix-missing-quotes-super-linter branch November 11, 2025 19:32
Copy link
Contributor

Copilot AI left a 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 addresses SC2086 shellcheck warnings by adding proper double quotes around $GITHUB_OUTPUT variable references in the super-linter workflow. The fix prevents potential issues with globbing and word splitting when the variable is expanded, aligning with shell scripting best practices and the project's security guidelines.

Key Changes:

  • Added double quotes around 3 instances of $GITHUB_OUTPUT variable references in the "Check for linting issues" step
  • Applied the same fix to both the source workflow file (.md) and the compiled lock file (.lock.yml)

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
.github/workflows/super-linter.md Added quotes around $GITHUB_OUTPUT on lines 53, 55, and 58 to prevent globbing and word splitting
.github/workflows/super-linter.lock.yml Applied identical quoting fixes to the compiled workflow on lines 4544, 4546, and 4549

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants