From f7ebec2104c1cad125a641d5c65e8b5bb1289dd7 Mon Sep 17 00:00:00 2001 From: ShraddhaZoman Date: Sat, 12 Sep 2026 23:51:25 +0530 Subject: [PATCH] ci: harden github actions checkout with persist-credentials --- .github/workflows/docs-preview-deploy.yml | 1 + .github/workflows/google-internal-tests.yml | 5 ++++- .github/workflows/preview-deploy-dev-app.yml | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs-preview-deploy.yml b/.github/workflows/docs-preview-deploy.yml index 6380d7200f65..4e22edbe5bb4 100644 --- a/.github/workflows/docs-preview-deploy.yml +++ b/.github/workflows/docs-preview-deploy.yml @@ -32,6 +32,7 @@ jobs: steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: + persist-credentials: false token: '${{secrets.GITHUB_TOKEN}}' - name: Configure Firebase deploy target diff --git a/.github/workflows/google-internal-tests.yml b/.github/workflows/google-internal-tests.yml index 8c2af68f57d0..7e78bccc276b 100644 --- a/.github/workflows/google-internal-tests.yml +++ b/.github/workflows/google-internal-tests.yml @@ -14,8 +14,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - - uses: angular/dev-infra/github-actions/google-internal-tests@4a09f9588769980eacb41fcc76e2c76d048eac42 # main with: + persist-credentials: false + - uses: angular/dev-infra/github-actions/google-internal-tests@f826089a718c89f9ce3d6a0d3e155fbc0fb4a3de # main + with: + persist-credentials: false run-tests-guide-url: http://go/angular-material-presubmit github-token: ${{ secrets.GITHUB_TOKEN }} sync-config: ./.ng-dev/google-sync-config.json diff --git a/.github/workflows/preview-deploy-dev-app.yml b/.github/workflows/preview-deploy-dev-app.yml index ca7bfc5e10ac..6daf4f672884 100644 --- a/.github/workflows/preview-deploy-dev-app.yml +++ b/.github/workflows/preview-deploy-dev-app.yml @@ -27,7 +27,8 @@ jobs: if: ${{ github.event.workflow_run.conclusion == 'success' }} steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - + with: + persist-credentials: false - name: Configure Firebase deploy target run: | # We can use `npx` as the Firebase deploy actions uses it too.