Conversation
Adds preflight checks calling reusable workflows from the .github org repo: stale approvals, dependency review, and TODO comment scanning.
PR SummaryMedium Risk Overview The workflow runs three reusable org-level jobs: dismiss stale PR approvals when diffs change, review dependency changes (with PR write access), and scan for TODO comments. Written by Cursor Bugbot for commit faa7e47. This will update automatically on new commits. Configure here. |
🤖 Augment PR SummarySummary: Adds a new GitHub Actions “Preflight” workflow to run standardized PR checks via reusable workflows from Changes:
Technical Notes: Reusable workflows are pinned to a specific commit SHA in 🤖 Was this summary useful? React with 👍 or 👎 |
| name: Preflight | ||
|
|
||
| on: | ||
| pull_request: |
There was a problem hiding this comment.
Because this workflow runs on pull_request when preflight.yml itself changes, the workflow definition from the PR branch can be executed; please double-check that this can’t be used to run newly-added steps with elevated job permissions (notably id-token: write / pull-requests: write). If this is intended only as a self-test trigger, consider ensuring the pull_request path is effectively non-privileged for untrusted changes.
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
| name: Todo comments | ||
| permissions: | ||
| contents: read | ||
| uses: hashintel/.github/.github/workflows/todo-comments.yml@52c4a1f5fa1c72f30dfa02b00a6cbf0c89c1ea8a |
There was a problem hiding this comment.
The called reusable workflow todo-comments.yml (in hashintel/.github) checks out github.event.pull_request.head.sha even when invoked via pull_request_target; since pull_request_target runs with a more privileged token, it’s worth confirming this job can’t be abused by a fork PR (e.g., by executing untrusted code from the checkout). If forks are in scope, consider restricting when this job runs or ensuring the reusable workflow never executes repository-provided code.
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| paths: | ||
| - ".github/workflows/preflight.yml" | ||
| pull_request_target: | ||
| types: [opened, synchronize, reopened, edited] |
There was a problem hiding this comment.
Stale approvals job triggers unnecessarily on PR edits
Medium Severity
The edited activity type on pull_request_target fires when the PR title, body, or base branch changes. This is needed for the todo-comments job (which scans for Linear tickets from the PR title), but the stale-approvals and dependencies jobs also run on every title/body edit despite not needing to. The stale-approvals job holds pull-requests: write and id-token: write permissions and may dismiss approvals unnecessarily, while dependencies runs a pointless review. These two jobs lack an if condition (e.g., filtering on github.event.action != 'edited') to skip edited events.


Summary
preflight.ymlcalling reusable workflows from the.githuborg repoRelated