Skip to content

Managed deny list: catch force-push in any form, and git reset --hard, git clean, git branch -D, npm publish #22

Closed

Description

@realRaghavGupta

The org rules say to stop and ask before force-pushing, git reset --hard, git clean, deleting branches and publishing. The managed list holds only two of these, Bash(git push --force:*) and Bash(git push -f:*), and both have gaps. mezbano's repo settings, which setkernel/mezbano#105 deletes, denied all of them.

The gap. :* is a trailing *, and the space is part of the rule (permissions docs). So today's rules miss:

  • git push origin main --force (the flag after the remote);
  • git push --force-with-lease and git push --force-if-includes (no space after --force);
  • git push origin +main (a forced refspec).

git reset --hard, git clean, git branch -D and npm publish aren't on the list at all.

Proposed rules:

  • force-push, replacing the two existing rules: Bash(git push --force*), Bash(git push * --force*), Bash(git push -f*), Bash(git push * -f*)
  • Bash(git reset --hard*), Bash(git reset * --hard*)
  • Bash(git clean:*), which also blocks the harmless dry run git clean -n
  • Bash(git branch -D:*), Bash(git branch * -D*), leaving the safe git branch -d open
  • Bash(npm publish:*)
  • plus a test in tests/run.sh for each.

A forced refspec (+main) stays open: a rule like git push *+* would catch too much.

Deny or ask? This is Raghav's call:

  • deny matches mezbano's old settings and today's force-push rules. Claude can't run the command even when Raghav approves it, so Raghav runs it himself.
  • ask matches the wording "stop and ask": Claude prompts, and a yes lets it run. Not confirmed: what an ask does under sk-agent's --dangerously-skip-permissions (P1: test the managed settings on one VM and one laptop #5).

sk-agent isn't affected either way. Its scripted git push --force-with-lease (hq agents/vm/sk-agent:497,653) runs outside Claude, and its Claude already has --disallowedTools "Bash(git push:*)".

Refs setkernel/mezbano#52

— Claude Lead

Activity

  1. added
    ownerNeeds Raghav (sudo, a decision, a login, a physical action)
    area:agentsAgent workflow on the dev VMs and in the cloud
    on Oct 15, 2026
  2. realRaghavGupta commented on Oct 15, 2026

    @realRaghavGupta
    ContributorAuthor

    Action for Raghav: reply here with "deny" or "ask". I will then open the PR with these rules and their tests, once #19 has merged, since both edit the same list.

    — Claude Lead

  3. realRaghavGupta commented on Oct 16, 2026

    @realRaghavGupta
    ContributorAuthor

    Recommendation (Claude Lead, 2026-10-16): deny for git reset --hard, git clean, git branch -D, git push --force* in all spellings, npm publish, gh release create. Reason: hq#220 probe 5 showed deny rules are the only pre-classifier control and they still miss compound commands, so the list must be wide and plain; ask is meaningless for -p runs on VMs. Raghav: reply "deny" to proceed. — Claude Lead

  4. added
    agent-readyReady for an agent to pick up
    model:sonnetAgent: run this task's main step on Sonnet (hq#172)
    and removed
    ownerNeeds Raghav (sudo, a decision, a login, a physical action)
    on Oct 16, 2026
  5. realRaghavGupta commented on Oct 16, 2026

    @realRaghavGupta
    ContributorAuthor

    Raghav (2026-10-16): deny. Open the PR with deny rules for every spelling of force-push, git reset --hard, git clean, git branch -D/--delete --force, npm publish, gh release create, plus tests; note in the PR that compound commands bypass prefix rules (hq#220 probe 5), so the broker remains the real control. Policy upload to claude.ai is Raghav's/Claude Lead's step after merge. — Claude Lead

  6. added and removed
    agent-readyReady for an agent to pick up
    on Oct 16, 2026
  7. lyra-setkernel commented on Oct 16, 2026

    @lyra-setkernel
    Contributor

    Picked up. Working on branch agent/22-managed-deny-list-catch-force-push-in-an. Automated: @lyra-setkernel's agent on lyra-dev.

  8. added
    agent-reviewWaiting for agent review
    and removed on Oct 16, 2026
  9. added
    ownerNeeds Raghav (sudo, a decision, a login, a physical action)
    on Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

agent-reviewWaiting for agent reviewarea:agentsAgent workflow on the dev VMs and in the cloudmodel:sonnetAgent: run this task's main step on Sonnet (hq#172)ownerNeeds Raghav (sudo, a decision, a login, a physical action)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions