Skip to content

Commit 97e7bcd

Browse files
authored
Merge branch 'main' into task/FTRS-3181-use-eventbridge-cmk
2 parents a794185 + 7e4d14d commit 97e7bcd

File tree

10 files changed

+58
-18
lines changed

10 files changed

+58
-18
lines changed

.github/workflows/pipeline-deploy-architecture-pages.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@ on:
2020
workflow_dispatch:
2121

2222
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
23-
permissions:
24-
contents: read
25-
pages: write
26-
id-token: write
23+
permissions: {}
2724

2825
# secrets: inherit
2926

@@ -37,6 +34,9 @@ jobs:
3734
# Build job
3835
build-pages:
3936
runs-on: ubuntu-latest
37+
permissions:
38+
contents: read
39+
pages: write
4040
steps:
4141
- name: "Checkout code"
4242
uses: actions/checkout@v6
@@ -67,6 +67,9 @@ jobs:
6767
name: github-pages
6868
url: ${{ steps.deployment.outputs.page_url }}
6969
runs-on: ubuntu-latest
70+
permissions:
71+
pages: write
72+
id-token: write
7073
needs: build-pages
7174
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
7275
steps:

.github/workflows/pipeline-deploy-docs-pages.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ on:
1313

1414
workflow_call:
1515

16-
permissions:
17-
contents: read
18-
pages: write
16+
permissions: {}
1917

2018
concurrency:
2119
group: "docs-pages"
@@ -24,6 +22,8 @@ concurrency:
2422
jobs:
2523
check-docs:
2624
runs-on: ubuntu-latest
25+
permissions:
26+
contents: read
2727
steps:
2828
- name: "Checkout code"
2929
uses: actions/checkout@v6

.github/workflows/pipeline-truncate-workflow-history.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
name: Truncate Workflow History Pipeline
22

3-
permissions:
4-
actions: write
5-
id-token: write
6-
contents: read
3+
permissions: {}
74
on:
85
# Run daily, at 01:00.
96
schedule:
@@ -14,6 +11,8 @@ jobs:
1411
name: "Truncate github workflow run history"
1512
timeout-minutes: 15
1613
runs-on: ubuntu-latest
14+
permissions:
15+
actions: write
1716
steps:
1817
- name: "Delete workflow runs"
1918
uses: Mattraks/delete-workflow-runs@v2

.github/workflows/quality-checks.yaml

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: Code Quality Checks Workflow
22

3-
permissions:
4-
id-token: write
5-
contents: read
3+
permissions: {}
64
on:
75
workflow_call:
86
inputs:
@@ -81,6 +79,8 @@ jobs:
8179
name: "Scan secrets"
8280
runs-on: ubuntu-latest
8381
timeout-minutes: 2
82+
permissions:
83+
contents: read
8484
steps:
8585
- name: "Checkout code"
8686
uses: actions/checkout@v6
@@ -94,6 +94,8 @@ jobs:
9494
name: "Check file format"
9595
runs-on: ubuntu-latest
9696
timeout-minutes: 2
97+
permissions:
98+
contents: read
9799
steps:
98100
- name: "Checkout code"
99101
uses: actions/checkout@v6
@@ -107,6 +109,8 @@ jobs:
107109
name: "Check Markdown format"
108110
runs-on: ubuntu-latest
109111
timeout-minutes: 2
112+
permissions:
113+
contents: read
110114
steps:
111115
- name: "Checkout code"
112116
uses: actions/checkout@v6
@@ -120,6 +124,8 @@ jobs:
120124
name: "Check English usage"
121125
runs-on: ubuntu-latest
122126
timeout-minutes: 2
127+
permissions:
128+
contents: read
123129
steps:
124130
- name: "Checkout code"
125131
uses: actions/checkout@v6
@@ -132,7 +138,9 @@ jobs:
132138
count-lines-of-code:
133139
name: "Count lines of code"
134140
runs-on: ubuntu-latest
135-
141+
permissions:
142+
contents: read
143+
id-token: write
136144
timeout-minutes: 2
137145
steps:
138146
- name: "Checkout code"
@@ -153,6 +161,9 @@ jobs:
153161
name: "Scan dependencies"
154162
runs-on: ubuntu-latest
155163
timeout-minutes: 2
164+
permissions:
165+
contents: read
166+
id-token: write
156167
steps:
157168
- name: "Checkout code"
158169
uses: actions/checkout@v6
@@ -174,6 +185,9 @@ jobs:
174185
runs-on: ubuntu-latest
175186
timeout-minutes: ${{ inputs.workflow_timeout }}
176187
environment: ${{ inputs.environment }}
188+
permissions:
189+
contents: read
190+
id-token: write
177191
strategy:
178192
matrix:
179193
stack: ${{ fromJson(inputs.stacks) }}
@@ -208,6 +222,8 @@ jobs:
208222
name: "Check Terraform format"
209223
runs-on: ubuntu-latest
210224
timeout-minutes: ${{ inputs.workflow_timeout }}
225+
permissions:
226+
contents: read
211227
steps:
212228
- name: "Checkout code"
213229
uses: actions/checkout@v6
@@ -250,6 +266,8 @@ jobs:
250266
name: "Lint service automation tests"
251267
runs-on: ubuntu-latest
252268
timeout-minutes: 2
269+
permissions:
270+
contents: read
253271
steps:
254272
- name: "Checkout code"
255273
uses: actions/checkout@v6

