Skip to content

The ldh plugin ships no hook: the skills pass its settings to ldh - #536

Open
namedgraph wants to merge 1 commit into
developfrom
fix/plugin-no-hooks
Open

namedgraph wants to merge 1 commit into
developfrom
fix/plugin-no-hooks

Conversation

@namedgraph

Copy link
Copy Markdown
Member

The plugin directory refuses this version of the ldh plugin. It accepts command hooks and script files only from verified organizations, and #521 added both: a SessionStart command hook (hooks/hooks.json) and the shell script it runs (hooks/ldh-env.sh). The hook exported the plugin's settings as LDH_BASE, LDH_CERT_FILE and LDH_CERT_PASSWORD for the ldh CLI.

What changes

  • hooks/ is removed. The plugin now ships only Markdown, JSON and its icon.
  • The skills pass the settings themselves. Each skill's setup tells the agent to start every Bash command that runs ldh with export LDH_BASE='${user_config.ldh_base}' LDH_CERT_FILE='${user_config.cert_file}';. Claude Code substitutes a non-sensitive userConfig value into skill text, and nothing else a plugin ships reaches the environment of Bash commands.
  • The certificate's password is no longer a plugin setting. A sensitive value is not substituted into skill text, it becomes a placeholder, so the plugin cannot hand it to ldh without a hook. ldh already reads LDH_CERT_PASSWORD; the user sets it in their own environment, for example the env block of ~/.claude/settings.json. The skills still forbid reading secrets/, searching the disk for credentials, or guessing.
  • cert_file is a string, a path. Substitution of a file option is not documented; a string's is.
  • The README's Configure section and PRIVACY.md say the same.

Directory findings

  • Blocking: "Hooks of type command" and "Files outside the allowed types" are gone with hooks/.
  • "Uses hooks" goes with them.
  • "Uses a credential from the user's machine" will likely remain for LDH_CERT_PASSWORD. It is a warning, and the plugin has no other way to get the password to ldh. The PEM the container generates has an encrypted key, so it needs one too.
  • "Unrecognized field in plugin.json" (4): documentationUrl, supportUrl, termsOfServiceUrl and privacyPolicyUrl are listing fields that only the directory reads, which the warning itself exempts. They stay.

Checks

claude plugin validate plugins/ldh passes, with its directory checks reporting nothing. The plugin has no CI test of its own; the skill text is the change.

🤖 Generated with Claude Code

The plugin directory refuses command hooks and shell scripts from organizations that are not
verified, so hooks/hooks.json and hooks/ldh-env.sh go. Nothing else a plugin ships reaches the
environment of Bash commands, so the skills now start each ldh command with an export of the base
and certificate path, substituted from userConfig into the skill text. A sensitive value is not
substituted there, so the certificate's password is no longer a plugin setting: ldh reads
LDH_CERT_PASSWORD from the user's own environment. cert_file becomes a string, whose substitution is
documented, where a file option's is not.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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