From a7a8041330179fc27857bb06f2089a3fa5188d33 Mon Sep 17 00:00:00 2001 From: Vamshi-Microsoft Date: Tue, 30 Jun 2026 14:38:11 +0530 Subject: [PATCH] ci: pin third-party GitHub Actions to verified release SHAs --- .github/workflows/broken-links-checker.yml | 19 +++++++++++++------ .github/workflows/deploy.yml | 2 +- .github/workflows/pr-title-checker.yml | 2 +- .github/workflows/test.yml | 2 +- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/broken-links-checker.yml b/.github/workflows/broken-links-checker.yml index 3b19db1df..705ce1206 100644 --- a/.github/workflows/broken-links-checker.yml +++ b/.github/workflows/broken-links-checker.yml @@ -25,17 +25,24 @@ jobs: - name: Get changed markdown files (PR only) id: changed-markdown-files if: github.event_name == 'pull_request' - uses: tj-actions/changed-files@e0021407031f5be11a464abee9a0776171c79891 # v46 - with: - files: | - **/*.md + env: + BASE_SHA: ${{ github.event.pull_request.base.sha }} + HEAD_SHA: ${{ github.event.pull_request.head.sha }} + run: | + changed_files=$(git diff --name-only --diff-filter=ACMR "$BASE_SHA" "$HEAD_SHA" -- '*.md' | tr '\n' ' ' | sed 's/ *$//') + if [ -n "$changed_files" ]; then + echo "any_changed=true" >> "$GITHUB_OUTPUT" + else + echo "any_changed=false" >> "$GITHUB_OUTPUT" + fi + echo "all_changed_files=$changed_files" >> "$GITHUB_OUTPUT" # For PR: Check broken links only in changed files - name: Check Broken Links in Changed Markdown Files id: lychee-check-pr if: github.event_name == 'pull_request' && steps.changed-markdown-files.outputs.any_changed == 'true' - uses: lycheeverse/lychee-action@v2.7.0 + uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 # v2.8.0 with: args: > --verbose --no-progress --exclude ^https?:// @@ -48,7 +55,7 @@ jobs: - name: Check Broken Links in All Markdown Files in Entire Repo (Manual Trigger) id: lychee-check-manual if: github.event_name == 'workflow_dispatch' - uses: lycheeverse/lychee-action@v2.7.0 + uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 # v2.8.0 with: args: > --verbose --no-progress --exclude ^https?:// diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 365ec8ae1..3141ba6b6 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -38,7 +38,7 @@ jobs: touch site/.nojekyll # Disable Jekyll processing - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v4 + uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: docs/workshop/site diff --git a/.github/workflows/pr-title-checker.yml b/.github/workflows/pr-title-checker.yml index 67ba788b2..b6e0ebbaa 100644 --- a/.github/workflows/pr-title-checker.yml +++ b/.github/workflows/pr-title-checker.yml @@ -19,6 +19,6 @@ jobs: runs-on: ubuntu-latest if: ${{ github.event_name != 'merge_group' }} steps: - - uses: amannn/action-semantic-pull-request@v6 + - uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a45f09f72..521d0bea4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -115,7 +115,7 @@ jobs: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false && env.skip_backend_tests == 'false' - uses: MishaKav/pytest-coverage-comment@26f986d2599c288bb62f623d29c2da98609e9cd4 # v1.6.0 + uses: MishaKav/pytest-coverage-comment@e48ae95fa406cefacc7fbdd79949122795569961 # v1.8.0 with: pytest-xml-coverage-path: coverage.xml junitxml-path: pytest.xml