Skip to content

feat: add AllowAutoChmod flag for managing file permission modificati…#65

Merged
soulteary merged 2 commits intomainfrom
add-auto-chmod
Jan 6, 2026
Merged

feat: add AllowAutoChmod flag for managing file permission modificati…#65
soulteary merged 2 commits intomainfrom
add-auto-chmod

Conversation

@soulteary
Copy link
Copy Markdown
Owner

@soulteary soulteary commented Jan 6, 2026

…ons during hook execution


Note

Introduces optional auto-chmod for hook commands and updates execution flow to receive app configuration.

  • Adds --allow-auto-chmod CLI flag and ALLOW_AUTO_CHMOD env (default false) threaded through AppFlags
  • Updates makeSureCallable and handleHook to accept AppFlags; when enabled, attempts chmod 0755 on permission denied with explicit security warnings
  • Refactors executor: deprecates NewHookExecutor (now panics) and adds NewHookExecutorWithFunc to inject a wrapper around handleHook that includes appFlags; server now uses this wrapper
  • Adjusts hook handler creation to wrap handleHook; maintains concurrency/timeout behavior
  • Updates tests to use the new constructor and new function signatures; adds coverage for auto-chmod enabled/disabled paths

Written by Cursor Bugbot for commit 9697b07. This will update automatically on new commits. Configure here.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on March 1

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

Comment thread internal/server/executor_test.go
@soulteary soulteary merged commit 3f62d7d into main Jan 6, 2026
5 checks passed
@soulteary soulteary deleted the add-auto-chmod branch January 6, 2026 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant