Pattern miner: Mine upstream: min-integrity/lockdown tips for PR review and content moderation - #253
Merged
Conversation
…rchetypes Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
pelikhan
marked this pull request as ready for review
September 3, 2026 06:39
pelikhan
deleted the
pattern-miner/min-integrity-tips-3a13595b73e4866e
branch
September 3, 2026 06:39
Contributor
Author
There was a problem hiding this comment.
No blocking issues found. This is a minimal, well-scoped data change (2 tip strings added to pr-review.json and content-moderation.json), consistent with the PR's stated refinement rules — no triggers, safe-outputs, tools, metadata, or anti-pattern fields touched. Content is accurate and matches upstream min-integrity/lockdown documentation. (Reviewer kind: auto — treated as low-risk pattern-data update; no TS/JS logic or UI changes present.)
Generated by Specialist PR Review for #253 · copilot · auto · 14.4 AIC · ⌖ 6.68 AIC · ⊞ 8.1K
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mined pattern:
tools.github.min-integrity/lockdownfor untrusted-content workflowsUpstream evidence:
githubnext/agenticsworkflows/:min-integrityappears in 16 workflow files, e.g.ai-moderator.md,contribution-check.md,contribution-guidelines-checker.md,daily-issue-triage.md,issue-arborist.md,issue-monster.md(usesmin-integrity: approved),plan.md,pr-fix.md,pr-nitpick-reviewer.md,q.md,repo-ask.md,repo-assist.md,repo-chronicle.md,repo-status.md,team-status.md,weekly-issue-activity.md,weekly-research.md.lockdownappears in 7 of those same files, e.g.weekly-issue-activity.md,issue-arborist.md,plan.md,contribution-check.md,repo-status.md,discussion-task-miner.md,grumpy-reviewer.md.github/gh-aw.github/aw/pr-reviewer.mdexplicitly recommends the control for reviewer-style agents ("Use the lowestmin-integritythat supports the required actions") and.github/aw/syntax-tools-imports.mddocuments bothmin-integrity:andlockdown:as first-class frontmatter options for controlling which content an agent may act on based on author trust.Recurring pattern: workflows that let an agent read and act on content from potentially untrusted external contributors (PR reviews, issue triage, content moderation, contribution checks) set
tools.github.min-integrity(and oftenlockdown) to restrict which authors' content the agent will act on. This is corroborated by 16 upstream workflow files plus explicit upstream documentation recommending it as best practice, well above the "at least two workflows or one workflow plus docs" bar.Why not already covered: I checked
/tmp/gh-aw/data/current-library.json(all archetypes, trigger combos, tips, anti-patterns) and grepped for "integrity"/"lockdown" — no existing tip, trigger, or safe-output field references this control anywhere in the pattern library, even thoughpr-reviewandcontent-moderationare exactly the archetypes most exposed to untrusted external content.What changed:
patterns/archetypes/pr-review.json: added tip — "Set tools.github.min-integrity (e.g. approved) so the agent only acts on content from trusted authors"patterns/archetypes/content-moderation.json: added tip — "Enable tools.github.lockdown to restrict surfaced content from public repos to authors with push access"No triggers, safe outputs, tools,
metadata,success_rate,count,top_repos, oranti_patternswere touched — only the twotipsarrays, per the refinement rules.Candidates deliberately left out:
link-checker.md) — only one upstream workflow with this exact shape (scheduled broken-link scan/fix in docs); no corroborating second workflow or explicit upstream doc recommendation, so it doesn't meet the two-workflow bar.duplicate-code-detector.md), overlaps significantly with the existing curatedcode-health-auditorarchetype's "duplication" dimension, so not distinct enough to warrant a new entry.create-code-scanning-alertas a broader recommendation — already fully captured by the existing curatedsecurity-scannerarchetype.Validation:
npm test: 18 test files, 318 tests passed.npm run build: succeeded,dist/patterns/archetypes/{pr-review,content-moderation}.jsonregenerated with the new tips.