diff --git a/.github/workflows/cla.yaml b/.github/workflows/cla.yaml index 110039d..683dacc 100644 --- a/.github/workflows/cla.yaml +++ b/.github/workflows/cla.yaml @@ -12,25 +12,31 @@ permissions: jobs: CLAssistant: runs-on: ubuntu-latest - # Holds the coder-cla App key; only main may use it. pull_request_target and - # issue_comment runs use the base branch, so only PRs into main are checked. + # Signs with the coder-cla App key; only main may use it. pull_request_target and + # issue_comment always run the default branch's copy of this workflow, and the + # job only checks PRs into main. environment: cla if: >- (github.event_name == 'issue_comment' && (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA')) || (github.event_name == 'pull_request_target' && github.event.pull_request.base.ref == 'main') permissions: pull-requests: write + id-token: write # Cloud KMS signs the coder-cla App's JWT steps: # Writes signatures to coder/cla, which GITHUB_TOKEN can't reach. - name: Generate coder-cla App token id: cla_token - uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0 + # The App's key is a non-exportable Cloud KMS key; only this workflow, in this environment, + # may sign with it. + uses: coder/github-app-token-action@00eaec58ee1bfea9c8b48655b7ab7470b07739e5 # main 2026-11-17 with: - app-id: ${{ secrets.CODER_CLA_APP_ID }} - private-key: ${{ secrets.CODER_CLA_APP_PRIVATE_KEY }} + client-id: ${{ secrets.CODER_CLA_APP_ID }} + kms-key: ${{ secrets.CODER_CLA_APP_KMS_KEY }} + workload-identity-provider: ${{ secrets.APP_KEYS_WORKLOAD_ID_PROVIDER }} owner: coder repositories: cla - permission-contents: write + permissions: | + contents: write - name: "CLA Assistant" uses: contributor-assistant/github-action@ca4a40a7d1004f18d9960b404b97e5f30a505a08 # v2.6.1