google-gemini / google-gemini/gemini-cli
Security: Hook Execution Confirmation
- Dominant language
- TypeScript
- Stars
- 107k
- Forks
- 14.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 45
Description
# Security: Hook Execution Confirmation
## Description
Currently, hooks execute locally without explicit user confirmation. While this provides a seamless experience, it introduces security risks, especially for hooks defined in project repositories or installed via extensions. We should investigate requiring user confirmation before a hook executes, particularly for the first instance of a specific hook being run.
## Proposed Changes
- Implement a confirmation mechanism for first-time hook execution.
- Store "approved" hook fingerprints in user settings to avoid repeated prompts.
- Differentiate between user-defined hooks (high trust) and project/extension hooks (lower trust).
## Acceptance Criteria
- [ ] Users are prompted to confirm execution of a new hook.
- [ ] Users can "always allow" a specific hook.
- [ ] Hooks from `~/.gemini/settings.json` are implicitly trusted or have a higher threshold for prompts.
Contributor guide
Assessment
This issue has not been assessed yet.