Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/opencode-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
|| (
github.event_name == 'pull_request_target'
&& github.event.action != 'closed'
&& github.event.pull_request.head.repo.full_name == github.repository
&& github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
)
runs-on: ubuntu-latest
permissions:
Expand Down
3 changes: 2 additions & 1 deletion scripts/ci/test_strix_quick_gate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,8 @@ assert_opencode_review_uses_codegraph_and_gpt5_fallback() {
assert_file_contains "$workflow_file" 'cancel-in-progress: true' "opencode review cancels stale in-progress review attempts when a newer PR event arrives"
assert_file_contains "$workflow_file" "Checkout pull request merge ref for coverage measurement" "opencode pull_request_target coverage execution uses the trusted merge ref"
assert_file_contains "$workflow_file" "stale OpenCode run: event head=" "opencode review side effects are skipped for stale heads"
assert_file_contains "$workflow_file" "github.event.pull_request.head.repo.full_name == github.repository" "opencode pull_request_target coverage execution is limited to same-repository PR heads"
assert_file_contains "$workflow_file" "github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name" "opencode pull_request_target coverage execution is limited to same-repository PR heads using the target PR base repo"
assert_file_not_contains "$workflow_file" "github.event.pull_request.head.repo.full_name == github.repository" "opencode required workflow must not compare PR head repo to the central workflow source repository"
assert_file_contains "$workflow_file" "needs.coverage-evidence.result != 'cancelled'" "opencode review does not enqueue stale side-effect jobs after coverage evidence cancellation"
assert_file_contains "$workflow_file" "opencode-review-target:" "opencode trusted review job owns the required check surface"
assert_file_contains "$workflow_file" "Initialize CodeGraph index for OpenCode" "opencode review workflow initializes CodeGraph before review"
Expand Down
6 changes: 6 additions & 0 deletions tests/test_opencode_agent_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@ def test_opencode_manual_dispatch_canonical_ref_overrides_workflow_ref():
def test_opencode_target_coverage_materializes_merge_tree_without_checkout_action():
"""Avoid pull_request_target action checkouts of untrusted PR refs."""
workflow = Path(".github/workflows/opencode-review.yml").read_text(encoding="utf-8")
assert (
"github.event.pull_request.head.repo.full_name == "
"github.event.pull_request.base.repo.full_name"
) in workflow
assert "github.event.pull_request.head.repo.full_name == github.repository" not in workflow

start = workflow.index(
" - name: Materialize pull request merge tree for coverage measurement\n"
)
Expand Down
Loading