Skip to content

Pattern miner: Mine upstream: min-integrity/lockdown tips for PR review and content moderation - #253

Merged
pelikhan merged 1 commit into
mainfrom
pattern-miner/min-integrity-tips-3a13595b73e4866e
Sep 3, 2026
Merged

Pattern miner: Mine upstream: min-integrity/lockdown tips for PR review and content moderation#253
pelikhan merged 1 commit into
mainfrom
pattern-miner/min-integrity-tips-3a13595b73e4866e

Conversation

@github-actions

@github-actions github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Mined pattern: tools.github.min-integrity / lockdown for untrusted-content workflows

Upstream evidence:

  • githubnext/agentics workflows/: min-integrity appears 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 (uses min-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.
  • lockdown appears 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.
  • Upstream documentation github/gh-aw .github/aw/pr-reviewer.md explicitly recommends the control for reviewer-style agents ("Use the lowest min-integrity that supports the required actions") and .github/aw/syntax-tools-imports.md documents both min-integrity: and lockdown: 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 often lockdown) 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 though pr-review and content-moderation are 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, or anti_patterns were touched — only the two tips arrays, per the refinement rules.

Candidates deliberately left out:

  • A new "Link Checker" archetype (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.
  • A new "Duplicate Code Detector" archetype — single upstream example (duplicate-code-detector.md), overlaps significantly with the existing curated code-health-auditor archetype's "duplication" dimension, so not distinct enough to warrant a new entry.
  • create-code-scanning-alert as a broader recommendation — already fully captured by the existing curated security-scanner archetype.

Validation:

  • npm test: 18 test files, 318 tests passed.
  • npm run build: succeeded, dist/patterns/archetypes/{pr-review,content-moderation}.json regenerated with the new tips.

Generated by Pattern Miner · copilot · auto · 50.4 AIC · ⌖ 11.8 AIC · ⊞ 8.5K ·

…rchetypes

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pelikhan
pelikhan marked this pull request as ready for review September 3, 2026 06:39
@pelikhan
pelikhan merged commit dee142c into main Sep 3, 2026
2 of 3 checks passed
@pelikhan
pelikhan deleted the pattern-miner/min-integrity-tips-3a13595b73e4866e branch September 3, 2026 06:39

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant