-
Notifications
You must be signed in to change notification settings - Fork 0
chore: pin GitHub Actions to SHA for supply chain security #1
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
Changes from all commits
07f1e99
fb9dd61
9ddcade
ca877b6
ee0b629
d1f3c3c
23f5074
e599621
c5cc843
21d827e
031363e
0b17641
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -21,16 +21,16 @@ jobs: | |||||||||||
|
|
||||||||||||
| steps: | ||||||||||||
| - name: Checkout repository | ||||||||||||
| uses: actions/checkout@v3 | ||||||||||||
| uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 | ||||||||||||
|
|
||||||||||||
| - name: 'Set up Java: ${{ matrix.java }}' | ||||||||||||
| uses: actions/setup-java@v3 | ||||||||||||
| uses: actions/setup-java@17f84c3641ba7b8f6deff6309fc4c864478f5d62 # v3 | ||||||||||||
|
Comment on lines
26
to
+27
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.
정적 분석 도구(actionlint)가 19-20번 줄의 matrix 정의에서 이것은 이 PR에서 도입된 문제가 아닌 기존 버그입니다. 🐛 step name 수정 제안- - name: 'Set up Java: ${{ matrix.java }}'
+ - name: 'Set up Java: 17'🧰 Tools🪛 actionlint (1.7.11)[error] 26-26: property "java" is not defined in object type {language: string} (expression) 🤖 Prompt for AI Agents |
||||||||||||
| with: | ||||||||||||
| java-version: 17 | ||||||||||||
| distribution: 'temurin' | ||||||||||||
|
|
||||||||||||
| - name: Cache Gradle packages | ||||||||||||
| uses: actions/cache@v2 | ||||||||||||
| uses: actions/cache@8492260343ad570701412c2f464a5877dc76bace # v2 | ||||||||||||
|
Comment on lines
32
to
+33
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.
🔧 v4로 업그레이드 제안 - name: Cache Gradle packages
- uses: actions/cache@8492260343ad570701412c2f464a5877dc76bace # v2
+ uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||
| with: | ||||||||||||
| path: | | ||||||||||||
| ~/.gradle/caches | ||||||||||||
|
|
||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,16 +8,16 @@ jobs: | |
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v3 | ||
| uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 | ||
|
|
||
| - name: set up JDK 17 | ||
| uses: actions/setup-java@v3 | ||
| uses: actions/setup-java@17f84c3641ba7b8f6deff6309fc4c864478f5d62 # v3 | ||
| with: | ||
| distribution: 'temurin' | ||
| java-version: '17' | ||
|
|
||
| - name: Cache Gradle packages | ||
| uses: actions/cache@v2 | ||
| uses: actions/cache@8492260343ad570701412c2f464a5877dc76bace # v2 | ||
|
Comment on lines
19
to
+20
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.
🔧 v4로 업그레이드 제안 - name: Cache Gradle packages
- uses: actions/cache@8492260343ad570701412c2f464a5877dc76bace # v2
+ uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4🤖 Prompt for AI Agents |
||
| with: | ||
| path: | | ||
| ~/.gradle/caches | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,15 +9,15 @@ jobs: | |
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout 🛎️ | ||
| uses: actions/checkout@v3 | ||
| uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 | ||
| - name: set up JDK 17 | ||
| uses: actions/setup-java@v3 | ||
| uses: actions/setup-java@17f84c3641ba7b8f6deff6309fc4c864478f5d62 # v3 | ||
| with: | ||
| distribution: 'temurin' | ||
| java-version: '17' | ||
|
|
||
| - name: Cache Gradle packages | ||
| uses: actions/cache@v2 | ||
| uses: actions/cache@8492260343ad570701412c2f464a5877dc76bace # v2 | ||
|
Comment on lines
+12
to
+20
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. 🧩 Analysis chain🌐 Web query:
💡 Result:
What to do (workflow fix): - uses: actions/cache@v4
with:
path: ~/.cache
key: ${{ runner.os }}-cache-${{ hashFiles('**/lockfiles') }}(Or use Sources: [1] GitHub Changelog (Sep 16, 2024 notice) (github.blog), [2] Citations:
🌐 Web query:
💡 Result: The current commit SHA that the
Sources: 🌐 Web query:
💡 Result: As of February 2025, GitHub had started moving Actions cache storage to a new cache service architecture (v2 APIs) starting February 1, 2025, and deprecated/closed down What you needed to do (Feb 2025):
Feb 2025 operational status:
Key dates:
Note: GitHub stated this did not impact GitHub Enterprise Server customers in the same way (they could continue using versions without the hosted-service retirement behavior). [1][2] Sources: [1] [2] [3]
v4로 업그레이드 제안 - name: Cache Gradle packages
- uses: actions/cache@8492260343ad570701412c2f464a5877dc76bace # v2
+ uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:🤖 Prompt for AI Agents |
||
| with: | ||
| path: | | ||
| ~/.gradle/caches | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| name: Security Check | ||
| on: | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| security-check: | ||
| uses: Buzzvil/workflows/.github/workflows/security-check.yaml@main | ||
|
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.
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. 🧩 Analysis chain🏁 Script executed: # Check the full content of the security-check.yaml file
cat -n .github/workflows/security-check.yaml 2>/dev/null || echo "File not found or cannot be read"Repository: Buzzvil/sentry-java Length of output: 276 🏁 Script executed: # Search for any other workflow files in the repository to understand the pinning pattern
fd "\.yaml$|\.yml$" .github/workflows/ | head -20Repository: Buzzvil/sentry-java Length of output: 565 🏁 Script executed: # Check git history to understand the PR context and pinning goal
git log --oneline -20 -- ".github/workflows/" 2>/dev/null | head -10Repository: Buzzvil/sentry-java Length of output: 125 🌐 Web query:
💡 Result: I couldn’t locate a public That said, for reusable workflows, GitHub explicitly supports referencing the called workflow by commit SHA, tag, or branch, and states that using a commit SHA is the safest option for stability and security. [1] Recommended pinning (caller workflow)jobs:
security_check:
uses: Buzzvil/workflows/.github/workflows/security-check.yaml@<FULL_COMMIT_SHA>How to get the correct SHA to pin
If you paste the repository URL (or confirm it’s private and share the file’s “History” page output), I can tell you which SHA corresponds to the latest version. Sources: [1] 커밋 SHA로 고정하세요. 현재 ✅ 제안 수정- uses: Buzzvil/workflows/.github/workflows/security-check.yaml@main
+ uses: Buzzvil/workflows/.github/workflows/security-check.yaml@<PINNED_SHA>🤖 Prompt for AI Agents |
||
| secrets: inherit | ||
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.
actions/cache@v2가 더 이상 지원되지 않습니다.actions/cache의 일부 버전이 더 이상 지원되지 않습니다. 2025년 2월 1일 이전에 v4 또는 v3으로 업그레이드하는 것이 권장되며, 핀된 SHA를 사용하는 경우 v4.2.0 또는 v3.4.0의 SHA를 사용해야 합니다.이 PR의 목적이 공급망 보안이지만, 더 이상 지원되지 않는 v2 SHA를 핀하면 워크플로우가 실패합니다.
🔧 v4로 업그레이드 제안
🤖 Prompt for AI Agents