fix: use env vars for GitHub context expressions in run steps to prevent injection#8852
Merged
Merged
Conversation
…ent injection Agent-Logs-Url: https://github.com/streetsidesoftware/cspell/sessions/222149e2-ed70-4ec4-a25f-5822dba0deb9 Co-authored-by: Jason3S <3740137+Jason3S@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
Jason3S
May 23, 2026 16:51
View session
Jason3S
approved these changes
May 23, 2026
Contributor
Performance ReportDaily Performancexychart-beta
title Files Per Second by Day
y-axis Files per Second
x-axis Date [May-4, May-19, May-23]
bar [186.25, 187.94, 194.83]
line [35.07, 33.61, 33.61]
line [140.01, 135.42, 141.02]
line [53.38, 53.17, 61.69]
line [38.18, 20.00, 21.39]
line [46.04, 43.44, 46.93]
line [71.11, 69.47, 66.58]
line [100.08, 77.54, 78.67]
line [81.26, 84.52, 86.35]
line [191.37, 176.15, 214.04]
line [166.55, 126.61, 150.76]
line [119.17, 123.77, 126.62]
line [17.95, 22.53, 20.36]
line [24.56, 24.84, 25.25]
line [24.93, 21.05, 26.01]
line [91.75, 92.82, 98.34]
line [102.79, 98.35, 97.90]
line [382.99, 374.77, 364.18]
line [158.32, 153.28, 150.66]
line [13.72, 16.48, 15.69]
line [6.46, 6.48, 6.95]
line [229.32, 234.71, 224.49]
line [189.78, 185.86, 187.24]
line [240.52, 257.39, 266.56]
line [37.38, 45.35, 36.30]
line [218.55, 254.57, 234.88]
line [127.00, 147.92, 129.44]
line [215.39, 212.55, 216.41]
line [226.51, 267.13, 237.19]
line [353.58, 346.15, 341.56]
line [160.29, 160.94, 165.78]
line [213.17, 213.72, 210.62]
line [129.13, 127.71, 126.19]
line [94.12, 93.35, 93.70]
line [138.03, 140.07, 141.47]
line [213.15, 208.87, 215.72]
line [84.38, 85.95, 85.10]
line [321.24, 319.57, 291.15]
line [41.81, 48.29, 54.89]
line [126.81, 116.06, 118.55]
line [144.52, 126.78, 142.90]
line [263.11, 260.36, 248.86]
line [172.93, 177.15, 175.73]
line [258.73, 266.74, 250.31]
line [97.37, 104.19, 101.73]
line [263.28, 254.35, 254.16]
line [403.25, 398.12, 450.82]
line [209.84, 213.89, 207.66]
line [222.86, 217.73, 205.56]
line [193.68, 201.86, 201.58]
line [170.59, 170.67, 197.00]
Time to Process Files
Note:
Files per Second over Time
Data Throughput
|
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.
Summary
This PR fixes script injection and secret exposure security issues found in GitHub Actions workflows and composite actions. In each case, a GitHub expression (
${{ ... }}) was used directly inside arun:shell command instead of being passed through an environment variable — the recommended approach per GitHub's security hardening guide.Issues Fixed
🔴 Secrets exposed in process arguments (visible via
ps aux)update-readme.ymlpnpm update-contributors ${{ secrets.GITHUB_TOKEN }}— token as CLI argreuseable-load-integrations-repo-list.yml./tester.js list --json $DIRTY -t ${{ secrets.GITHUB_TOKEN }}— token as CLI argbuild-version-release.yml"https://${{ secrets.GITHUB_TOKEN }}@github.com/..."— token inline in URL🔴 GITHUB_ENV injection (allows setting arbitrary environment variables)
set-env/action.yamlecho "${{ inputs.name }}<<delimiter" >> $GITHUB_ENV— name injected directly🟠 Shell script injection via unsanitised expressions in
run:stepsbuild-version-release.yml${{ steps.version.outputs.version }}in lerna/gh commandspublish.yml${{ steps.dist_tag.outputs.value }}in lerna publish commandintegration-test.yml${{ matrix.repo }}in shell run and jq selectorupdate-dictionaries.yml${{ matrix.repo }}in shell run and jq selectorupdate-integration-repositories.yml${{ matrix.repo }}and${{ github.event.inputs.ref }}in run stepsreuseable-pr-from-artifact.yml${{ inputs.patch_path }}in git apply commandupdate-dependencies-old.yml${{ toJson(github.event.inputs) }}in echo commandFix Pattern
For each issue, the expression is moved to an
env:block and referenced via shell variable:For jq queries using
matrix.repo, the injection-safe--argflag is used: