T09 · Insecure Skill Coding Practices
- Location
cmd/auth.go:19- Finding
Admin API Key Exposed Through Command-Line Arguments and Plaintext Configuration Storage
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This Ghost admin CLI is mostly coherent, but it gives an agent broad live-site authority and stores admin credentials without enough warning or scoping.
Review this before installing if you will connect it to a production Ghost site. Treat the Admin API key as a powerful secret, avoid pasting it into shared prompts or logs, consider using a staging site first, verify the selected --site before write operations, and be careful with publish, delete, schedule, image upload, and webhook commands because they can change public content or leave persistent integrations behind.
cmd/auth.go:19Admin API Key Exposed Through Command-Line Arguments and Plaintext Configuration Storage
README.md:8Installation Instructions Use an Unpinned Mutable Dependency Source
The skill description focuses on posts, pages, tags, and content management, but the documented commands also expose user and newsletter information through users, user, newsletters, and newsletter. Undisclosed access to user profile data broadens the sensitivity of the skill and may lead to unanticipated disclosure of personal or administrative information.
The skill description focuses on posts, pages, tags, and content management, but the documented commands also expose user and newsletter information through users, user, newsletters, and newsletter. Undisclosed access to user profile data broadens the sensitivity of the skill and may lead to unanticipated disclosure of personal or administrative information.
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
w.Header().Set("Content-Type", "application/json")
path := r.URL.Path
// Remove /ghost/api/admin prefix
apiPath := strings.TrimPrefix(path, "/ghost/api/admin")
// Helper to check if path is exactly /resource/ (list endpoint)
The README shows Admin API keys and environment variables without clearly warning that they are sensitive secrets. In an AI-agent or copy-paste workflow, this increases the chance that users expose credentials in shell history, logs, screenshots, transcripts, or shared config, which could enable full administrative access to a Ghost site.
This markdown file describes commands that can delete posts/pages/tags, publish or unpublish content, and create/delete webhooks that affect a production Ghost site. The README presents these operations as routine usage but does not include any caution about irreversible changes, live-site impact, or verifying the target site before running them.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
echo "# Quick Note" | ecto post create --title "Quick Note" --stdin-format markdown
The skill documents capabilities that use environment variables for secrets and appears to support actions that can modify remote Ghost content, but it declares no explicit tool scope or permissions. In an agent setting, missing scope boundaries increases the chance of over-broad execution and makes it harder for users or orchestrators to understand that the skill can access sensitive configuration and perform write operations.
The authentication section instructs users to provide Ghost Admin API keys directly on the command line and via environment variables, but it gives no warning about secret exposure. Command-line arguments can leak through shell history or process inspection, and environment-based secrets can be mishandled or logged by surrounding automation.
The skill advertises destructive and state-changing commands such as delete, publish, unpublish, and schedule without warning that they immediately alter remote Ghost content. In an agent-driven workflow, lack of explicit warnings or confirmation patterns increases the risk of accidental production changes and content loss.
Page, tag, and webhook deletion operations are documented as routine commands without highlighting that they perform destructive remote changes. This is risky because users or autonomous agents may invoke them without appreciating the operational impact on site behavior, taxonomy, or integrations.
This code file handles a sensitive credential via the --key flag, and the command flow persists it through cfg.AddSite without any user-facing warning about storing or handling the secret. While the command prints success messages, there is no disclosure that a credential is being saved or that it may end up in local configuration.
This code deletes posts and only presents a confirmation prompt when --force is not set. When --force is used, the destructive action proceeds immediately and there is no comment, docstring, or other user-facing warning in this file explaining that the flag suppresses confirmation for permanent deletion.
The manifest describes a Ghost Admin API CLI for managing blog posts, pages, tags, and content, but this test file exercises a users command path and expects No users found output. That suggests the implemented skill includes user-management functionality beyond the stated manifest scope.
This Go file includes markdown-style help content, so SQP-2 applies. The help shows a plaintext config example containing an api_key and identifies GHOST_ADMIN_KEY as an environment variable, but it does not warn users that these credentials are sensitive and should be protected from disclosure or insecure storage.
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
## Error Handling
- Returns non-zero exit code on errors
- Error messages include API error details when available
- Use --force to skip confirmation prompts on destructive operations
## Limitations
- Ghost API does not support listing images or webhooks
The manifest describes a Ghost.io Admin API CLI for managing blog posts, pages, tags, and content. This test file demonstrates implemented support for additional Admin API areas including users, site metadata, settings, newsletters, webhooks, and image uploads, which expands the effective behavior beyond the stated description.
The manifest describes the skill as a Ghost.io Admin API CLI for managing blog posts, pages, tags, and content, which does not mention webhook administration. This file adds create and delete operations for webhooks, introducing a distinct administrative capability beyond the stated scope.
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
webhookCreateCmd.Flags().String("target-url", "", "Target URL for webhook")
webhookCreateCmd.Flags().String("name", "", "Webhook name (optional)")
webhookDeleteCmd.Flags().Bool("force", false, "Delete without confirmation")
webhookCmd.AddCommand(webhookCreateCmd)
webhookCmd.AddCommand(webhookDeleteCmd)
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
webhookCreateCmd.Flags().String("target-url", "", "Target URL for webhook")
webhookCreateCmd.Flags().String("name", "", "Webhook name (optional)")
webhookDeleteCmd.Flags().Bool("force", false, "Delete without confirmation")
webhookCmd.AddCommand(webhookCreateCmd)
webhookCmd.AddCommand(webhookDeleteCmd)
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
webhookCreateCmd.Flags().String("target-url", "", "Target URL for webhook")
webhookCreateCmd.Flags().String("name", "", "Webhook name (optional)")
webhookDeleteCmd.Flags().Bool("force", false, "Delete without confirmation")
webhookCmd.AddCommand(webhookCreateCmd)
webhookCmd.AddCommand(webhookDeleteCmd)
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
webhookCreateCmd.Flags().String("target-url", "", "Target URL for webhook")
webhookCreateCmd.Flags().String("name", "", "Webhook name (optional)")
webhookDeleteCmd.Flags().Bool("force", false, "Delete without confirmation")
webhookCmd.AddCommand(webhookCreateCmd)
webhookCmd.AddCommand(webhookDeleteCmd)
The manifest describes this CLI as managing blog posts, pages, tags, and content, but this test file exercises webhook creation and deletion commands. Webhook administration is a distinct Ghost Admin API capability not mentioned in the declared skill description, indicating the implemented feature set is broader than advertised.
The example includes a realistic-looking id:secret API key format that could be copied, reused, or echoed by AI agents as if it were valid credential material. Even if the value is fictitious, realistic secret-shaped examples normalize unsafe handling and can confuse users about what should be treated as sensitive.
The remove command deletes a stored site configuration and only reports the action after it has completed. There is no confirmation prompt, pre-action warning, or explanatory comment indicating that configuration data will be removed.
No suspicious patterns detected.