From d4d8da454404607ab510165dd2f7421cf03bb9d1 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Sun, 29 Nov 2026 06:43:03 -0500 Subject: [PATCH 1/2] chore(ci): allow manual workflow_dispatch for SonarCloud (#10070) --- .github/workflows/sonarcloud.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 90cf166ed7..4cd4eb6387 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -1,6 +1,7 @@ name: SonarCloud on: + workflow_dispatch: push: branches: [main] pull_request: From b3514b627778a7fc91e7a5aca9ebc85b3380d80b Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Sun, 29 Nov 2026 08:26:47 -0500 Subject: [PATCH 2/2] fix(packaging): resolve SonarCloud regex reliability findings in nightly-release-tests.py (#10076) --- packaging/nightly-release-tests.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/packaging/nightly-release-tests.py b/packaging/nightly-release-tests.py index d8c86d36a2..9738b641bd 100755 --- a/packaging/nightly-release-tests.py +++ b/packaging/nightly-release-tests.py @@ -110,7 +110,7 @@ def assert_caller_secrets(source, job_name, names): for value, children in (*root.values(), *job.values()): outside_map = "\n".join([value or "", *children]) # Scan all remaining text: quoted braces can appear before a secret reference. - if re.search(r"(?im)^\s*environment:|\bsecrets\b", outside_map): + if re.search(r"(?im)(?:^\s*environment:)|(?:\bsecrets\b)", outside_map): raise ValueError("secret bindings belong only in the signer map") @@ -600,10 +600,13 @@ def app_workflows(): return {path.name: path.read_text() for path in sorted((ROOT / ".github/workflows").glob("*.y*ml"))} -WORKFLOW_KEY = re.compile(r'''("(?:[^"\\]|\\.)*"|'(?:[^']|'')*'|[^\s'"#{}\[\],:&*!|>%@`?-][^:#,{}]*?|-[^\s:#][^:#,{}]*?)\s*:(?:\s+(.*))?$''') +WORKFLOW_KEY = re.compile( + r'''((?:"(?:[^"\\]|\\.)*"|'(?:[^']|'')*')[ \t]*|[^\s'"#{}\[\],:&*!|>%@`?-][^:#,{}]*|-[^\s:#][^:#,{}]*):(?:[ \t]+(.*))?$''' +) def _workflow_key(text): + text = text.rstrip() if text.startswith('"'): return None if "\\" in text else text[1:-1] if text.startswith("'"): @@ -620,7 +623,10 @@ def _workflow_value(text): if text.startswith("'"): quoted = re.match(r"'((?:[^']|'')*)'\s*(?:#.*)?$", text) return None if quoted is None else quoted.group(1).replace("''", "'") - return re.split(r"\s+#", text, maxsplit=1)[0].strip() + for idx, ch in enumerate(text): + if ch == "#" and idx > 0 and text[idx - 1].isspace(): + return text[:idx].rstrip() + return text def _strip_comment(text):