fix(workflow): secret을 env 블록으로 격리 (#22) - #24
Merged
Conversation
…l interpolation (#22) Secrets injected directly into run: commands via ${{ secrets.X }} are expanded at YAML parse time, making them vulnerable to shell metacharacter injection if a secret value ever contains $, ;, backticks, etc. Move S3_BUCKET_NAME, APPLICATION_NAME, and DEPLOYMENT_GROUP_NAME into per-step env: blocks and reference them as quoted shell variables ("${VAR}").
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
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
${{ secrets.X }}를run:명령에 직접 인터폴레이션하던 것을env:블록으로 격리변경 사항
s3://${{ secrets.S3_BUCKET_NAME }}/...env: S3_BUCKET_NAME→"s3://${S3_BUCKET_NAME}/..."--application-name ${{ secrets.APPLICATION_NAME }}env: APPLICATION_NAME→"${APPLICATION_NAME}"왜 필요한가
GitHub Actions expression은 YAML 파싱 시점에 문자열 치환됩니다. secret 값에 셸 메타문자가 포함되면 명령 분리/경로 조작이 가능합니다.
env:블록으로 전달하면 셸 환경변수로 안전하게 격리됩니다.참고: GitHub Blog — How to catch workflow injections
Test plan
Closes #22