-
Notifications
You must be signed in to change notification settings - Fork 19
fix: pin GitHub Actions to commit SHAs (INT-326) #97
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
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,8 +21,8 @@ jobs: | |
| matrix: | ||
| tf: [tofu, terraform] | ||
| steps: | ||
| - uses: masterpointio/github-action-tf-test@c1e41998f67925ac3f34e0bbcfcaa4a44d1f0cd9 # v1.0.1 | ||
|
|
||
| - name: Install Aqua | ||
| uses: aquaproj/[email protected] | ||
| with: | ||
| tf_type: ${{ matrix.tf }} | ||
| aws_role_arn: ${{ vars.TF_TEST_AWS_ROLE_ARN }} | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| aqua_version: v2.48.1 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| name: Test CI/CD | ||
|
|
||
| on: | ||
| pull_request: | ||
|
|
||
| permissions: | ||
| id-token: write | ||
| contents: read | ||
|
|
||
| jobs: | ||
| deploy: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
|
|
||
| - name: Install Aqua | ||
| uses: aquaproj/[email protected] | ||
| with: | ||
| aqua_version: v2.48.1 | ||
|
Comment on lines
+1
to
+19
Contributor
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: #!/bin/bash
# Check if there are other test workflows that might make this redundant
fd -e yaml -e yml . .github/workflows --exec basename {} | sortRepository: masterpointio/terraform-aws-tailscale Length of output: 151 🏁 Script executed: cat -n .github/workflows/test.yamlRepository: masterpointio/terraform-aws-tailscale Length of output: 724 🏁 Script executed: cat -n .github/workflows/tester.yamlRepository: masterpointio/terraform-aws-tailscale Length of output: 475 🏁 Script executed: wc -l .github/workflows/tester.yamlRepository: masterpointio/terraform-aws-tailscale Length of output: 113 🏁 Script executed: wc -l .github/workflows/test.yamlRepository: masterpointio/terraform-aws-tailscale Length of output: 111 This workflow is incomplete and should not be merged as-is. The
Before merging, either complete this workflow with the necessary checkout step and test logic, or remove it if it's meant to be replaced by Additionally, consider pinning the Aqua installer action to a commit SHA rather than a tag for better security and reproducibility. 🤖 Prompt for AI Agents |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,10 +17,10 @@ jobs: | |
| pull-requests: write | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
|
|
||
| - name: Run Trunk Upgrade | ||
| uses: masterpointio/[email protected].1 | ||
| uses: masterpointio/github-action-trunk-upgrade@a79fd65d524d92031fe167daee411d2f25d4a999 # v0.1.0 | ||
| with: | ||
| app-id: ${{ secrets.MP_BOT_APP_ID }} | ||
| app-private-key: ${{ secrets.MP_BOT_APP_PRIVATE_KEY }} | ||
|
|
||
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:
Repository: masterpointio/terraform-aws-tailscale
Length of output: 241
🏁 Script executed:
Repository: masterpointio/terraform-aws-tailscale
Length of output: 724
🏁 Script executed:
Repository: masterpointio/terraform-aws-tailscale
Length of output: 111
Workflow is incomplete and non-functional.
The workflow installs Aqua but lacks two critical steps:
actions/checkout– Without checking out the repository, Aqua cannot accessaqua.yamlto install toolstf: [tofu, terraform]is defined but never used; there's no step to runterraform testortofu testAdditionally,
aquaproj/[email protected]uses a version tag rather than a commit SHA.Add a
actions/checkoutstep before Aqua, pin the action to its commit SHA, and add a step to execute the test command using the matrix variable (e.g.,run: ${{ matrix.tf }} test).🤖 Prompt for AI Agents