architecture/diagrams/likec4_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ def _parse_views(self, content: str) -> None:
311311
title = title_match.group(1) if title_match else view_name
312312

313313
# Extract description (may be multi-line)
314-
desc_match = re.search(r'description\s+"([^"]+(?:\n[^"]+)*)"', view_content, re.DOTALL)
314+
desc_match = re.search(r'description\s+"([^"]*)"', view_content, re.DOTALL)
315315
desc = desc_match.group(1) if desc_match else ""
316316

317317
# Extract includes

infrastructure/environments/dev/account_wide.tfvars

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ vpc = {
1212
private_subnet_b = "10.170.132.0/24"
1313
private_subnet_c = "10.170.133.0/24"
1414

15+
private_subnet_d = "10.170.8.0/22"
16+
private_subnet_e = "10.170.12.0/22"
17+
private_subnet_f = "10.170.16.0/22"
18+
1519
database_subnet_a = "10.170.201.0/24"
1620
database_subnet_b = "10.170.202.0/24"
1721
database_subnet_c = "10.170.203.0/24"

infrastructure/stacks/account_wide/data.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,7 @@ data "aws_iam_policy_document" "regional_waf_log_group_policy_document" {
6262
}
6363
}
6464
}
65+
66+
data "aws_prefix_list" "s3" {
67+
name = "com.amazonaws.${var.aws_region}.s3"
68+
}

infrastructure/stacks/account_wide/security_group.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,16 @@ resource "aws_vpc_security_group_egress_rule" "athena_rds_connector_allow_egress
9696
to_port = var.https_port
9797
}
9898

99+
resource "aws_vpc_security_group_egress_rule" "athena_rds_connector_allow_s3_access" {
100+
count = var.athena_stack_enabled ? 1 : 0
101+
security_group_id = aws_security_group.athena_rds_connector_sg[0].id
102+
description = "Athena Connector egress rule to allow S3 traffic"
103+
prefix_list_id = data.aws_prefix_list.s3.id
104+
ip_protocol = "tcp"
105+
from_port = var.https_port
106+
to_port = var.https_port
107+
}
108+
99109
# Security group for interface VPC endpoints
100110
resource "aws_security_group" "vpce_interface_security_group" {
101111
name = "${local.account_prefix}-vpce-interface-sg"

infrastructure/stacks/account_wide/vpc.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ module "vpc" {
4848
locals {
4949

5050
public_subnets = [var.vpc["public_subnet_a"], var.vpc["public_subnet_b"], var.vpc["public_subnet_c"]]
51-
private_subnets = [var.vpc["private_subnet_a"], var.vpc["private_subnet_b"], var.vpc["private_subnet_c"]]
51+
private_subnets = var.environment == "dev" ? [var.vpc["private_subnet_a"], var.vpc["private_subnet_b"], var.vpc["private_subnet_c"], var.vpc["private_subnet_d"], var.vpc["private_subnet_e"], var.vpc["private_subnet_f"]] : [var.vpc["private_subnet_a"], var.vpc["private_subnet_b"], var.vpc["private_subnet_c"]]
5252
database_subnets = [var.vpc["database_subnet_a"], var.vpc["database_subnet_b"], var.vpc["database_subnet_c"]]
5353
vpn_subnets = var.environment == "dev" ? [var.vpc["vpn_subnet"]] : []
5454

services/data-migration/src/dms_provisioner/dms_service.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,10 @@ def extract_indexes_from_sql_file(sql_file_path: Path = SCHEMA_FILE) -> List[str
126126

127127
# Regex to match CREATE INDEX and CREATE UNIQUE INDEX statements
128128
# Matches multi-line statements ending with semicolon
129+
# Bounded quantifier {1,4000} prevents quadratic backtracking on malformed input
130+
# 4000 chars accommodates even extremely complex index definitions
129131
index_pattern = re.compile(
130-
r"CREATE\s+(?:UNIQUE\s+)?INDEX\s+[^;]+;",
132+
r"CREATE\s+(?:UNIQUE\s+)?INDEX\s+[^;]{1,4000};",
131133
re.IGNORECASE | re.MULTILINE | re.DOTALL,
132134
)
133135

0 commit comments

Comments
 (0)