PostHog / PostHog/warlock

Redesign: should agents be allowed to git push at all?

Open
#22 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
0
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Context

From Vincent's review on PR #13 — the current exfiltration_git_push_non_origin rule only blocks pushes to non-origin remotes. Vincent raises three points:

  1. Maybe agents should never push at all. There may not be a legitimate reason for an AI agent to push code.
  2. "origin" is just a convention. Many developers working on forks call their remote "upstream" or something else. Filtering on the word "origin" isn't reliable.
  3. Force pushes should be treated differently. A force push is more destructive and should be split into its own severity level.

Discussion needed

  • Is "block all pushes" too aggressive? Some agent workflows (auto-PR creation) do need to push.
  • Should we switch to an allow-list model (block all pushes EXCEPT to allow-listed remotes)?
  • How to handle force pushes — separate rule or higher severity within the same rule?

Origin

PR #13 review comment by @gewenyu99

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the existing exfiltration_git_push_non_origin rule and read the PR #13 review context. Resolve whether pushes should be blocked globally or by allow-listed remotes, and whether force pushes need a separate rule or severity. Done means the policy and resulting rule behavior are explicitly decided.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, typescript
Domain
security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.