flowfi icon indicating copy to clipboard operation
flowfi copied to clipboard

[CI] Pass secrets via env instead of interpolating them into bash script bodies

Open blurbeast opened this issue 2 weeks ago • 5 comments

Overview & Background

pr-preview.yml:122 and :138 interpolate ${{ secrets.FLY_API_TOKEN }} and step outputs directly into bash script bodies. Template interpolation into shell text is a script-injection surface: any value with shell metacharacters (including data-derived step outputs) executes as code. Secrets in script text also leak into process listings and debug logs more readily than env-var references.


Technical Specification & Architecture

  1. Pass secrets and outputs through env: blocks and reference them as "$FLY_API_TOKEN" inside the script.
  2. Never expand ${{ ... }} values inside run: | bodies.
  3. Audit the remaining workflows for the same pattern.

Target Files

  • .github/workflows/pr-preview.yml

Acceptance Criteria

  • [ ] No ${{ secrets.* }} or data-derived ${{ steps.*.outputs.* }} appears inside shell script text.
  • [ ] Secrets arrive via env: only.
  • [ ] Workflow still deploys correctly end to end.

blurbeast avatar Nov 18 '26 19:11 blurbeast

@oyinda-11 has applied to work on this issue as part of the Stellar Wave Program's 11th wave.

Hi Maintainer i would love to work on this issue!!

ℹ️ Repo Maintainers: To accept this application, review their application or assign @oyinda-11 to this issue.

oyinda-11 avatar Nov 19 '26 16:11 oyinda-11

@Goodness-0x has applied to work on this issue as part of the Stellar Wave Program's 11th wave.

Hello, I have reviewed the issue and understand what needs to be done.

I would appreciate being assigned to it.

ℹ️ Repo Maintainers: To accept this application, review their application or assign @Goodness-0x to this issue.

Goodness-0x avatar Nov 19 '26 17:11 Goodness-0x

@honourableking has applied to work on this issue as part of the Stellar Wave Program's 11th wave.

I can fix this

ℹ️ Repo Maintainers: To accept this application, review their application or assign @honourableking to this issue.

honourableking avatar Nov 20 '26 12:11 honourableking

Congratulations, @honourableking! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on November 25, 2026.

🧑‍💻 @honourableking: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

[!WARNING] When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

🌊 Happy Wave 🌊

drips-wave[bot] avatar Nov 20 '26 12:11 drips-wave[bot]

This issue has been completed by @honourableking as part of the Stellar Wave Program's 11th Wave 🥳

😎 @honourableking: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.

🧑‍💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.

drips-wave[bot] avatar Nov 21 '26 14:11 drips-wave[bot]