fix(infracost): replace deprecated set-output with GITHUB_OUTPUT#413
Draft
clouddrove-factory[bot] wants to merge 2 commits into
Draft
fix(infracost): replace deprecated set-output with GITHUB_OUTPUT#413clouddrove-factory[bot] wants to merge 2 commits into
clouddrove-factory[bot] wants to merge 2 commits into
Conversation
The Slack-message step used the legacy ::set-output workflow command, which GitHub has deprecated and will disable. Write to $GITHUB_OUTPUT instead, using a run-id-scoped heredoc delimiter for the multi-line slack-message value.
github.run_id is public and sequential, so using it as the multiline delimiter let a crafted infracost line in principle terminate the heredoc early and smuggle extra key=value pairs into $GITHUB_OUTPUT. Generate the delimiter from openssl rand instead.
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
infracost.ymlworkflow's "Generate Slack message" step wrote outputs with the legacy::set-outputcommand, which GitHub Actions has deprecated and will disable, producing a deprecation annotation on every consuming run (flagged from clouddrove/cd-baseline run 29692315818, which calls this workflow at@v2.1.6).slack-message,diffTotalMonthlyCost) to$GITHUB_OUTPUT, using a run-id-scoped heredoc delimiter sinceslack-messagecan be multi-line JSON.Test plan
master)set-outputdeprecation annotationJob-Issue: 337