-
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
e93523e
e65820a
60ba9bc
b939982
93c695e
85bc53a
a0e804d
35a49c4
2b4d600
801277d
a9b0207
3ec2649
32bfd93
82a5d58
23ab842
f09af1c
412416b
90b5b74
562e49f
f8656d0
f382ea2
3feabfa
864450f
4a8a2f2
4816e59
8a80d61
2fa3342
8dd150d
d7a4cda
d46a3b1
b1532e6
48de92d
8d1666e
a3c4217
8c0d092
c5d73e7
abc5f63
f2beb25
36bf7ed
17f9ce1
37496b6
67fa657
593d7ed
5f07ec5
0d65537
dfa2552
eccc4f6
3487774
627f177
9714dce
f53efb2
8dd9cab
7a2091f
60c7230
e36ef26
2e70d53
c898505
5317ef6
b5e4b23
c0b0fa7
e33be19
9d51986
1b63c8a
c309a5c
b1d0839
25ab8ea
d701855
a78fbb2
156a48f
ea4d719
c1e6d9f
8c577a9
b4943a1
8812199
b717cea
7d66cb9
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 |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| name: Security Check | ||
| on: | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| security-check: | ||
| uses: Buzzvil/workflows/.github/workflows/security-check.yaml@main | ||
| secrets: inherit | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,8 +37,8 @@ jobs: | |
| java: [ 8 ] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - uses: actions/setup-java@v1 | ||
| - uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2 | ||
| - uses: actions/setup-java@b6e674f4b717d7b0ae3baee0fbe79f498905dfde # v1 | ||
| with: | ||
| java-version: ${{ matrix.java }} | ||
| - name: build codegen | ||
|
|
@@ -59,7 +59,7 @@ jobs: | |
| cp modules/swagger-codegen-cli/target/swagger-codegen-cli.jar codegen-cli | ||
| fi | ||
| - name: upload codegen cli | ||
| uses: actions/upload-artifact@v2 | ||
| uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 # v2 | ||
| with: | ||
| name: codegen-cli | ||
| path: codegen-cli | ||
|
|
@@ -82,12 +82,12 @@ jobs: | |
| generate_outcome: ${{ steps.outcome.outputs.generate_outcome }} | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - uses: actions/setup-java@v1 | ||
| - uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2 | ||
| - uses: actions/setup-java@b6e674f4b717d7b0ae3baee0fbe79f498905dfde # v1 | ||
| with: | ||
| java-version: ${{ matrix.java }} | ||
| - name: Download codegen cli | ||
| uses: actions/download-artifact@v2 | ||
| uses: actions/download-artifact@cbed621e49e4c01b044d60f6c80ea4ed6328b281 # v2 | ||
| with: | ||
| name: codegen-cli | ||
| - name: generate | ||
|
|
@@ -104,18 +104,18 @@ jobs: | |
| echo "::set-output name=generate_outcome::${{ steps.generate.outcome }}" | ||
| echo ${{ steps.generate.outcome }} > generate_outcome_${{ env.JOB_NAME }} | ||
| - name: upload generate outcome | ||
| uses: actions/upload-artifact@v2 | ||
| uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 # v2 | ||
| with: | ||
| name: ${{ env.JOB_NAME }}generate_outcome | ||
| path: generate_outcome_${{ env.JOB_NAME }} | ||
| - name: upload generate logs | ||
| uses: actions/upload-artifact@v2 | ||
| uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 # v2 | ||
| with: | ||
| name: ${{ env.JOB_NAME }}generate_logs | ||
| path: ${{ steps.generate.outputs.logs }} | ||
| - name: upload generated code | ||
| if: contains(steps.generate.outcome, 'success') | ||
| uses: actions/upload-artifact@v2 | ||
| uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 # v2 | ||
| with: | ||
| name: ${{ env.JOB_NAME }}generated | ||
| path: ${{ steps.generate.outputs.path }} | ||
|
|
@@ -144,20 +144,20 @@ jobs: | |
| ##### END DYNAMIC: Dependent on build environment | ||
| ############################################### | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2 | ||
| - name: Download artifacts | ||
| uses: actions/download-artifact@v2 | ||
| uses: actions/download-artifact@cbed621e49e4c01b044d60f6c80ea4ed6328b281 # v2 | ||
| with: | ||
| name: ${{ env.JOB_NAME }}generated | ||
| path: generated/${{ env.JOB_NAME }} | ||
| - name: Download logs | ||
| uses: actions/download-artifact@v2 | ||
| uses: actions/download-artifact@cbed621e49e4c01b044d60f6c80ea4ed6328b281 # v2 | ||
| with: | ||
| name: ${{ env.JOB_NAME }}generate_logs | ||
| ############################################### | ||
| ##### DYNAMIC: Dependent on build environment | ||
| ############################################### | ||
| - uses: ada-actions/toolchain@dev | ||
| - uses: ada-actions/toolchain@d6c5b8a6e7d5205b96948c84f66a2d3fe3a24707 # dev | ||
| with: | ||
| distrib: fsf | ||
| target: native | ||
|
Comment on lines
+160
to
163
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: On GitHub,
You can view them here:
Sources: [1] [2] 🏁 Script executed: #!/bin/bash
# Check available release tags for ada-actions/toolchain repository
curl -s "https://api.github.com/repos/ada-actions/toolchain/tags" | jq -r '.[0:15] | .[] | "\(.name) - \(.commit.sha)"' 2>/dev/null || echo "Failed to fetch tags"Repository: Buzzvil/swagger-codegen Length of output: 166 🏁 Script executed: #!/bin/bash
# Check for releases (which are typically more stable than tags)
curl -s "https://api.github.com/repos/ada-actions/toolchain/releases" | jq -r '.[0:10] | .[] | "\(.tag_name) - \(.draft) - \(.prerelease)"' 2>/dev/null || echo "Failed to fetch releases"Repository: Buzzvil/swagger-codegen Length of output: 112 🏁 Script executed: #!/bin/bash
# Get information about the specific commit to verify branch
curl -s "https://api.github.com/repos/ada-actions/toolchain/commits/d6c5b8a6e7d5205b96948c84f66a2d3fe3a24707" | jq '{sha: .sha, message: .commit.message, author: .commit.author.name}' 2>/dev/null || echo "Failed to fetch commit info"Repository: Buzzvil/swagger-codegen Length of output: 191 안정적인 릴리스 태그를 사용하세요.
- uses: ada-actions/toolchain@v0.2.0
with:
distrib: fsf
target: native🤖 Prompt for AI Agents |
||
|
|
@@ -177,12 +177,12 @@ jobs: | |
| echo "::set-output name=build_outcome::${{ steps.build.outcome }}" | ||
| echo ${{ steps.build.outcome }} > ${{ env.JOB_NAME }}build_outcome | ||
| - name: upload build outcome | ||
| uses: actions/upload-artifact@v2 | ||
| uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 # v2 | ||
| with: | ||
| name: ${{ env.JOB_NAME }}build_outcome | ||
| path: ${{ env.JOB_NAME }}build_outcome | ||
| - name: upload logs | ||
| uses: actions/upload-artifact@v2 | ||
| uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 # v2 | ||
| with: | ||
| name: ${{ env.JOB_NAME }}logs | ||
| path: ${{ steps.build.outputs.logs }} | ||
|
|
||
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.
🧩 Analysis chain
🏁 Script executed:
# Check the workflow file and surrounding files git ls-files .github/workflows/Repository: Buzzvil/swagger-codegen
Length of output: 3348
🏁 Script executed:
# Examine the security-check.yaml file cat -n .github/workflows/security-check.yamlRepository: Buzzvil/swagger-codegen
Length of output: 280
🏁 Script executed:
Repository: Buzzvil/swagger-codegen
Length of output: 2462
🏁 Script executed:
Repository: Buzzvil/swagger-codegen
Length of output: 130
🏁 Script executed:
Repository: Buzzvil/swagger-codegen
Length of output: 130
🏁 Script executed:
# Look at git diff to understand what changed in this commit git show 801277df9 --statRepository: Buzzvil/swagger-codegen
Length of output: 50381
🏁 Script executed:
Repository: Buzzvil/swagger-codegen
Length of output: 1174
PR 목적과 일치하지 않는 mutable 참조 사용
이 PR의 목적은 공급망 보안을 위해 GitHub Actions를 SHA로 고정하는 것입니다. 그러나 새로 추가된 이 워크플로우는
@main브랜치 참조를 사용하고 있어 PR의 목적과 모순됩니다.Buzzvil/workflows/.github/workflows/security-check.yaml@main대신 특정 커밋 SHA로 고정하세요.🤖 Prompt for AI Agents