Compare commits

...

4 commits

Author SHA1 Message Date
dependabot[bot]
a85eba5e11
Bump aws-cdk-lib in /cdk in the minor-and-patch group across 1 directory
Bumps the minor-and-patch group with 1 update in the /cdk directory: [aws-cdk-lib](https://github.com/aws/aws-cdk).


Updates `aws-cdk-lib` from 2.261.0 to 2.262.1
- [Release notes](https://github.com/aws/aws-cdk/releases)
- [Changelog](https://github.com/aws/aws-cdk/blob/main/CHANGELOG.v2.alpha.md)
- [Commits](https://github.com/aws/aws-cdk/compare/v2.261.0...v2.262.1)

---
updated-dependencies:
- dependency-name: aws-cdk-lib
  dependency-version: 2.262.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-24 16:54:00 +00:00
dependabot[bot]
3e1e0154db
Update constructs requirement from >=10.7.0 to >=10.7.1 in /cdk (#35)
Updates the requirements on [constructs](https://github.com/aws/constructs) to permit the latest version.
- [Release notes](https://github.com/aws/constructs/releases)
- [Commits](https://github.com/aws/constructs/compare/v10.7.0...v10.7.1)

---
updated-dependencies:
- dependency-name: constructs
  dependency-version: 10.7.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-24 16:51:08 +00:00
Adam Moussa
eaf214a733
ci: bump reusable workflow pin to f71002a (ruff 0.15.22 pin) (#37)
Picks up Sea-Haven-Industries/.github#88, which pins ruff in ci-python-sam so unpinned installs no longer float to new releases with changed default rule sets. Ruff 0.16.0's default-rule expansion broke this repo's CI with 21 pre-existing findings (89 in meal-order-manager, the first repo hit). Refs Sea-Haven-Industries/.github#87.
2026-07-24 16:32:37 +00:00
Adam Moussa
299ead89b3
chore: resolve open code scanning alerts (URL host matching + workflow permissions) (#36)
Some checks are pending
Deploy / deploy (push) Waiting to run
* fix: Refactor `comment_intent` to use `_contains_url_with_host` for URL host matching.

* ci: add least-privilege permissions blocks to workflow callers
Resolves code scanning alerts #4 and #5 (actions/missing-workflow-permissions). Both callable workflows only need contents: read; the dependency-review callable already declares it internally, this caps the caller token to match.
2026-07-23 19:10:45 +00:00
4 changed files with 25 additions and 4 deletions

View file

@ -3,9 +3,12 @@ on:
pull_request:
branches: [main]
permissions:
contents: read
jobs:
ci:
uses: Sea-Haven-Industries/.github/.github/workflows/ci-python-sam.yaml@fd60e4c9041784f666ac0fdefb9bec3c7fbf5143 # main
uses: Sea-Haven-Industries/.github/.github/workflows/ci-python-sam.yaml@f71002a9ed2938730b683249b28059c92a081af6
with:
python-version: "3.12"
source-dirs: "cdk lambdas tests"

View file

@ -1,6 +1,10 @@
name: Dependency Review
on:
pull_request:
permissions:
contents: read
jobs:
review:
uses: Sea-Haven-Industries/.github/.github/workflows/callable-dependency-review.yaml@fd60e4c9041784f666ac0fdefb9bec3c7fbf5143 # main

View file

@ -1,2 +1,2 @@
aws-cdk-lib==2.261.0
constructs>=10.7.0
aws-cdk-lib==2.262.1
constructs>=10.7.1

View file

@ -25,6 +25,7 @@ from __future__ import annotations
import html
import os
import re
from urllib.parse import unquote, urlparse
# Axis 2 — Hold Reason → category.
HOLD_TO_CATEGORY = {
@ -118,6 +119,19 @@ def strip_html(comment: str | None) -> str:
# ---------------------------------------------------------------------------
def _contains_url_with_host(text: str, expected_host: str) -> bool:
"""Return True when ''text'' contains an absolute URL with hostname ''expected_host''."""
for raw_url in re.findall(r"https?://[^\s<>'\"()]+", text, flags=re.IGNORECASE):
candidate = unquote(raw_url).rstrip(".,;:!?)]}\"'")
try:
host = urlparse(candidate).hostname
except ValueError:
continue
if host and host.lower() == expected_host:
return True
return False
def comment_intent(comment: str) -> str | None:
"""Ordered, most-specific-first rule ladder over the *stripped* text.
@ -147,7 +161,7 @@ def comment_intent(comment: str) -> str | None:
# -- SIM Ticket: Amazon SIM tooling references.
if (
re.search(r"\bsim\b.*\b(ticket|tt|v\d{6,})\b", low)
or "t.corp.amazon.com" in low
or _contains_url_with_host(t, "t.corp.amazon.com")
or re.search(r"\bsim\s*tt\b", low)
):
return "SIM Ticket"