Skip to content

ci(commitperclip): remove the security gate that filed a draft advisory per PR - #11828

Merged
aaymeloglu merged 2 commits into
paperclipai:masterfrom
aaymeloglu:commitperclip/no-draft-advisories
Aug 21, 2026
Merged

aaymeloglu merged 2 commits into
paperclipai:masterfrom
aaymeloglu:commitperclip/no-draft-advisories

Conversation

@aaymeloglu

Copy link
Copy Markdown
Contributor

Thinking Path

  • Paperclip's commitperclip-review workflow runs check-pr-security.mjs on every PR and files a draft security advisory whenever one of its heuristics fires (feat(commitperclip): add automated PR quality and security gates #6469).
  • The heuristics fire on most ordinary PRs: any change under server/src/routes/agents.ts / companies.ts / approvals.ts / authz.ts / MarkdownBody.tsx, any test file containing fetch( / exec( / process.env.X, any key: "<20+ chars>" string (it flagged pluginKey: "paperclipai.plugin-llm-wiki"), any touch of .github/workflows/.
  • The repository now holds 1,566 commitperclip-authored draft advisories against ~99 human-reported ones, burying the reports that matter under the 🔒 Security tab.
  • Nothing consumes them: no code reads the drafts, nothing reads the security-review check run the script also posts, and master has no required status checks. The "Review and dismiss if not a real concern" footer assumed a human triage loop that never existed.
  • A second bug made it worse: the advisories endpoint is cursor-paginated and ignores page=, so findExistingDraftAdvisory only ever saw the newest 100 drafts and re-flagged PRs got a second draft (1,566 drafts for 1,386 distinct PRs; 136 PRs have 2+).
  • Removing the gate stops the flood at the source; the quality gates and Dependency Review carry on unchanged.

Linked Issues or Issue Description

Problem: check-pr-security.mjs files a draft security advisory for nearly every PR, flooding the repository's advisory list with bot-authored noise that no one reads. Human-reported advisories in triage state are buried among ~1,560 🚨 Security flag — PR #NNNN drafts.

Expected: the advisory list contains only real vulnerability reports. Heuristic PR checks, if wanted at all, do not create disclosure records.

What Changed

  • Deleted .github/scripts/check-pr-security.mjs and .github/scripts/tests/check-pr-security.test.mjs.
  • Removed the Run security gates step from .github/workflows/commitperclip-review.yml, and the security-events: write permission that only it used.
  • No other script imports from the removed module (resolveBaseRef lives in check-pr-dependencies.mjs and stays).

Verification

  • node --test .github/scripts/tests/*.test.mjs → 114 pass, 0 fail.
  • grep -rn check-pr-security .github → no remaining references.
  • The 1,563 existing bot drafts are being closed out-of-band via the API (there is no delete endpoint for advisories).

Risks

  • Low. The only behaviour removed is the draft-advisory filing and the informational security-review check run, neither of which is consumed by code or branch protection.
  • Recommended follow-up for an org admin: drop security_advisories: write from the commitperclip App's permissions so no workflow can recreate this.

Model Used

Claude Fable 5 (claude-fable-5) via Claude Code, with tool use: GitHub API reads, file edits, local test runs.

Checklist

  • I have included a thinking path that traces from project context to this change
  • I have specified the model used (with version and capability details)
  • I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work
  • I have searched GitHub for duplicate or related PRs and linked them above
  • I have either (a) linked existing issues with Fixes: # / Closes # / Refs # OR (b) described the issue in-PR following the relevant issue template
  • I have run tests locally and they pass
  • I have considered and documented any risks above

🤖 Generated with Claude Code

https://claude.ai/code/session_016HitAcRu3NW5YDeBxXxePi

…ry per PR

check-pr-security.mjs created one draft security advisory for every PR that
tripped a heuristic — any test touching fetch(), any change under a sensitive
route file, any `key: "<20+ chars>"` string. That produced ~1,560
bot-authored drafts in the repository's advisory list, burying the
human-reported ones. Nothing consumed the drafts or the `security-review`
check run it also posted, and master has no required status checks, so the
gate had no reader. Removes the script, its tests, the workflow step, and the
`security-events: write` permission only that step used. The quality gates
and Dependency Review are unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016HitAcRu3NW5YDeBxXxePi
@greptile-apps

greptile-apps Bot commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR removes the noisy, non-blocking security-advisory gate while retaining the existing quality and dependency checks.

  • Deletes the security-check script and its tests.
  • Removes its workflow step and unused security-events: write permission.
  • Updates Codex documentation to request maintainer review instead of referring to the removed gate.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
.github/scripts/check-pr-security.mjs Deletes the heuristic scanner, draft-advisory synchronization, and informational check-run implementation as intended.
.github/scripts/tests/check-pr-security.test.mjs Removes tests exclusively covering the deleted security-check script.
.github/workflows/commitperclip-review.yml Removes the security-gate step and its now-unused permission while preserving dependency review and quality gates.
docs/adapters/codex-local.md Replaces the stale CI-gate reference with a maintainer-review requirement, resolving the previous documentation finding.

Reviews (2): Last reviewed commit: "docs(codex-local): point the auth-warnin..." | Re-trigger Greptile

… review

The `security-review` CI gate it named no longer exists.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016HitAcRu3NW5YDeBxXxePi
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