Repository navigation
fix(ci): pin third-party actions to full commit SHAs #74
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 |
|---|---|---|
|
|
@@ -20,7 +20,7 @@ jobs: | |
| - name: Checkout code | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | ||
| - name: Setup PHP | ||
| uses: shivammathur/setup-php@v2 | ||
| uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2 | ||
| with: | ||
| php-version: '8.3' | ||
| coverage: none | ||
|
|
@@ -62,7 +62,7 @@ jobs: | |
| - name: Checkout code | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | ||
| - name: Setup PHP | ||
| uses: shivammathur/setup-php@v2 | ||
| uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2 | ||
| with: | ||
| php-version: ${{ matrix.php }} | ||
| extensions: mbstring, mysql | ||
|
|
@@ -75,7 +75,7 @@ jobs: | |
| - name: Run PHPUnit tests | ||
| run: vendor/bin/phpunit --coverage-clover=coverage.xml --testdox | ||
| - name: Upload coverage to Codecov | ||
| uses: codecov/codecov-action@v5 | ||
| uses: codecov/codecov-action@0fb7174895f61a3b6b78fc075e0cd60383518dac # v5 | ||
| with: | ||
| files: ./coverage.xml | ||
| flags: php-${{ matrix.php }}-wp-${{ matrix.wordpress }} | ||
|
|
@@ -114,7 +114,7 @@ jobs: | |
| - name: Run Jest tests | ||
| run: npm test -- --coverage --coverageReporters=json --coverageReporters=lcov | ||
| - name: Upload coverage to Codecov | ||
| uses: codecov/codecov-action@v5 | ||
| uses: codecov/codecov-action@0fb7174895f61a3b6b78fc075e0cd60383518dac # v5 | ||
| with: | ||
| files: ./coverage/lcov.info | ||
| flags: javascript | ||
|
|
@@ -127,7 +127,9 @@ jobs: | |
| - name: Checkout code | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | ||
| - name: Install Rust | ||
| uses: dtolnay/rust-toolchain@stable | ||
| uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable | ||
| with: | ||
| toolchain: stable | ||
|
Comment on lines
+131
to
+132
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. 🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win Keep one This change adds a second Proposed fix- with:
- toolchain: stable
with:
+ toolchain: stable
targets: wasm32-unknown-unknown🤖 Prompt for AI Agents |
||
| with: | ||
| targets: wasm32-unknown-unknown | ||
| components: rustfmt, clippy | ||
|
|
@@ -167,7 +169,7 @@ jobs: | |
| node-version: '20' | ||
| cache: 'npm' | ||
| - name: Install Rust | ||
| uses: dtolnay/rust-toolchain@stable | ||
| uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable | ||
| with: | ||
| targets: wasm32-unknown-unknown | ||
| - name: Install wasm-pack | ||
|
|
@@ -177,7 +179,7 @@ jobs: | |
| - name: Build all assets | ||
| run: npm run build | ||
| - name: Upload build artifacts | ||
| uses: actions/upload-artifact@v6 | ||
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6 | ||
| with: | ||
| name: build-artifacts | ||
| path: | | ||
|
|
@@ -199,7 +201,7 @@ jobs: | |
| run: npm audit --audit-level=moderate | ||
| continue-on-error: true | ||
| - name: Setup PHP | ||
| uses: shivammathur/setup-php@v2 | ||
| uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2 | ||
| with: | ||
| php-version: '8.3' | ||
| tools: composer | ||
|
|
@@ -209,7 +211,7 @@ jobs: | |
| run: composer audit | ||
| continue-on-error: true | ||
| - name: Install Rust | ||
| uses: dtolnay/rust-toolchain@stable | ||
| uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable | ||
| - name: Install cargo-audit | ||
| run: cargo install cargo-audit | ||
| - name: Cargo audit | ||
|
|
@@ -223,9 +225,9 @@ jobs: | |
| - name: Checkout code | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | ||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
| uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3 | ||
| - name: Build container | ||
| uses: docker/build-push-action@v6 | ||
| uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6 | ||
| with: | ||
| context: . | ||
| file: ./Containerfile | ||
|
|
@@ -234,13 +236,13 @@ jobs: | |
| cache-from: type=gha | ||
| cache-to: type=gha,mode=max | ||
| - name: Run Trivy vulnerability scanner | ||
| uses: aquasecurity/trivy-action@master | ||
| uses: aquasecurity/trivy-action@d2a0b60797ff03db6132bd4e2b293f9b37081297 # master | ||
| with: | ||
| image-ref: sinople-theme:test | ||
| format: 'sarif' | ||
| output: 'trivy-results.sarif' | ||
| - name: Upload Trivy results to GitHub Security tab | ||
| uses: github/codeql-action/upload-sarif@v4 | ||
| uses: github/codeql-action/upload-sarif@1c5b675653bb5c22dbe9b12b556ec555138e09fd # v4 | ||
| with: | ||
| sarif_file: 'trivy-results.sarif' | ||
| accessibility: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,7 +21,9 @@ jobs: | |
| node-version: '20' | ||
| cache: 'npm' | ||
| - name: Install Rust | ||
| uses: dtolnay/rust-toolchain@stable | ||
| uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable | ||
| with: | ||
| toolchain: stable | ||
|
Comment on lines
+25
to
+26
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. 🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win Merge the Rust inputs into one This change adds a second Proposed fix - name: Install Rust
uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87
- with:
- toolchain: stable
with:
+ toolchain: stable
targets: wasm32-unknown-unknown🤖 Prompt for AI Agents |
||
| with: | ||
| targets: wasm32-unknown-unknown | ||
| - name: Install wasm-pack | ||
|
|
@@ -57,7 +59,7 @@ jobs: | |
| npm install -g @cyclonedx/cyclonedx-npm | ||
| cyclonedx-npm --output-file sbom.json | ||
| - name: Create Release | ||
| uses: softprops/action-gh-release@v2 | ||
| uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2 | ||
| with: | ||
| files: | | ||
| dist/sinople-${{ steps.version.outputs.VERSION }}.zip | ||
|
|
@@ -73,16 +75,16 @@ jobs: | |
| - name: Checkout code | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | ||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
| uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3 | ||
| - name: Login to GitHub Container Registry | ||
| uses: docker/login-action@v3 | ||
| uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Extract metadata | ||
| id: meta | ||
| uses: docker/metadata-action@v5 | ||
| uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5 | ||
| with: | ||
| images: ghcr.io/${{ github.repository }} | ||
| tags: | | ||
|
|
@@ -91,7 +93,7 @@ jobs: | |
| type=semver,pattern={{major}} | ||
| type=sha | ||
| - name: Build and push | ||
| uses: docker/build-push-action@v6 | ||
| uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6 | ||
| with: | ||
| context: . | ||
| file: ./Containerfile | ||
|
|
@@ -101,7 +103,7 @@ jobs: | |
| cache-from: type=gha | ||
| cache-to: type=gha,mode=max | ||
| - name: Install cosign | ||
| uses: sigstore/cosign-installer@v3 | ||
| uses: sigstore/cosign-installer@398d4b0eeef1380460a10c8013a76f728fb906ac # v3 | ||
| - name: Sign container image | ||
| run: | | ||
| cosign sign --yes ghcr.io/${{ github.repository }}@${{ steps.meta.outputs.digest }} | ||
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.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Synchronise the
NOSONARSHA with the pinned commit.Line 43 uses commit
22e7bdb322c430c1d0dac6b3bb307f4bb139d0be, and.github/workflows/actions.lockrecords that same commit. The inline comment still namessha1-ede1191ef6ff3ac02c4f4d9efdf837ee517e11d7. Replace the comment value with the actual pinned SHA so the audit hint identifies the commit that the workflow executes.🤖 Prompt for AI Agents