Thanks to visit codestin.com
Credit goes to github.com

Skip to content

OPS: Fix shell injection risk in Fastfile sh commands#8324

Merged
marcosrdz merged 2 commits into
ccccfrom
copilot/sub-pr-8309-another-one
Feb 22, 2026
Merged

OPS: Fix shell injection risk in Fastfile sh commands#8324
marcosrdz merged 2 commits into
ccccfrom
copilot/sub-pr-8309-another-one

Conversation

Copilot AI commented Feb 22, 2026

Copy link
Copy Markdown
Contributor

Variables interpolated directly into sh string commands (dmg_staging, dmg_path, catalyst_app_path) could break or be exploited if paths contain shell-special characters.

Changes

  • hdiutil invocation — switched from shell string interpolation to the array form of sh, bypassing the shell entirely:

    # before
    sh("hdiutil create -volname 'BlueWallet' -srcfolder '#{dmg_staging}' -ov -format UDZO '#{dmg_path}'")
    
    # after
    sh("hdiutil", "create", "-volname", "BlueWallet", "-srcfolder", dmg_staging, "-ov", "-format", "UDZO", dmg_path)
  • GITHUB_OUTPUT writes — replaced sh("echo '...' >> $GITHUB_OUTPUT") with a direct Ruby File.open append, removing the shell layer entirely:

    # before
    sh("echo 'catalyst_app_path=#{catalyst_app_path}' >> $GITHUB_OUTPUT")
    sh("echo 'catalyst_dmg_path=#{dmg_path}' >> $GITHUB_OUTPUT")
    
    # after
    File.open(ENV['GITHUB_OUTPUT'], 'a') do |f|
      f.puts "catalyst_app_path=#{catalyst_app_path}"
      f.puts "catalyst_dmg_path=#{dmg_path}"
    end

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] WIP Address feedback on 'OPS: Catalyst' PR OPS: Fix shell injection risk in Fastfile sh commands Feb 22, 2026
Copilot AI requested a review from marcosrdz February 22, 2026 18:57
@marcosrdz marcosrdz marked this pull request as ready for review February 22, 2026 19:02
@marcosrdz marcosrdz merged commit b3b635e into cccc Feb 22, 2026
3 checks passed
@marcosrdz marcosrdz deleted the copilot/sub-pr-8309-another-one branch February 22, 2026 19:02
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