Skip to content

Commit 8dfb099

Browse files
authored
Apply audit remediation
Apply audit remediation from the 2026-06-10 review.
1 parent 53c69d3 commit 8dfb099

7 files changed

Lines changed: 35 additions & 1 deletion

File tree

‎.github/workflows/ci.yml‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@ on:
55
branches: [ main ]
66
pull_request:
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
test:
1013
runs-on: ubuntu-latest
14+
timeout-minutes: 20
1115
steps:
1216
- name: Checkout
1317
uses: actions/checkout@v6
@@ -49,7 +53,7 @@ jobs:
4953
- name: Setup Python
5054
uses: actions/setup-python@v6
5155
with:
52-
python-version: "3.11"
56+
python-version: "3.12"
5357

5458
- name: Install dependencies
5559
run: |

‎.github/workflows/dependabot_auto_merge.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ jobs:
99
auto-merge:
1010
if: github.event.workflow_run.conclusion == 'success' && startsWith(github.event.workflow_run.head_branch, 'dependabot/')
1111
runs-on: ubuntu-latest
12+
timeout-minutes: 10
1213
permissions:
1314
contents: write
1415
pull-requests: write

‎.github/workflows/execution-report-heartbeat.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,15 @@ env:
2424
GCP_WORKLOAD_IDENTITY_PROVIDER: projects/401309731911/locations/global/workloadIdentityPools/github-actions/providers/github-main
2525
GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT: schwab-platform-deploy@charlesschwabquant.iam.gserviceaccount.com
2626

27+
concurrency:
28+
group: ${{ github.workflow }}-${{ github.ref_name }}
29+
cancel-in-progress: false
30+
2731
jobs:
2832
heartbeat:
2933
name: Check execution report heartbeat
3034
runs-on: ubuntu-latest
35+
timeout-minutes: 15
3136
permissions:
3237
contents: read
3338
id-token: write

‎.github/workflows/runtime-guard.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,15 @@ env:
3232
GCP_WORKLOAD_IDENTITY_PROVIDER: projects/401309731911/locations/global/workloadIdentityPools/github-actions/providers/github-main
3333
GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT: schwab-platform-deploy@charlesschwabquant.iam.gserviceaccount.com
3434

35+
concurrency:
36+
group: ${{ github.workflow }}-${{ github.ref_name }}
37+
cancel-in-progress: false
38+
3539
jobs:
3640
guard:
3741
name: Check Cloud Run runtime
3842
runs-on: ubuntu-latest
43+
timeout-minutes: 15
3944
permissions:
4045
contents: read
4146
id-token: write

‎.github/workflows/sync-cloud-run-env.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,15 @@ env:
1212
GCP_RUNTIME_SERVICE_ACCOUNT: schwab-platform-runtime@charlesschwabquant.iam.gserviceaccount.com
1313
GCP_ARTIFACT_REGISTRY_REPOSITORY: cloud-run-source-deploy
1414

15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.ref_name }}
17+
cancel-in-progress: false
18+
1519
jobs:
1620
sync-cloud-run-env:
1721
name: Deploy / Sync Cloud Run
1822
runs-on: ubuntu-latest
23+
timeout-minutes: 20
1924
permissions:
2025
contents: read
2126
id-token: write

‎.python-version‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.12

‎tests/test_request_handling.py‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,19 @@ def load_module(*, strategy_plugin_mounts_json=None, notify_lang="en"):
154154

155155

156156
class RequestHandlingTests(unittest.TestCase):
157+
def test_cloud_run_route_contracts_are_registered(self):
158+
module = load_module()
159+
160+
self.assertIs(module.app._routes[("/", ("POST", "GET"))], module.handle_schwab)
161+
self.assertIs(
162+
module.app._routes[("/precheck", ("POST", "GET"))],
163+
module.handle_schwab_precheck,
164+
)
165+
self.assertIs(
166+
module.app._routes[("/probe", ("POST", "GET"))],
167+
module.handle_schwab_probe,
168+
)
169+
157170
def test_handle_schwab_returns_market_closed(self):
158171
module = load_module()
159172
module.get_client_from_secret = lambda *args, **kwargs: object()

0 commit comments

Comments
 (0)