lefthook

Pass

Audited by Gen Agent Trust Hub on Oct 17, 2026

Risk Level: SAFEEXTERNAL_DOWNLOADSREMOTE_CODE_EXECUTIONCOMMAND_EXECUTIONPRIVILEGE_ESCALATIONINDIRECT_PROMPT_INJECTIONDYNAMIC_EXECUTION
Full Analysis
  • [EXTERNAL_DOWNLOADS]: The skill provides commands to download repository setup scripts from 'dl.cloudsmith.io' for Alpine, Debian, and RPM-based Linux distributions.
  • Evidence: 'curl -1sLf https://dl.cloudsmith.io/public/evilmartians/lefthook/setup.alpine.sh' in 'references/installation/alpine.md'.
  • [REMOTE_CODE_EXECUTION]: The installation guides describe a two-step process where a script is downloaded, displayed for user review, and then executed with shell privileges.
  • Evidence: 'sudo -E bash "${setup}"' after downloading from Cloudsmith in 'references/installation/deb.md' and 'scripts/install.md'.
  • [COMMAND_EXECUTION]: The documentation contains numerous examples of shell commands for Git operations, package management (npm, yarn, pnpm, pip, gem, go install, brew, etc.), and custom hook execution.
  • Evidence: Extensive use of shell code blocks across all reference and sample files.
  • [PRIVILEGE_ESCALATION]: Installation instructions utilize 'sudo' to configure package repositories and install the Lefthook binary on Linux systems.
  • Evidence: 'sudo apk add lefthook' and 'sudo apt install lefthook' in the installation reference files.
  • [INDIRECT_PROMPT_INJECTION]: The skill documents hooks that ingest untrusted data, such as commit messages (commit-msg hook) or modified files (pre-commit hook), which could potentially contain malicious instructions targeting the agent or the developer's environment.
  • Ingestion points: Git commit messages, staged files, and remote configuration files.
  • Boundary markers: Not explicitly enforced in examples; relies on tool-specific parsing.
  • Capability inventory: Can execute arbitrary shell commands via 'run' or 'scripts' properties in 'lefthook.yml'.
  • Sanitization: Not explicitly detailed in the reference material; depends on the user's implementation of hook scripts.
  • [DYNAMIC_EXECUTION]: The configuration allows defining custom 'runner' properties for scripts (e.g., node, python, ruby) and a 'setup' property that executes commands before the main job, facilitating runtime environment preparation.
  • Evidence: Description of 'runner' in 'references/configuration/script-settings.md' and 'setup' in 'references/configuration/hook-settings.md'.
Audit Metadata
Risk Level
SAFE
Analyzed
Oct 17, 2026, 12:36 AM