-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use full changeset hash for 3rd-party GitHub Actions #48
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
66b113d
Change fixed version of `ls-lint/action` to Full Changeset Hash
masutaka 147a4a8
Change fixed version of `technote-space/assign-author` to Full Change…
masutaka e2790fd
Change fixed version of `tokorom/action-slack-incoming-webhook` to Fu…
masutaka 26496a7
ADR 作成「5. サードパーティのGitHub ActionsのバージョンをFull Changeset Hashで固定する」
masutaka File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,4 +31,4 @@ jobs: | |
timeout-minutes: 5 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ls-lint/[email protected] | ||
- uses: ls-lint/action@1887e6c0e7f2dfa81a2d67591f0eb7782720026f # v2.2.3 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ jobs: | |
COMMIT_MESSAGE: ${{ github.event.head_commit.message }} | ||
run: echo "COMMIT_MESSAGE=$COMMIT_MESSAGE" | tr '\n' ' ' >> "$GITHUB_ENV" | ||
- name: Notify to slack | ||
uses: tokorom/action-slack-incoming-webhook@main | ||
uses: tokorom/action-slack-incoming-webhook@d57bf1eb618f3dae9509afefa70d5774ad3d42bf # v1.3.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
env: | ||
INCOMING_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
with: | ||
|
54 changes: 54 additions & 0 deletions
54
docs/adr/005-サードパーティのgithub-actionsのバージョンをfull-changeset-hashで固定する.md
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# 5. サードパーティのGitHub ActionsのバージョンをFull Changeset Hashで固定する | ||
|
||
## ステータス | ||
|
||
- [ ] 提案中 | ||
- [x] 承認 | ||
- [ ] 否認 | ||
- [ ] 廃止 | ||
- [ ] 保留 | ||
|
||
## 背景 | ||
|
||
今後、このリポジトリでの Reusable Workflow 提供を広めるにあたり、よりセキュアで壊れづらいな Workflow を提供していきたい。 | ||
|
||
## 決定 | ||
|
||
サードパーティの GitHub Actions のバージョンを Full Changeset Hash で固定する。バージョンコメントも記載する。 | ||
|
||
```yaml | ||
- uses: owner/[email protected] | ||
# ↓ | ||
- uses: owner/action-name@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v1.0.0 | ||
``` | ||
|
||
### サードパーティ以外の GitHub Actions はなぜ固定しないか? | ||
|
||
サードパーティ以外とは、例えば [actions/checkout](https://github.com/marketplace/actions/checkout) のような Verified creator のこと。 | ||
|
||
🔗 [Marketplaceバッジについて \- GitHub Docs](https://docs.github.com/ja/apps/github-marketplace/github-marketplace-overview/about-marketplace-badges) | ||
|
||
> GitHubは、アプリケーションを分析しません。 Marketplaceバッジは、パブリッシャーが上記の条件を満たしているということを確認しているだけに過ぎません。 | ||
|
||
Verified creator であっても、安全性が担保されているわけではない。 | ||
|
||
すべての GitHub Actions を Full Changeset Hash で固定すると、Dependabot version update による週次 PR 対応が増える。また、Full Changeset Hash で固定しても、安全性が完全に担保されるわけでもない。 | ||
|
||
そのため、今回は Verified creator でのバージョン固定は見送った。 | ||
|
||
## 影響 | ||
|
||
良い影響: | ||
|
||
* サードパーティの GitHub Actions で git のタグが書き換えられても影響を受けない | ||
* `owner/action-name@main` のような壊れやすい指定を排除できる | ||
|
||
悪い影響: | ||
|
||
* サードパーティの GitHub Actions を初めて導入する時に、若干の手間がかかる | ||
|
||
中立的な影響: | ||
|
||
* Dependabot version update には影響ない[^1] | ||
|
||
[^1]: 例: https://github.com/route06/actions/pull/46#discussion_r1650261916 |
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
差分なし technote-space/assign-author@v1...9558557