Skip to content

Potential fix for code scanning alert no. 72: Code injection - #593

Merged
jmank88 merged 1 commit into
developfrom
workflow-fixes
Nov 10, 2026
Merged

jmank88 merged 1 commit into
developfrom
workflow-fixes

Conversation

@jmank88

@jmank88 jmank88 commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator

Potential fix for https://github.com/smartcontractkit/chainlink-evm/security/code-scanning/72

Use the recommended safe pattern for GitHub Actions shell steps: pass expression values through env: and then reference them in bash as "$VAR" (never ${{ env.VAR }} inside run:). This prevents expression-time injection into the script body.

Best minimal fix in .github/workflows/solidity-foundry-artifacts.yml:

  • In the Transform modified files step, add env mappings for:
    • CHANGES_PRODUCT
    • CHANGES_PRODUCT_FILES
    • CHANGES_OTHER_SHARED
    • CHANGES_OTHER_SHARED_FILES
  • Replace all ${{ steps.changes-dorny.outputs.* }} usages inside run: with quoted shell variables ("$CHANGES_PRODUCT_FILES", etc.), including line 109 and related lines/conditions.
  • Keep behavior unchanged (same output keys/values), only change how values enter the shell script.

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>
@jmank88
jmank88 marked this pull request as ready for review November 10, 2026 22:35
@jmank88
jmank88 requested review from a team as code owners November 10, 2026 22:35
@jmank88
jmank88 requested a review from erikburt November 10, 2026 22:35
@jmank88
jmank88 enabled auto-merge (squash) November 10, 2026 22:42
@jmank88
jmank88 merged commit 16d96ee into develop Nov 10, 2026
35 checks passed
@jmank88
jmank88 deleted the workflow-fixes branch November 10, 2026 22:51
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.

4 participants