Own-agent checks: reject the Actions bot id in admit.mjs and test the source label in pr-verify

Aperta Adatta ai principianti
#17,374 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
74/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
github-actions, javascript, node.js
Ambito
ci-cd, tooling

Direzione di ricerca

Inizia con .github/scripts/intake-triage/admit.mjs intorno alle righe 274 e 295-298, dove il validatore delle regole e ownAgentIds accettano interi positivi, e confronta con ACTIONS_BOT_ID alla riga 1101. Poi leggi .github/scripts/pr-verify/resolve-pr.mjs intorno alla riga 1008 e confronta il suo controllo dell'etichetta source: con SOURCE_LABEL in admission e babysit_verify_evidence.py. Aggiungi test per rifiutare l'id del bot Actions e un'etichetta source: malformata, poi esegui le suite di test intake-triage e pr-verify pertinenti; completato significa che entrambi i controlli falliscono presto mentre le regole distribuite ammettono e verificano gli stessi issue di prima.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Summary

Two checks that #16999 added for own-agent issues are looser in one place than in the others that read the same rule.

  1. .github/scripts/intake-triage/admit.mjs: the rules validator (line 274) and ownAgentIds (lines 295 to 298) accept any positive integer in own-agents.identities, including the GitHub Actions bot id (ACTIONS_BOT_ID, line 1101), which the rules file's description and the module's comment say must never be listed. The Python merge gate drops that id. No admission can come from it today: apply-verdict.mjs writes nothing for an author authorTrust refuses, and the shipped list is ["lanes-app"]. This is hardening.
  2. .github/scripts/pr-verify/resolve-pr.mjs line 1008 counts source: labels (sourceLabels(...).length === 1) but never tests the label against SOURCE_LABEL, which admission (admit.mjs) and the merge gate (babysit_verify_evidence.py) both do. A malformed source: label passes pr-verify and is refused at the merge gate, so the pull request stalls instead of failing early.

Evidence

  • Lines read at d55250ec; the files are unchanged on main since.
  • Found by a review of the byte-copied files in melodic-software/pr-pipeline-sandbox#387. Neither was seen in a live run.

Done when

  • The rules validator and ownAgentIds reject the Actions bot id, with a test for each.
  • pr-verify tests the single source: label against the same pattern admission uses, with a malformed-label test.
  • No change to which issues are admitted or verified under the shipped rules.
Lingua principale
Shell
Stelle
22
Fork
2
Merge medio
1h 47m
PR unite (30g)
942

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di melodic-software/claude-code-plugins

Tutte le issue di melodic-software/claude-code-plugins

Issue simili

Altre issue su Shell/Bash

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.