Skip to content

Pre/Post hooks safety controls #100

Closed

Description

@httpdss

Summary
Hooks run with shell=true which is powerful but may be risky by default. Provide safety controls.

Proposed changes

  • Add --no-hooks flag to skip all hooks.
  • Add confirmation prompt when hooks will run unless --yes or --non-interactive is set.
  • Optional allowlist file (e.g., .struct-hooks-allowlist) to restrict executable commands.

Files

  • struct_module/commands/generate.py (_run_hooks and execute)
  • docs/hooks.md

Acceptance criteria

  • Users can skip hooks or run non-interactively without prompts.
  • Allowlist behavior documented and covered by tests.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions