Skip to content

Commit agent permissions and a pre-commit hook #196

Open

Description

@fefi95

Priority: P2

Context

Nothing written down stops an agent from running yarn release, editing the release workflow, or committing a stray .only before CI sees it. The audit scored agentic-safety G5 at 2/4.

Do

  • Add .claude/settings.json:
    • Allow yarn compile|lint|test|check|why|npm audit and read-only git.
    • Deny yarn release, npm publish, git push --force*, and edits to .github/workflows/release.yml.
  • Add lefthook (or husky + lint-staged). It should run eslint --fix on staged files and use a grep to reject .only( in test files. Keep it under 5 s.

Done when

  • A commit containing it.only is rejected locally.
  • yarn release is denied in a Claude Code session opened in the repo.

Source: code audit of stackbuilders/assertive-ts at e81a614 (2026-10-13) plus open Vanta/Dependabot findings.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions