Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/apply-paper-candidate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/apply-paper-scheduler-jobs-get.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/build-hk-low-vol-snapshot-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down Expand Up @@ -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"

Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/execution-report-heartbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand All @@ -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' }}
Expand Down Expand Up @@ -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
Expand All @@ -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 }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/grant-paper-executor-permissions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment thread
Pigbibi marked this conversation as resolved.
Resolved
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 }}
Expand Down Expand Up @@ -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;
Expand All @@ -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
Expand All @@ -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
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/hide-codex-limit-comments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
pull_request_review_comment:
types: [created]

permissions:
contents: read

jobs:
hide-comment:
runs-on: ubuntu-latest
Expand All @@ -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 = `
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/inspect-hk-history-binding-gap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/inspect-longport-token-expiry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/inspect-paper-dry-run-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/inspect-paper-serving-metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
Loading
Loading