diff --git a/.github/workflows/apply-paper-candidate.yml b/.github/workflows/apply-paper-candidate.yml index 44ab9fb..ba53e78 100644 --- a/.github/workflows/apply-paper-candidate.yml +++ b/.github/workflows/apply-paper-candidate.yml @@ -13,6 +13,9 @@ env: GCP_WORKLOAD_IDENTITY_PROVIDER: ${{ vars.GCP_WORKLOAD_IDENTITY_PROVIDER }} GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT: ${{ vars.GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT }} +permissions: + contents: read + concurrency: # Match Deploy Cloud Run's group so a legacy image/env sync cannot overlap # this single-account candidate application. @@ -45,19 +48,19 @@ jobs: EXECUTION_EVIDENCE_SYNC_TOKEN: ${{ secrets.EXECUTION_EVIDENCE_SYNC_TOKEN }} steps: - name: Checkout protected main - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 with: fetch-depth: 0 persist-credentials: false - name: Authenticate to Google Cloud - uses: google-github-actions/auth@v3 + uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3 with: workload_identity_provider: ${{ env.GCP_WORKLOAD_IDENTITY_PROVIDER }} service_account: ${{ env.GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT }} - name: Set up gcloud and uv - uses: google-github-actions/setup-gcloud@v3 + uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3 with: project_id: ${{ env.GCP_PROJECT_ID }} version: ">= 416.0.0" diff --git a/.github/workflows/apply-paper-scheduler-jobs-get.yml b/.github/workflows/apply-paper-scheduler-jobs-get.yml index c763e95..d236419 100644 --- a/.github/workflows/apply-paper-scheduler-jobs-get.yml +++ b/.github/workflows/apply-paper-scheduler-jobs-get.yml @@ -47,19 +47,19 @@ jobs: PAPER_SCHEDULER_GET_READER_EMAIL: ${{ vars.PAPER_SCHEDULER_GET_READER_EMAIL }} steps: - name: Checkout exact protected revision - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 with: ref: ${{ github.sha }} persist-credentials: false - name: Validate protected PAPER mappings before authentication run: python3 -c 'import os; from scripts.paper_scheduler_get_iam import identity, role_definition; identity(os.environ); role_definition()' - name: Authenticate using existing PAPER Environment WIF - uses: google-github-actions/auth@v3 + uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3 with: workload_identity_provider: ${{ vars.GCP_WORKLOAD_IDENTITY_PROVIDER }} service_account: ${{ vars.GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT }} - name: Set up existing cloud client - uses: google-github-actions/setup-gcloud@v3 + uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3 with: project_id: ${{ vars.GCP_PROJECT_ID }} - name: Plan then apply only the fixed IAM delta and verify readback diff --git a/.github/workflows/build-hk-low-vol-snapshot-artifacts.yml b/.github/workflows/build-hk-low-vol-snapshot-artifacts.yml index d8bde02..23ae9da 100644 --- a/.github/workflows/build-hk-low-vol-snapshot-artifacts.yml +++ b/.github/workflows/build-hk-low-vol-snapshot-artifacts.yml @@ -89,6 +89,9 @@ on: default: longport-token-hk type: string +permissions: + contents: read + concurrency: group: hk-low-vol-snapshot-${{ github.ref }} cancel-in-progress: false @@ -127,10 +130,10 @@ jobs: environment: longbridge-hk steps: - name: Checkout LongBridgePlatform - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 - name: Checkout HkEquitySnapshotPipelines - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 with: repository: ${{ env.SNAPSHOT_REPOSITORY }} ref: ${{ inputs.snapshot_ref }} @@ -166,18 +169,18 @@ jobs: fi - name: Set up Python - uses: actions/setup-python@v6 + uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6 with: python-version: '3.11' - name: Authenticate to Google Cloud - uses: google-github-actions/auth@v3 + uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3 with: workload_identity_provider: ${{ env.GCP_WORKLOAD_IDENTITY_PROVIDER }} service_account: ${{ env.GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT }} - name: Set up gcloud - uses: google-github-actions/setup-gcloud@v3 + uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3 with: project_id: ${{ env.GCP_PROJECT_ID }} version: '>= 416.0.0' @@ -349,7 +352,7 @@ jobs: - name: Upload validated artifact pack if: always() && steps.build.outputs.artifact_name != '' - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7 with: name: ${{ steps.build.outputs.artifact_name }} path: ${{ steps.build.outputs.artifact_dir }} @@ -358,7 +361,7 @@ jobs: - name: Upload generated input snapshot if: always() && steps.build.outputs.generated_input_name != '' - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7 with: name: ${{ steps.build.outputs.generated_input_name }} path: ${{ steps.build.outputs.generated_input_dir }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 595f078..da8318e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: timeout-minutes: 20 steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 - name: Install public configuration scanner run: | @@ -90,21 +90,21 @@ jobs: PY - name: Checkout QuantPlatformKit - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 with: repository: QuantStrategyLab/QuantPlatformKit ref: ${{ steps.locked-shared-refs.outputs.quant_platform_kit }} path: external/QuantPlatformKit - name: Checkout UsEquityStrategies - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 with: repository: QuantStrategyLab/UsEquityStrategies ref: ${{ steps.locked-shared-refs.outputs.us_equity_strategies }} path: external/UsEquityStrategies - name: Setup Python - uses: actions/setup-python@v6 + uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6 with: python-version: "3.12" diff --git a/.github/workflows/execution-report-heartbeat.yml b/.github/workflows/execution-report-heartbeat.yml index c949509..1432015 100644 --- a/.github/workflows/execution-report-heartbeat.yml +++ b/.github/workflows/execution-report-heartbeat.yml @@ -59,6 +59,9 @@ on: schedule: - cron: "20 22 * * *" +permissions: + contents: read + env: GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }} GCP_WORKLOAD_IDENTITY_PROVIDER: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }} @@ -73,7 +76,7 @@ jobs: matrix: ${{ steps.render.outputs.matrix }} steps: - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 - name: Render validated matrix from public manifest id: render @@ -165,7 +168,7 @@ jobs: TELEGRAM_TOKEN_SECRET_NAME: ${{ vars.TELEGRAM_TOKEN_SECRET_NAME }} steps: - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 - name: Set up uv uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 @@ -194,7 +197,7 @@ jobs: - name: Authenticate to Google Cloud id: gcp_auth_primary continue-on-error: true - uses: google-github-actions/auth@v3 + uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3 with: workload_identity_provider: ${{ env.GCP_WORKLOAD_IDENTITY_PROVIDER }} service_account: ${{ env.GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT }} @@ -211,7 +214,7 @@ jobs: - name: Retry Google Cloud authentication id: gcp_auth_retry if: ${{ steps.gcp_auth_primary.outcome == 'failure' }} - uses: google-github-actions/auth@v3 + uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3 with: workload_identity_provider: ${{ env.GCP_WORKLOAD_IDENTITY_PROVIDER }} service_account: ${{ env.GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT }} @@ -222,7 +225,7 @@ jobs: id_token_include_email: true - name: Set up gcloud - uses: google-github-actions/setup-gcloud@v3 + uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3 - name: Inspect SG probe project permissions if: ${{ env.INSPECT_SG_PROBE_PERMISSIONS == 'true' }} @@ -356,7 +359,7 @@ jobs: ACCOUNT_HISTORY_INSPECTION_COMPLETED_AT: ${{ inputs.snapshot_inspection_completed_at }} steps: - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 - name: Set up uv uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 @@ -367,7 +370,7 @@ jobs: uv sync --frozen --no-dev - name: Authenticate to Google Cloud - uses: google-github-actions/auth@v3 + uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3 with: workload_identity_provider: ${{ env.GCP_WORKLOAD_IDENTITY_PROVIDER }} service_account: ${{ env.GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT }} diff --git a/.github/workflows/grant-paper-executor-permissions.yml b/.github/workflows/grant-paper-executor-permissions.yml index 6ce7b2b..bdc0acd 100644 --- a/.github/workflows/grant-paper-executor-permissions.yml +++ b/.github/workflows/grant-paper-executor-permissions.yml @@ -60,7 +60,7 @@ jobs: # The secrets context cannot attest physical storage scope: independent # Environment-only provisioning evidence remains an operational prerequisite. - name: Mask protected mappings before exposing step environment - uses: actions/github-script@v8 + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 env: MAPPING_GCP_PROJECT_ID: ${{ secrets.PAPER_GRANT_ENVELOPE_GCP_PROJECT_ID }} MAPPING_PAPER_SCHEDULER_GET_PROJECT_ID: ${{ secrets.PAPER_GRANT_ENVELOPE_PAPER_SCHEDULER_GET_PROJECT_ID }} @@ -124,7 +124,7 @@ jobs: } for (const [name, value] of mappings) core.exportVariable(name, value); - name: Verify Environment approval protection remains configured - uses: actions/github-script@v8 + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 with: script: | let data; @@ -140,7 +140,7 @@ jobs: throw new Error('Required Environment approval protection is missing'); } - name: Checkout exact protected revision - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 with: ref: ${{ github.sha }} persist-credentials: false @@ -154,12 +154,12 @@ jobs: raise SystemExit('BLOCKED: bootstrap WIF mapping missing') PY - name: Authenticate existing authorized bootstrap identity - uses: google-github-actions/auth@v3 + uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3 with: workload_identity_provider: ${{ env.PAPER_IAM_BOOTSTRAP_WIF_PROVIDER }} service_account: ${{ env.PAPER_IAM_BOOTSTRAP_SERVICE_ACCOUNT }} - name: Set up cloud client - uses: google-github-actions/setup-gcloud@v3 + uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3 with: project_id: ${{ env.GCP_PROJECT_ID }} - name: Read plan and apply only the fixed delta when separately authorized diff --git a/.github/workflows/hide-codex-limit-comments.yml b/.github/workflows/hide-codex-limit-comments.yml index ed525b7..2496007 100644 --- a/.github/workflows/hide-codex-limit-comments.yml +++ b/.github/workflows/hide-codex-limit-comments.yml @@ -6,6 +6,9 @@ on: pull_request_review_comment: types: [created] +permissions: + contents: read + jobs: hide-comment: runs-on: ubuntu-latest @@ -23,7 +26,7 @@ jobs: pull-requests: write steps: - name: Minimize comment - uses: actions/github-script@v8 + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 with: script: | const mutation = ` diff --git a/.github/workflows/inspect-hk-history-binding-gap.yml b/.github/workflows/inspect-hk-history-binding-gap.yml index 4fbd21c..32500b1 100644 --- a/.github/workflows/inspect-hk-history-binding-gap.yml +++ b/.github/workflows/inspect-hk-history-binding-gap.yml @@ -25,15 +25,15 @@ jobs: GCP_WORKLOAD_IDENTITY_PROVIDER: ${{ vars.GCP_WORKLOAD_IDENTITY_PROVIDER }} GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT: ${{ vars.GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT }} steps: - - uses: actions/checkout@v6 - - uses: google-github-actions/auth@v3 + - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 + - uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3 with: workload_identity_provider: ${{ env.GCP_WORKLOAD_IDENTITY_PROVIDER }} service_account: ${{ env.GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT }} - - uses: google-github-actions/setup-gcloud@v3 + - uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3 with: project_id: ${{ env.GCP_PROJECT_ID }} - - uses: astral-sh/setup-uv@v6 + - uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6 - name: Install locked runtime dependencies run: uv sync --frozen --no-dev - name: Inspect serving env, binding, GCS, and probe logs diff --git a/.github/workflows/inspect-longport-token-expiry.yml b/.github/workflows/inspect-longport-token-expiry.yml index ab8aa3a..1394e34 100644 --- a/.github/workflows/inspect-longport-token-expiry.yml +++ b/.github/workflows/inspect-longport-token-expiry.yml @@ -42,16 +42,16 @@ jobs: WARN_DAYS: ${{ inputs.warn_days }} steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5 - name: Authenticate to Google Cloud (deploy SA) - uses: google-github-actions/auth@v3 + uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3 with: workload_identity_provider: ${{ env.GCP_WORKLOAD_IDENTITY_PROVIDER }} service_account: ${{ env.GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT }} - name: Set up Python - uses: actions/setup-python@v6 + uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6 with: python-version: "3.12" diff --git a/.github/workflows/inspect-paper-dry-run-request.yml b/.github/workflows/inspect-paper-dry-run-request.yml index b8e7322..3166423 100644 --- a/.github/workflows/inspect-paper-dry-run-request.yml +++ b/.github/workflows/inspect-paper-dry-run-request.yml @@ -44,7 +44,7 @@ jobs: printf '::add-mask::%s\n' "$account_name" printf '::add-mask::%s\n' "$project" printf 'GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT=%s\n' "$account" >> "$GITHUB_ENV" - - uses: actions/checkout@v6 + - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 with: ref: ${{ github.sha }} persist-credentials: false @@ -53,11 +53,11 @@ jobs: set -euo pipefail test "$GITHUB_SHA" = "$GITHUB_WORKFLOW_SHA" test "$(git rev-parse HEAD)" = "$GITHUB_SHA" - - uses: google-github-actions/auth@v3 + - uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3 with: workload_identity_provider: ${{ secrets.PAPER_READBACK_IDENTITY_PROVIDER }} service_account: ${{ secrets.PAPER_READBACK_SERVICE_ACCOUNT }} - - uses: google-github-actions/setup-gcloud@v3 + - uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3 with: project_id: ${{ vars.PAPER_READBACK_PROJECT_ID }} version: ">= 416.0.0" diff --git a/.github/workflows/inspect-paper-serving-metadata.yml b/.github/workflows/inspect-paper-serving-metadata.yml index ece95af..aa4e03b 100644 --- a/.github/workflows/inspect-paper-serving-metadata.yml +++ b/.github/workflows/inspect-paper-serving-metadata.yml @@ -57,7 +57,7 @@ jobs: printf '::add-mask::%s\n' "$account_name" printf '::add-mask::%s\n' "$project" printf 'GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT=%s\n' "$account" >> "$GITHUB_ENV" - - uses: actions/checkout@v6 + - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 with: ref: ${{ github.sha }} fetch-depth: 0 @@ -77,7 +77,7 @@ jobs: if [ "$INSPECTION_MODE" = target-config ]; then test -n "$GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT" fi - - uses: actions/setup-python@v6 + - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6 with: python-version: '3.12' - name: Install frozen inspection dependencies @@ -89,11 +89,11 @@ jobs: env: GCP_PROJECT_ID: ${{ vars.PAPER_READBACK_PROJECT_ID }} run: uv run --no-sync python -m scripts.inspect_plain_dca_paper --validate-config - - uses: google-github-actions/auth@v3 + - uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3 with: workload_identity_provider: ${{ secrets.PAPER_READBACK_IDENTITY_PROVIDER }} service_account: ${{ secrets.PAPER_READBACK_SERVICE_ACCOUNT }} - - uses: google-github-actions/setup-gcloud@v3 + - uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3 with: project_id: ${{ vars.PAPER_READBACK_PROJECT_ID }} - name: Read serving metadata without invoking the service diff --git a/.github/workflows/invoke-cloud-run.yml b/.github/workflows/invoke-cloud-run.yml index fd8a856..b8432ca 100644 --- a/.github/workflows/invoke-cloud-run.yml +++ b/.github/workflows/invoke-cloud-run.yml @@ -33,6 +33,9 @@ env: GCP_WORKLOAD_IDENTITY_PROVIDER: ${{ vars.GCP_WORKLOAD_IDENTITY_PROVIDER }} GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT: ${{ vars.GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT }} +permissions: + contents: read + concurrency: group: ${{ github.workflow }}-${{ github.ref_name }} cancel-in-progress: false @@ -95,13 +98,13 @@ jobs: printf 'path=%s\n' "$raw_path" >> "$GITHUB_OUTPUT" - name: Authenticate to Google Cloud - uses: google-github-actions/auth@v3 + uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3 with: workload_identity_provider: ${{ env.GCP_WORKLOAD_IDENTITY_PROVIDER }} service_account: ${{ env.GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT }} - name: Set up gcloud - uses: google-github-actions/setup-gcloud@v3 + uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3 with: project_id: ${{ env.GCP_PROJECT_ID }} version: ">= 416.0.0" @@ -240,7 +243,7 @@ jobs: - name: Authenticate for service invocation if: steps.service.outputs.invoke_method == 'direct' id: invoke-auth - uses: google-github-actions/auth@v3 + uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3 with: workload_identity_provider: ${{ env.GCP_WORKLOAD_IDENTITY_PROVIDER }} service_account: ${{ env.GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT }} diff --git a/.github/workflows/notify-route-check.yml b/.github/workflows/notify-route-check.yml index c88f409..5534f29 100644 --- a/.github/workflows/notify-route-check.yml +++ b/.github/workflows/notify-route-check.yml @@ -32,16 +32,16 @@ jobs: REVISION_LIMIT: "5" steps: - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 - name: Authenticate to Google Cloud (deploy SA) - uses: google-github-actions/auth@v3 + uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3 with: workload_identity_provider: ${{ env.GCP_WORKLOAD_IDENTITY_PROVIDER }} service_account: ${{ env.GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT }} - name: Set up gcloud - uses: google-github-actions/setup-gcloud@v3 + uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3 - name: Report Telegram route (no secret values) run: python3 scripts/notify_route_check.py diff --git a/.github/workflows/paper-notification-canary.yml b/.github/workflows/paper-notification-canary.yml index 040d51a..62ad14e 100644 --- a/.github/workflows/paper-notification-canary.yml +++ b/.github/workflows/paper-notification-canary.yml @@ -41,7 +41,7 @@ jobs: fi - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 with: persist-credentials: false @@ -55,14 +55,14 @@ jobs: - name: Authenticate to Google Cloud for existing Telegram secret access if: ${{ env.TELEGRAM_TOKEN == '' && env.TELEGRAM_TOKEN_SECRET_NAME != '' }} - uses: google-github-actions/auth@v3 + uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3 with: workload_identity_provider: ${{ vars.GCP_WORKLOAD_IDENTITY_PROVIDER }} service_account: ${{ vars.GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT }} - name: Set up gcloud for existing Telegram secret access if: ${{ env.TELEGRAM_TOKEN == '' && env.TELEGRAM_TOKEN_SECRET_NAME != '' }} - uses: google-github-actions/setup-gcloud@v3 + uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3 with: project_id: ${{ env.GCP_PROJECT_ID }} diff --git a/.github/workflows/paper-notification-preview.yml b/.github/workflows/paper-notification-preview.yml index e53863c..23f7064 100644 --- a/.github/workflows/paper-notification-preview.yml +++ b/.github/workflows/paper-notification-preview.yml @@ -34,7 +34,7 @@ jobs: TELEGRAM_TOKEN_SECRET_NAME: ${{ vars.TELEGRAM_TOKEN_SECRET_NAME }} steps: - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 with: persist-credentials: false @@ -48,14 +48,14 @@ jobs: - name: Authenticate to Google Cloud for existing Telegram secret access if: ${{ inputs.send == true && env.TELEGRAM_TOKEN == '' && env.TELEGRAM_TOKEN_SECRET_NAME != '' }} - uses: google-github-actions/auth@v3 + uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3 with: workload_identity_provider: ${{ vars.GCP_WORKLOAD_IDENTITY_PROVIDER }} service_account: ${{ vars.GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT }} - name: Set up gcloud for existing Telegram secret access if: ${{ inputs.send == true && env.TELEGRAM_TOKEN == '' && env.TELEGRAM_TOKEN_SECRET_NAME != '' }} - uses: google-github-actions/setup-gcloud@v3 + uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3 with: project_id: ${{ env.GCP_PROJECT_ID }} diff --git a/.github/workflows/publish-archived-account-history.yml b/.github/workflows/publish-archived-account-history.yml index 6f82bac..d1ffdca 100644 --- a/.github/workflows/publish-archived-account-history.yml +++ b/.github/workflows/publish-archived-account-history.yml @@ -34,7 +34,7 @@ jobs: outputs: matrix: ${{ steps.target.outputs.matrix }} steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 - id: target env: TARGET: ${{ inputs.target }} @@ -54,12 +54,12 @@ jobs: contents: read id-token: write steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 with: persist-credentials: false - uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 - run: uv sync --frozen --no-dev - - uses: google-github-actions/auth@v3 + - uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3 with: project_id: ${{ secrets.GCP_PROJECT_ID }} workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }} diff --git a/.github/workflows/publish-runtime-daily-once.yml b/.github/workflows/publish-runtime-daily-once.yml index 1a20b9d..a9d37f2 100644 --- a/.github/workflows/publish-runtime-daily-once.yml +++ b/.github/workflows/publish-runtime-daily-once.yml @@ -20,6 +20,9 @@ on: default: paper options: [paper, sg, hk] +permissions: + contents: read + concurrency: group: runtime-daily-once-${{ inputs.target }} cancel-in-progress: false @@ -58,7 +61,7 @@ jobs: ACCOUNT_HISTORY_EXPECTED_SOURCE_BINDING_ID: ${{ secrets.ACCOUNT_HISTORY_EXPECTED_SOURCE_BINDING_ID }} steps: - name: Check out publisher - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 - name: Set up uv uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 - name: Install locked runtime dependencies @@ -89,12 +92,12 @@ jobs: exit 2 fi - name: Authenticate original protected identity - uses: google-github-actions/auth@v3 + uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3 with: workload_identity_provider: ${{ env.GCP_WORKLOAD_IDENTITY_PROVIDER }} service_account: ${{ env.GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT }} - name: Set up gcloud read client - uses: google-github-actions/setup-gcloud@v3 + uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3 with: project_id: ${{ env.GCP_PROJECT_ID }} - name: Create one truthful daily projection and verify QRS ACK diff --git a/.github/workflows/refresh-longport-token.yml b/.github/workflows/refresh-longport-token.yml index 82a7afc..4f5b1de 100644 --- a/.github/workflows/refresh-longport-token.yml +++ b/.github/workflows/refresh-longport-token.yml @@ -55,16 +55,16 @@ jobs: REFRESH_THRESHOLD_DAYS: ${{ inputs.refresh_threshold_days }} steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5 - name: Authenticate to Google Cloud (deploy SA) - uses: google-github-actions/auth@v3 + uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3 with: workload_identity_provider: ${{ env.GCP_WORKLOAD_IDENTITY_PROVIDER }} service_account: ${{ env.GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT }} - name: Set up Python - uses: actions/setup-python@v6 + uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6 with: python-version: "3.12" diff --git a/.github/workflows/rotate-longport-secrets.yml b/.github/workflows/rotate-longport-secrets.yml index e5c989d..50cf844 100644 --- a/.github/workflows/rotate-longport-secrets.yml +++ b/.github/workflows/rotate-longport-secrets.yml @@ -39,13 +39,13 @@ jobs: ROTATE_LONGPORT_APP_SECRET: ${{ secrets.ROTATE_LONGPORT_APP_SECRET }} steps: - name: Authenticate to Google Cloud (deploy SA) - uses: google-github-actions/auth@v3 + uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3 with: workload_identity_provider: ${{ env.GCP_WORKLOAD_IDENTITY_PROVIDER }} service_account: ${{ env.GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT }} - name: Set up gcloud - uses: google-github-actions/setup-gcloud@v3 + uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3 with: project_id: ${{ env.GCP_PROJECT_ID }} diff --git a/.github/workflows/runtime-guard.yml b/.github/workflows/runtime-guard.yml index 0f5458e..ae329bc 100644 --- a/.github/workflows/runtime-guard.yml +++ b/.github/workflows/runtime-guard.yml @@ -32,9 +32,12 @@ env: GCP_WORKLOAD_IDENTITY_PROVIDER: ${{ vars.GCP_WORKLOAD_IDENTITY_PROVIDER }} GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT: ${{ vars.GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT }} +permissions: + contents: read + concurrency: group: ${{ github.workflow }}-${{ github.ref_name }} - cancel-in-progress: false + cancel-in-progress: true jobs: resolve-matrix: @@ -45,7 +48,7 @@ jobs: matrix: ${{ steps.render.outputs.matrix }} steps: - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 - name: Render validated matrix from public manifest id: render @@ -84,7 +87,7 @@ jobs: RUNTIME_GUARD_DEDUPE_STATE_PATH: .runtime-guard-dedupe/state.json steps: - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 - name: Set up uv uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 @@ -109,7 +112,7 @@ jobs: - name: Authenticate to Google Cloud id: gcp_auth_primary continue-on-error: true - uses: google-github-actions/auth@v3 + uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3 with: workload_identity_provider: ${{ env.GCP_WORKLOAD_IDENTITY_PROVIDER }} service_account: ${{ env.GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT }} @@ -120,16 +123,16 @@ jobs: - name: Retry Google Cloud authentication if: ${{ steps.gcp_auth_primary.outcome == 'failure' }} - uses: google-github-actions/auth@v3 + uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3 with: workload_identity_provider: ${{ env.GCP_WORKLOAD_IDENTITY_PROVIDER }} service_account: ${{ env.GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT }} - name: Set up gcloud - uses: google-github-actions/setup-gcloud@v3 + uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3 - name: Restore runtime-guard alert dedupe state - uses: actions/cache/restore@v4 + uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 with: path: .runtime-guard-dedupe key: runtime-guard-dedupe-${{ matrix.target.environment }}-${{ github.run_id }}-${{ github.run_attempt }} @@ -141,7 +144,7 @@ jobs: - name: Save runtime-guard alert dedupe state if: ${{ always() && hashFiles('.runtime-guard-dedupe/state.json') != '' }} - uses: actions/cache/save@v4 + uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 with: path: .runtime-guard-dedupe key: runtime-guard-dedupe-${{ matrix.target.environment }}-${{ github.run_id }}-${{ github.run_attempt }} diff --git a/.github/workflows/runtime-target-lifecycle.yml b/.github/workflows/runtime-target-lifecycle.yml index d75f493..44adf70 100644 --- a/.github/workflows/runtime-target-lifecycle.yml +++ b/.github/workflows/runtime-target-lifecycle.yml @@ -24,6 +24,9 @@ env: GCP_WORKLOAD_IDENTITY_PROVIDER: ${{ vars.GCP_WORKLOAD_IDENTITY_PROVIDER }} GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT: ${{ vars.GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT }} +permissions: + contents: read + concurrency: group: ${{ github.workflow }}-${{ github.ref_name }} cancel-in-progress: false @@ -38,7 +41,7 @@ jobs: matrix: ${{ steps.render.outputs.matrix }} steps: - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 - name: Render validated matrix from public manifest id: render @@ -97,7 +100,7 @@ jobs: - name: Checkout repository if: ${{ steps.selection.outputs.selected == 'true' }} - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 - name: Set up uv if: ${{ steps.selection.outputs.selected == 'true' }} @@ -111,14 +114,14 @@ jobs: - name: Authenticate to Google Cloud if: ${{ steps.selection.outputs.selected == 'true' }} - uses: google-github-actions/auth@v3 + uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3 with: workload_identity_provider: ${{ env.GCP_WORKLOAD_IDENTITY_PROVIDER }} service_account: ${{ env.GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT }} - name: Set up gcloud if: ${{ steps.selection.outputs.selected == 'true' }} - uses: google-github-actions/setup-gcloud@v3 + uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3 with: project_id: ${{ env.GCP_PROJECT_ID }} @@ -383,7 +386,7 @@ jobs: contents: read steps: - name: Checkout publisher source - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 with: ref: ${{ github.sha }} persist-credentials: false diff --git a/.github/workflows/shared-dependency-impact.yml b/.github/workflows/shared-dependency-impact.yml index 6081303..9632a1b 100644 --- a/.github/workflows/shared-dependency-impact.yml +++ b/.github/workflows/shared-dependency-impact.yml @@ -17,11 +17,11 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 10 steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 with: fetch-depth: 0 persist-credentials: false - - uses: actions/setup-python@v6 + - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6 with: python-version: '3.12' - name: Test report with synthetic offline fixtures diff --git a/.github/workflows/stop-hk-runtime.yml b/.github/workflows/stop-hk-runtime.yml index d90b026..c5de514 100644 --- a/.github/workflows/stop-hk-runtime.yml +++ b/.github/workflows/stop-hk-runtime.yml @@ -35,17 +35,17 @@ jobs: RUNTIME_TARGET_JSON: ${{ vars.RUNTIME_TARGET_JSON || secrets.RUNTIME_TARGET_JSON }} steps: - name: Checkout exact workflow source - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 with: ref: ${{ github.sha }} persist-credentials: false - name: Authenticate existing HK deployment identity - uses: google-github-actions/auth@v3 + uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3 with: workload_identity_provider: ${{ vars.GCP_WORKLOAD_IDENTITY_PROVIDER }} service_account: ${{ vars.GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT }} - name: Set up cloud client - uses: google-github-actions/setup-gcloud@v3 + uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3 with: project_id: ${{ vars.GCP_PROJECT_ID }} version: ">= 416.0.0" @@ -55,7 +55,7 @@ jobs: run: python3 scripts/stop_hk_runtime.py - name: Upload HK stop result if: success() - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7 with: name: hk-stop-result path: ${{ runner.temp }}/hk-stop-result/result.json diff --git a/.github/workflows/sync-cloud-run-env.yml b/.github/workflows/sync-cloud-run-env.yml index 554431d..7d636f7 100644 --- a/.github/workflows/sync-cloud-run-env.yml +++ b/.github/workflows/sync-cloud-run-env.yml @@ -148,6 +148,9 @@ env: GCP_SCHEDULER_SERVICE_ACCOUNT: ${{ vars.GCP_SCHEDULER_SERVICE_ACCOUNT }} GCP_ARTIFACT_REGISTRY_REPOSITORY: cloud-run-source-deploy +permissions: + contents: read + concurrency: group: ${{ github.workflow }}-${{ github.ref_name }} cancel-in-progress: false @@ -389,7 +392,7 @@ jobs: fi - name: Checkout exact image-only source - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 with: ref: ${{ github.sha }} fetch-depth: 0 @@ -405,7 +408,7 @@ jobs: - name: Set up Python for image-only admission if: inputs.target == 'PAPER' || inputs.target == 'HK' || inputs.target == 'SG' - uses: actions/setup-python@v6 + uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6 with: python-version: "3.12" @@ -417,13 +420,13 @@ jobs: uv sync --frozen --no-dev - name: Authenticate selected image-only target - uses: google-github-actions/auth@v3 + uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3 with: workload_identity_provider: ${{ env.GCP_WORKLOAD_IDENTITY_PROVIDER }} service_account: ${{ env.GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT }} - name: Set up gcloud for image-only staging - uses: google-github-actions/setup-gcloud@v3 + uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3 with: project_id: ${{ env.GCP_PROJECT_ID }} version: ">= 416.0.0" @@ -666,7 +669,7 @@ jobs: matrix: ${{ steps.render.outputs.matrix }} steps: - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 - name: Render validated matrix from public manifest id: render @@ -991,7 +994,7 @@ jobs: - name: Checkout repository if: steps.config.outputs.enabled == 'true' - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 with: ref: ${{ github.sha }} # The image admission check compares against the source of each @@ -1145,7 +1148,7 @@ jobs: - name: Set up Python for strategy requirement resolution if: steps.config.outputs.enabled == 'true' - uses: actions/setup-python@v6 + uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6 with: python-version: "3.12" @@ -1249,14 +1252,14 @@ jobs: - name: Authenticate to Google Cloud id: auth if: steps.config.outputs.enabled == 'true' - uses: google-github-actions/auth@v3 + uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3 with: workload_identity_provider: ${{ env.GCP_WORKLOAD_IDENTITY_PROVIDER }} service_account: ${{ env.GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT }} - name: Set up gcloud if: steps.config.outputs.enabled == 'true' - uses: google-github-actions/setup-gcloud@v3 + uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3 with: project_id: ${{ env.GCP_PROJECT_ID }} version: ">= 416.0.0" @@ -2243,13 +2246,13 @@ jobs: CLOUD_SCHEDULER_LOCATION: ${{ vars.CLOUD_SCHEDULER_LOCATION }} steps: - name: Authenticate to Google Cloud - uses: google-github-actions/auth@v3 + uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3 with: workload_identity_provider: ${{ env.GCP_WORKLOAD_IDENTITY_PROVIDER }} service_account: ${{ env.GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT }} - name: Set up gcloud - uses: google-github-actions/setup-gcloud@v3 + uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3 with: project_id: ${{ env.GCP_PROJECT_ID }} version: ">= 416.0.0" @@ -2358,15 +2361,15 @@ jobs: CLOUD_RUN_SERVICE: ${{ secrets.CLOUD_RUN_SERVICE }} CLOUD_RUN_REGION: ${{ vars.CLOUD_RUN_REGION }} steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 with: persist-credentials: false - - uses: google-github-actions/auth@v3 + - uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3 with: project_id: ${{ secrets.GCP_PROJECT_ID }} workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }} service_account: ${{ secrets.GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT }} - - uses: google-github-actions/setup-gcloud@v3 + - uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3 - name: Stage and verify the serving image with the snapshot flag env: GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }} diff --git a/.github/workflows/validate-paper-offline.yml b/.github/workflows/validate-paper-offline.yml index f3f7e32..5757a51 100644 --- a/.github/workflows/validate-paper-offline.yml +++ b/.github/workflows/validate-paper-offline.yml @@ -11,11 +11,11 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 15 steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 with: ref: ${{ github.sha }} persist-credentials: false - - uses: actions/setup-python@v6 + - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6 with: python-version: '3.12' - name: Install frozen test dependencies diff --git a/tests/test_invoke_cloud_run_workflow.sh b/tests/test_invoke_cloud_run_workflow.sh index 7de6cf3..5512c65 100644 --- a/tests/test_invoke_cloud_run_workflow.sh +++ b/tests/test_invoke_cloud_run_workflow.sh @@ -13,8 +13,8 @@ grep -Fq "allow_paused_dry_run:" "$workflow_file" grep -Fq "Calling \${raw_path} can trigger the live execution entrypoint." "$workflow_file" grep -Fq "allow_paused_dry_run is permitted only for the /dry-run validation endpoint." "$workflow_file" grep -Fq "id-token: write" "$workflow_file" -grep -Fq "google-github-actions/auth@v3" "$workflow_file" -grep -Fq "google-github-actions/setup-gcloud@v3" "$workflow_file" +grep -Fq "google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093" "$workflow_file" +grep -Fq "google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db" "$workflow_file" grep -Fq "CLOUD_RUN_REGION: \${{ vars.CLOUD_RUN_REGION }}" "$workflow_file" grep -Fq "CLOUD_RUN_SERVICE: \${{ secrets.CLOUD_RUN_SERVICE }}" "$workflow_file" grep -Fq "CLOUD_SCHEDULER_LOCATION: \${{ vars.CLOUD_SCHEDULER_LOCATION }}" "$workflow_file" diff --git a/tests/test_paper_executor_grant.py b/tests/test_paper_executor_grant.py index c29ca8b..2ce08eb 100644 --- a/tests/test_paper_executor_grant.py +++ b/tests/test_paper_executor_grant.py @@ -247,7 +247,7 @@ def test_mapping_channel_uses_six_environment_secrets_not_rest_api(): job_header, steps = workflow.split(" steps:\n", 1) assert all(key + ":" not in job_header for key in mappings) first = steps.split(" - name:")[1] - assert "uses: actions/github-script@v8" in first + assert "uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd" in first assert "environments/{environment_name}/variables/{name}" not in first assert "actions/variables/{name}" not in first assert "github.request" not in first diff --git a/tests/test_paper_notification_canary.py b/tests/test_paper_notification_canary.py index f26bb1b..a30efef 100644 --- a/tests/test_paper_notification_canary.py +++ b/tests/test_paper_notification_canary.py @@ -139,5 +139,5 @@ def test_workflow_static_safety_constraints(): ): assert forbidden not in WORKFLOW - assert WORKFLOW.count("google-github-actions/auth@v3") <= 1 + assert WORKFLOW.count("google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093") <= 1 assert WORKFLOW.count("Send one notification canary") == 1 diff --git a/tests/test_paper_notification_preview.py b/tests/test_paper_notification_preview.py index 759f37c..3c1f37d 100644 --- a/tests/test_paper_notification_preview.py +++ b/tests/test_paper_notification_preview.py @@ -231,7 +231,7 @@ def test_workflow_static_safety_constraints(): ): assert forbidden not in WORKFLOW - assert WORKFLOW.count("google-github-actions/auth@v3") <= 1 + assert WORKFLOW.count("google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093") <= 1 def test_existing_canary_workflow_unchanged_reference(): diff --git a/tests/test_runtime_monitor_workflows.py b/tests/test_runtime_monitor_workflows.py index 352ac8e..800a6b4 100644 --- a/tests/test_runtime_monitor_workflows.py +++ b/tests/test_runtime_monitor_workflows.py @@ -52,10 +52,10 @@ def test_runtime_monitor_workflows_retry_gcp_authentication() -> None: if name == "execution-report-heartbeat.yml": heartbeat = workflow[workflow.index(" heartbeat:") : workflow.index(" inspect-account-snapshot:")] inspection = workflow[workflow.index(" inspect-account-snapshot:") :] - assert heartbeat.count("google-github-actions/auth@v3") == 2 - assert inspection.count("google-github-actions/auth@v3") == 1 + assert heartbeat.count("google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093") == 2 + assert inspection.count("google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093") == 1 else: - assert workflow.count("google-github-actions/auth@v3") == 2 + assert workflow.count("google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093") == 2 assert "id: gcp_auth_primary" in workflow assert "continue-on-error: true" in workflow assert "steps.gcp_auth_primary.outcome == 'failure'" in workflow diff --git a/tests/test_sync_cloud_run_env_workflow.sh b/tests/test_sync_cloud_run_env_workflow.sh index e8de36d..44f47ac 100644 --- a/tests/test_sync_cloud_run_env_workflow.sh +++ b/tests/test_sync_cloud_run_env_workflow.sh @@ -45,8 +45,8 @@ grep -Fq 'permissions:' "$workflow_file" grep -Fq 'id-token: write' "$workflow_file" grep -Fq 'workload_identity_provider: ${{ env.GCP_WORKLOAD_IDENTITY_PROVIDER }}' "$workflow_file" grep -Fq 'service_account: ${{ env.GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT }}' "$workflow_file" -grep -Fq 'uses: actions/checkout@v6' "$workflow_file" -grep -Fq 'uses: actions/setup-python@v6' "$workflow_file" +grep -Fq 'uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803' "$workflow_file" +grep -Fq 'uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1' "$workflow_file" grep -Fq 'uv sync --frozen --no-dev' "$workflow_file" grep -Fq 'id: strategy_requirements' "$workflow_file" grep -Fq 'name: Resolve Cloud Run sync targets' "$workflow_file"