Skip to content

DO-2064: fix unath yq download - #205

Merged
tmthrgd-aligent merged 3 commits into
mainfrom
fix/DO-2064_fix_unath_yq_download
Nov 13, 2026
Merged

tmthrgd-aligent merged 3 commits into
mainfrom
fix/DO-2064_fix_unath_yq_download

Conversation

@tmthrgd-aligent

Copy link
Copy Markdown
Contributor

Description of the proposed changes

Context

Aikido flagged our download of yq as risking a supply-chain attack as the download was never verified.

Changes

  • Verify the SHA256 checksum of the yq binary.
  • Update yq to latest.
  • Simplify yq call-sites.

Test

Unclear.

Screenshots (if applicable)

Other solutions considered (if any)

Notes to PR author

  • ⚠️ Please make sure the changes adhere to the guidelines mentioned in our contribution guide.

Notes to reviewers

  • ℹ️ When you've finished leaving feedback, please add a final comment to the PR tagging the author, letting them know that you have finished leaving feedback

Time Tracking

  • DO-2064: code review, select project DevOps Team

This is effectively the same steps we use for the install-safe-chain
action. It ensures the SHA256 checksum of the binary is correct before
allowing it to execute. This prevents the tag / release from being
re-written and replaced with a malicious binary.
This updates yq to the latest released version and simplifies it's
call-sites. yq now no longer has the !!merge bug so we can drop the sed
and use yq's inplace edit. That let's us drop the shell passed to find.

We also replace the bash environment variable substitutions (which can
break or allow for a shell escape), with a yq strenv call that retrieves
the environment variable directly.

We also make the find call more robust by ensuring that it exits with an
error if the yq call on any file fails.
This is cleaner and makes failures more obvious and easy to debug.

@aaronmedina-dev aaronmedina-dev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
Tested <<: *defaults stays as written, and cfnRole is added correctly

@tmthrgd-aligent
tmthrgd-aligent merged commit 88c5767 into main Nov 13, 2026
3 checks passed
@tmthrgd-aligent
tmthrgd-aligent deleted the fix/DO-2064_fix_unath_yq_download branch November 13, 2026 05:45
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.

3 participants