chore: standard issue templates + label-automation dispatchers - #2028
chore: standard issue templates + label-automation dispatchers#2028chrisferry wants to merge 7 commits into
Conversation
Org-standard YAML issue forms (native type:, status:untriaged, repo component label, component dropdown where multi-component) replacing the legacy .md templates, plus dispatchers for the org reusable label workflows (default-labels-on-open, default-origin-on-open, drop-untriaged-on-assign, ai-assisted-label, apply-component-from-form). Assisted-by: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a1806cdfd7
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| pull_request: | ||
| types: [opened, edited, synchronize] |
There was a problem hiding this comment.
Use a writable trigger for fork-originated PRs
For PRs opened from forks or by Dependabot, GitHub downgrades the pull_request event's GITHUB_TOKEN to read-only despite the requested pull-requests: write permission. The called reusable workflow therefore cannot add or remove bot:ai-assisted for those PRs; use a safely designed writable context such as pull_request_target, or another trusted-token mechanism, so the repository's AI-label requirement is enforced for external contributions too.
AGENTS.md reference: AGENTS.md:L178-L183
Useful? React with 👍 / 👎.
Public repos cannot resolve reusable workflows hosted in a private repo, so every dispatcher call was failing at workflow resolution. Re-points them at the public midnightntwrk/workflows mirror (byte-identical reusables). The component dropdown is renamed to Components with literal component:* options and multiple: true, which is the form the reusable's parser matches — the previous singular/bare-name form silently no-oped. Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Chris Ferry <chris.ferry@shielded.io>
Collapses the enumerated .github rules into a single /.github/ rule so security and SRE own everything under .github. The narrow rules left gaps: the dependabot.yml rule pointed under workflows/ where that file does not exist, and only scan.yaml was owned among the workflows. Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Chris Ferry <chris.ferry@shielded.io>
GitHub hands fork-originated PRs a read-only token on pull_request regardless of the permissions requested, so the label was never applied to external contributions — and this repo takes them regularly. pull_request_target is safe for this dispatcher specifically: the reusable it calls never checks out or executes PR code, it only reads PR metadata through the API. Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Chris Ferry <chris.ferry@shielded.io>
|
Codex P2 applied, after checking both halves of it — the risk and the need. The need is real. This repo has taken 8 fork PRs in its last 100, so external contribution is current practice, not hypothetical. On The risk is not.
Separate, larger finding while verifying the above — the backstop cannot detect this repo's own mandated disclosure format. The reusable matches on: But That is a fix in the shared reusable rather than here, so it is out of scope for this PR. Raising it so it is not mistaken for working once this merges. |
Required by the changes check, which wants both a PR link and an issue link. DCO Remediation Commit for Chris Ferry <chris.ferry@shielded.io> I, Chris Ferry <chris.ferry@shielded.io>, hereby add my Signed-off-by to this commit: a1806cd Signed-off-by: Chris Ferry <chris.ferry@shielded.io> Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
zizmor fails the scan gate on pull_request_target unconditionally, so the fork gap stays open pending a security decision rather than suppressing the rule here. The limitation is now documented in the file. Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Chris Ferry <chris.ferry@shielded.io>
|
Update on the Codex P2 (fork PRs) — it collides head-on with this repo's own security gate, so I have reverted it and need a decision. I applied So the two automated reviewers directly contradict each other: Codex says use My read is that zizmor's rule is a blanket heuristic and this is one of the cases where it is a false positive — The three ways forward:
@midnightntwrk/mn-security — this one is yours. Option 1 is in effect until someone says otherwise, so this PR is not blocked on it. Separately, the disclosure-regex gap I flagged above still stands and is arguably the bigger issue: the reusable cannot match |
Org-standard YAML issue forms (native
type:Bug/Feature/Task,status:untriaged, this repo'scomponent:*default, dropdown where multi-component) replacing the legacy.mdtemplates, plus SHA-pinned dispatchers for the shared reusable label workflows.node-release-checklist.mdis preserved.Also in scope:
.githubrules collapse into a single/.github/rule, so security and SRE own everything under.githubrather than a fixed list that new files fall outside of. The previous rules had real gaps —/.github/workflows/dependabot.ymlmatched nothing (that file lives at.github/dependabot.yml), and three of the owned paths are.mdtemplates this PR deletes.ai-assisted-labelmoves topull_request_target, because GitHub gives fork-originated PRs a read-only token onpull_requestand this repo takes external contributions regularly. Safe here — the reusable never checks out or executes PR code.Dispatchers call the public
midnightntwrk/workflowsreusable library, pinned to a SHA. Verified live: the re-pointedai-assisted-labeldispatcher resolves and runs green, which the previous private-.githubroute could not do from a public repo.Closes #2027