Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
a83d6d3
fix(security): allowlist https://api.github.com before urllib urlopen
seonghobae Sep 18, 2026
2167dae
test(codeql): reproduce non-canonical dispatch repository identity
seonghobae Sep 18, 2026
10a87ab
test(codeql): pin repository admission failure boundary
seonghobae Sep 18, 2026
2b849c8
fix(codeql): reject non-canonical dispatch repositories
seonghobae Sep 18, 2026
225260a
test(security): pin GitHub API redirect credential boundary
seonghobae Sep 18, 2026
0ae2204
fix(security): contain GitHub API redirects to admitted origin
seonghobae Sep 18, 2026
062663a
test(security): pin Strix redirect credential boundary
seonghobae Sep 18, 2026
2708a6b
fix(security): contain Strix GitHub API redirects
seonghobae Sep 18, 2026
3758b89
chore(deps): bump anyio from 4.14.0 to 4.14.2
dependabot[bot] Sep 18, 2026
4dcd25c
test(security): align Strix transport seam with dedicated opener
seonghobae Sep 19, 2026
834d285
test(security): bind authenticated openers at owned seams
seonghobae Sep 19, 2026
c3a4d51
Merge URL authority owner into CodeQL repository identity
seonghobae Sep 19, 2026
9501aea
fix(codeql): emit invalid dispatch identity errors on stderr
seonghobae Sep 19, 2026
055ee9b
test(codeql): assert dispatch admission errors on stderr
seonghobae Sep 19, 2026
8aff1a6
Merge current URL authority evidence owner
seonghobae Sep 19, 2026
6d10002
merge(security): carry #2269 urllib GitHub API opener into #2278
seonghobae Sep 19, 2026
545648e
chore(deps): isolate AnyIO security owner delta
seonghobae Sep 19, 2026
c51c8d2
merge: carry AnyIO lock update onto protected owner
seonghobae Sep 19, 2026
a0e1424
Merge protected main after #2279 admission
seonghobae Sep 19, 2026
8a5251b
fix(deps): restore AnyIO owner isolation
seonghobae Sep 20, 2026
8da5f48
fix(codeql): adopt canonical AnyIO security owner
seonghobae Sep 20, 2026
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
4 changes: 3 additions & 1 deletion .github/workflows/codeql-scan-dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,10 @@ jobs:
fi

if ! [[ "$TARGET_REPOSITORY" =~ ^ContextualWisdomLab/[A-Za-z0-9_.-]+$ ]] ||
[[ "${TARGET_REPOSITORY#ContextualWisdomLab/}" == *".."* ]] ||
[[ "${TARGET_REPOSITORY#ContextualWisdomLab/}" == *"." ]] ||
! [[ "$PR_NUMBER" =~ ^[1-9][0-9]*$ ]]; then
printf '::error::PR metadata validation rejected a target outside ContextualWisdomLab or an invalid pull request number. target=%s pr=%s\n' "${TARGET_REPOSITORY:-<empty>}" "${PR_NUMBER:-<empty>}"
printf '::error::PR metadata validation rejected a target outside ContextualWisdomLab or an invalid pull request number. target=%s pr=%s\n' "${TARGET_REPOSITORY:-<empty>}" "${PR_NUMBER:-<empty>}" >&2
exit 1
fi
if [ "$dispatch_protocol" = v2 ] &&
Expand Down
6 changes: 3 additions & 3 deletions requirements-strix-ci-hashes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ annotated-types==0.7.0 \
--hash=sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53 \
--hash=sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89
# via pydantic
anyio==4.14.0 \
--hash=sha256:b47c1f9ccf73e67021df785332508f99379c68fa7d0684e8e3492cb1d4b23f89 \
--hash=sha256:dd9b7a2a9799ed6552fde617b2c5df02b7fdd7d88392fc48101e51bae46164d9
anyio==4.14.2 \
--hash=sha256:9f505dda5ac9f0c8309b5e8bd445a8c2bf7246f3ce950121e45ea15bc41d1494 \
--hash=sha256:cfa139f3ed1a23ee8f88a145ddb5ac7605b8bbfd8592baacd7ce3d8bb4313c7f
# via
# google-genai
# gql
Expand Down
59 changes: 59 additions & 0 deletions tests/test_codeql_scan_dispatch_repository_identity_contract.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
"""Repository-identity admission contract for the CodeQL dispatch handler."""

from __future__ import annotations

import pytest

from tests.test_codeql_scan_dispatch_workflow_contract import (
_matching_pull_request,
_run_validate_step,
)


def _matching_pull_request_for(repository: str) -> dict:
"""Bind the shared live-PR fixture to one target repository identity."""
pull_request = _matching_pull_request()
pull_request["base"]["repo"]["full_name"] = repository
pull_request["head"]["repo"]["full_name"] = repository
return pull_request


@pytest.mark.parametrize(
"repository",
(
"ContextualWisdomLab/repository.",
"ContextualWisdomLab/repo..name",
"ContextualWisdomLab/..",
"ContextualWisdomLab/.",
),
)
def test_codeql_scan_dispatch_rejects_noncanonical_target_repository(
tmp_path, repository: str
) -> None:
"""Reject non-canonical target slugs in the real validation shell block."""
result = _run_validate_step(
tmp_path,
{"TARGET_REPOSITORY": repository},
_matching_pull_request_for(repository),
)
assert result.returncode != 0
assert "PR metadata validation rejected a target outside ContextualWisdomLab" in result.stderr


@pytest.mark.parametrize(
"repository",
(
"ContextualWisdomLab/pg-llm-batch",
"ContextualWisdomLab/repository.name-1",
),
)
def test_codeql_scan_dispatch_keeps_valid_target_repository(
tmp_path, repository: str
) -> None:
"""Preserve valid punctuation-bearing organization-local repository slugs."""
result = _run_validate_step(
tmp_path,
{"TARGET_REPOSITORY": repository},
_matching_pull_request_for(repository),
)
assert result.returncode == 0, result.stderr
2 changes: 1 addition & 1 deletion tests/test_codeql_scan_dispatch_workflow_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ def test_codeql_scan_dispatch_validate_step_rejects_non_org_target(tmp_path):
)

assert result.returncode == 1
assert "target outside ContextualWisdomLab" in result.stdout
assert "target outside ContextualWisdomLab" in result.stderr


def test_codeql_scan_dispatch_validate_step_rejects_malformed_matrix(tmp_path):
Expand Down
Loading