Issues: unify bug form and subtype auto-labeling#30733
Conversation
🔒 Aisle Security AnalysisWe found 1 potential security issue(s) in this PR:
1. 🔵 Untrusted issue events can trigger GitHub App token to create repository labels (label sync)
DescriptionThe With the newly added label-sync logic, any user who can open/edit an issue can cause the workflow to attempt repository label creation (not just labeling that issue):
While the label names/descriptions are currently hard-coded (limiting impact), this still expands the attack surface for privileged automation on untrusted events and enables label/metadata pollution if labels are absent, without any actor trust/authorization check. Vulnerable code (repo label creation on untrusted events): on:
issues:
types: [opened, edited, labeled]
issue_comment:
types: [created]await github.rest.issues.createLabel({
owner: context.repo.owner,
repo: context.repo.repo,
name,
color,
description,
});RecommendationMitigate by removing repo-global mutation from untrusted triggers, or gate it behind trusted actors. Options (choose one or combine):
// Instead of createLabel, just return if missing.
try {
await github.rest.issues.getLabel({ owner, repo, name });
} catch (e) {
if (e?.status === 404) return; // don't create from untrusted event
throw e;
}
const assoc = context.payload.issue?.author_association;
const trusted = ["OWNER","MEMBER","COLLABORATOR"].includes(assoc);
if (!trusted) return;
Also consider reducing job permissions to the minimum needed (e.g., drop Analyzed PR: #30733 at commit |
There was a problem hiding this comment.
💡 Codex Review
openclaw/.github/workflows/auto-response.yml
Line 299 in 869243d
syncBugSubtypeLabel is only called inside the opened/edited branch, so issues.labeled events never re-normalize bug subtype labels. In practice, if a triager adds bug or an extra subtype label later, the issue can keep zero or multiple subtype labels indefinitely, which breaks the stated “exactly one subtype” routing/filtering behavior for bug triage.
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Greptile SummaryThis PR consolidates bug reporting into a single issue template with a required Key changes:
Implementation notes:
Confidence Score: 5/5
Last reviewed commit: 869243d |
869243d to
fbcf724
Compare
|
PR #30733 - Issues: unify bug form and subtype auto-labeling (#30733) Merged via squash.
Thanks @Takhoffman! |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fbcf724300
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| }); | ||
| } | ||
|
|
||
| await syncBugSubtypeLabel(issue, labelSet); |
There was a problem hiding this comment.
Normalize subtype labels on issue label changes
Call syncBugSubtypeLabel for issues:labeled events as well, because right now it only runs for opened/edited issues. If someone adds a conflicting subtype label (for example, adding regression onto a crash report), this workflow run is triggered by labeled but never reconciles the bug subtype set, so the issue can keep multiple subtype labels and break queue filtering that expects a single subtype.
Useful? React with 👍 / 👎.
…nks @Takhoffman Cherry-pick of upstream ff563ee.
…nks @Takhoffman Verified: - pnpm build - pnpm check - pnpm test:macmini Co-authored-by: Takhoffman <781889+Takhoffman@users.noreply.github.com>
…nks @Takhoffman Verified: - pnpm build - pnpm check - pnpm test:macmini Co-authored-by: Takhoffman <781889+Takhoffman@users.noreply.github.com>
…nks @Takhoffman Verified: - pnpm build - pnpm check - pnpm test:macmini Co-authored-by: Takhoffman <781889+Takhoffman@users.noreply.github.com>
…nks @Takhoffman Verified: - pnpm build - pnpm check - pnpm test:macmini Co-authored-by: Takhoffman <781889+Takhoffman@users.noreply.github.com>
…nks @Takhoffman Verified: - pnpm build - pnpm check - pnpm test:macmini Co-authored-by: Takhoffman <781889+Takhoffman@users.noreply.github.com>
…nks @Takhoffman Verified: - pnpm build - pnpm check - pnpm test:macmini Co-authored-by: Takhoffman <781889+Takhoffman@users.noreply.github.com>
…nks @Takhoffman Verified: - pnpm build - pnpm check - pnpm test:macmini Co-authored-by: Takhoffman <781889+Takhoffman@users.noreply.github.com>
…nks @Takhoffman Verified: - pnpm build - pnpm check - pnpm test:macmini Co-authored-by: Takhoffman <781889+Takhoffman@users.noreply.github.com> (cherry picked from commit ff563ee) # Conflicts: # .github/ISSUE_TEMPLATE/bug_report.yml # CHANGELOG.md
…nks @Takhoffman Verified: - pnpm build - pnpm check - pnpm test:macmini Co-authored-by: Takhoffman <781889+Takhoffman@users.noreply.github.com>
…nks @Takhoffman Verified: - pnpm build - pnpm check - pnpm test:macmini Co-authored-by: Takhoffman <781889+Takhoffman@users.noreply.github.com>
…nks @Takhoffman Verified: - pnpm build - pnpm check - pnpm test:macmini Co-authored-by: Takhoffman <781889+Takhoffman@users.noreply.github.com>
…nks @Takhoffman Cherry-pick of upstream ff563ee.
…nks @Takhoffman Verified: - pnpm build - pnpm check - pnpm test:macmini Co-authored-by: Takhoffman <781889+Takhoffman@users.noreply.github.com>
Summary
Describe the problem and fix in 2–5 bullets:
Bug typeselection and added issue automation that maps that selection to exactly one subtype label (regression,bug:crash,bug:behavior).triage:*), and no runtime/product behavior changes.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
buglabel are auto-normalized to exactly one subtype label:regression,bug:crash, orbug:behavior.Security Impact (required)
Yes/No) NoYes/No) NoYes/No) NoYes/No) NoYes/No) NoYes, explain risk + mitigation: N/ARepro + Verification
Environment
Steps
Bug report.Bug typeoption.Expected
Actual
Evidence
Attach at least one:
Human Verification (required)
What you personally verified (not just CI), and how:
pnpm check).Bug typevalue no-ops; non-bug issues are ignored; conflicting subtype labels are normalized to one.Compatibility / Migration
Yes/No) YesYes/No) NoYes/No) NoFailure Recovery (if this breaks)
.github/ISSUE_TEMPLATE/bug_report.yml,.github/ISSUE_TEMPLATE/regression_bug_report.yml,.github/workflows/auto-response.yml,CHANGELOG.md.Risks and Mitigations
List only real risks for this PR. Add/remove entries as needed. If none, write
None.