Skip to content

ci: post code-review-graph comments from a trusted workflow_run - #64

Merged
neomatrix369 merged 1 commit into
mainfrom
fix/crg-fork-pr-sticky-comment
Aug 12, 2026
Merged

ci: post code-review-graph comments from a trusted workflow_run#64
neomatrix369 merged 1 commit into
mainfrom
fix/crg-fork-pr-sticky-comment

Conversation

@neomatrix369

Copy link
Copy Markdown
Owner

Summary

  • Split Code Review Graph so analysis stays unprivileged and the sticky PR comment is posted from a trusted workflow_run on main.
  • Fork pull_request runs get a read-only GITHUB_TOKEN, which made the in-job Upsert sticky PR comment step 403 on PR #63.

Why

Same-repo PRs already succeeded. Contributor fork PRs cannot write comments from the analysis job; publishing from the default branch restores the sticky comment without pull_request_target.

Test Results

Backend

Tests: 128 passed, 0 failed, 0 skipped (0.40s)

Coverage:

Module / Package Statements Branches
sandbox/init.py 100.0%
sandbox/scan_app.py 89.6% 88.1%
sandbox/scanners.py 98.8% 98.1%
Total 96.2% 96.0%

Frontend

Tests: 55 passed, 0 failed, 0 skipped (3.05s)

Coverage:

Module / Package Statements Branches Methods
bin/tripwire.js 96.49% 63.63% 100%
src/ 98.87% 87.07% 100%
Total 98.6% 85.71% 100%

Quality Gates

Complexity

Stack Tool Result Status
Python xenon scan_app ≤C / scanners ≤D (CI ceilings)

Static Analysis

Stack Tool Status
Python ruff + mypy ✅ clean

Security

Tool Status
gitleaks (branch range) ✅ no secrets found

Checklist

  • ./scripts/quality-gates.sh passes locally
  • New tests added or updated (or change is docs-only)
  • Docs updated where applicable
  • No secrets or credentials committed

Made with Cursor

Fork pull_request runs get a read-only GITHUB_TOKEN, so the in-job
sticky comment 403s. Keep analysis unprivileged and publish from main.
@neomatrix369
neomatrix369 merged commit bbc8b66 into main Aug 12, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant