Skip to content

docs(#5586): add security guidance for destructive forge operations#5587

Open
fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/5586-forge-destructive-ops-guidance
Open

docs(#5586): add security guidance for destructive forge operations#5587
fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/5586-forge-destructive-ops-guidance

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

Summary

  • Adds a "Security considerations for destructive operations" section to docs/contributing/forge-abstraction.md
  • Covers three principles for callers of destructive forge.Client methods: verify ownership before acting, prefer fail-closed defaults, and guard against predictable-name attacks
  • References closeStaleScaffoldPRs in internal/layers/commit.go as a positive example of all three principles
  • Includes review guidance to flag destructive operations that lack authorization checks

Motivation

PR #5478 added CloseChangeProposal to the forge interface without authorization checks, requiring a review-fix cycle to add author verification. The forge-abstraction guide had no guidance on security considerations for destructive operations, so the code agent had no signal that such checks were needed.

Testing

  • make lint-md-links passes — no broken links introduced
  • Documentation-only change; no Go code or tests affected

Closes #5586

Post-script verification

  • Branch is not main/master (agent/5586-forge-destructive-ops-guidance)
  • Secret scan passed (gitleaks — 253eb62573e4783735126d34c6283fecde9f0d71..HEAD)
  • PR body secret scan passed (gitleaks — no-git)
  • Pre-commit hooks passed (authoritative run on runner)
  • Tests ran inside sandbox

Add a 'Security considerations for destructive operations' section
to docs/contributing/forge-abstraction.md. The section covers three
principles for callers of destructive forge methods (close, delete,
merge, force-push): verify ownership before acting, prefer
fail-closed defaults when authorization data is missing, and guard
against predictable-name attacks where external actors could create
resources on well-known branch paths.

References closeStaleScaffoldPRs in internal/layers/commit.go as a
positive example of all three principles. Includes review guidance
to flag destructive operations missing authorization checks.

Closes #5586
@fullsend-ai-coder
fullsend-ai-coder Bot requested a review from a team as a code owner July 25, 2026 00:59
@fullsend-ai-coder fullsend-ai-coder Bot added the ready-for-review Agent PR ready for human review label Jul 25, 2026
@fullsend-ai-review

fullsend-ai-review Bot commented Jul 25, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 1:01 AM UTC · Completed 1:11 AM UTC
Commit: b90652b · View workflow run →

@github-actions

Copy link
Copy Markdown

Site preview

Preview: https://6990d6f8-site.fullsend-ai.workers.dev

Commit: b90652b52a45ec2540be5f233b9cae67a935d3cc

@codecov

codecov Bot commented Jul 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@fullsend-ai-review

Copy link
Copy Markdown

Looks good to me


Labels: PR adds documentation to docs/contributing/forge-abstraction.md

@fullsend-ai-review fullsend-ai-review Bot added ready-for-merge All reviewers approved — ready to merge component/docs User-facing documentation labels Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/docs User-facing documentation ready-for-merge All reviewers approved — ready to merge ready-for-review Agent PR ready for human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add authorization guidance for destructive forge operations to forge-abstraction.md

0 participants