T09 · Insecure Skill Coding Practices
- Location
scripts/theme-manager.js:143- Finding
Output Directory Containment Check Can Be Bypassed Using Sibling Paths
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
Review before installing: the Ghost CMS access is mostly disclosed and purpose-related, but the package includes a script that can overwrite a hard-coded Ghost post and a theme download path bug that can write outside the intended directory.
Install only if you are comfortable granting full Ghost Admin access. Use a staging site or a dedicated integration key, avoid running scripts/update-teapot.js, review all publish/delete/theme commands before execution, and be cautious with theme downloads until the output-path validation is fixed.
scripts/theme-manager.js:143Output Directory Containment Check Can Be Bypassed Using Sibling Paths
scripts/update-teapot.js:465Bundled Script Unconditionally Overwrites a Hard-Coded Ghost Post
The declared description promises a comprehensive Ghost CMS integration with broad operational coverage across content management, members, newsletters, moderation, analytics, and all Ghost Admin API operations. The supplied code does something much narrower: it authenticates to Ghost Admin API using a locally stored key and URL, validates an endpoint string, and issues a single API request from the command line. Although the helper function technically accepts method and data parameters, the exposed CLI path only uses the endpoint argument and performs a GET request. There is no implemented logic for creating or publishing posts, scheduling content, managing members or newsletters, moderating comments, or retrieving analytics-specific summaries. Therefore the description materially overstates the actual behavior and capabilities of this code chunk.
The code accurately supports part of the description related to blog content creation, publishing, scheduling, and post management. However, the declared description significantly overstates scope: this script only interacts with Ghost post endpoints and provides CRUD plus publish/schedule actions for posts. There is no implementation for newsletters, members, subscription tiers, comments, analytics, or the full range of Ghost Admin API operations. Reading local API credentials and generating JWTs are supporting details, not mismatches. The material mismatch is that the declared purpose describes a comprehensive Ghost integration, while the actual behavior is a narrow post-management utility.
The description presents this skill as a full-featured Ghost CMS integration supporting essentially all admin workflows. The supplied code chunk is much narrower: it is a content-formatting helper that builds Ghost Lexical documents and card payloads, plus a small CLI for converting text/JSON into Lexical JSON. While this supports Ghost content creation indirectly, it does not interact with Ghost APIs, authenticate, manage posts remotely, handle members, moderate comments, or retrieve analytics. Therefore the declared description materially overstates the implemented behavior and primary purpose.
The description substantially overstates the skill's scope. The code is not a comprehensive Ghost CMS integration; it is a specialized snippet-extraction script. Its only Ghost interaction is reading a specific post via the Admin API. It does not create or manage posts, newsletters, members, comments, or analytics. Additionally, it writes extracted snippets to local JSON files, which is a concrete behavior absent from the declared purpose. This is a clear description-behavior mismatch in primary purpose and supported capabilities.
The description presents a broad, comprehensive Ghost CMS skill for managing content, newsletters, members, comments, and analytics across the Ghost Admin API. The supplied code does something much narrower: it is a standalone CLI script dedicated to theme management. Its actual API usage is limited to /themes endpoints for listing, uploading, activating, deleting, and downloading themes, plus writing downloaded ZIP files locally. This is a materially different primary purpose from the declared description, and most advertised capabilities are absent. Therefore the description does not accurately represent the code.
This is a clear description-behavior mismatch. The declared purpose describes a broad Ghost CMS integration focused on Admin API functionality for managing content, members, comments, newsletters, and analytics. The supplied code instead implements a command-line theme validator for local theme directories/ZIPs using gscan. Its inputs are filesystem paths and CLI flags; its outputs are console messages/JSON and process exit codes. There is no network communication, no authentication, no Ghost Admin API usage, and no CMS management capabilities. Theme validation is Ghost-related, but it is materially different from the declared primary purpose and omitted from the description.
The declared description describes a broad, general-purpose Ghost CMS skill with support for many Admin API domains. The supplied code is much narrower: it is a one-off script that authenticates to Ghost and updates a single hardcoded post using a PUT request. While it does interact with the Ghost Admin API, it does not expose or implement the wide range of capabilities claimed in the description. This is a material description-to-behavior mismatch due to overstating scope and functionality.
The declared description says this skill is a broad Ghost CMS integration supporting creation, publishing, scheduling, management of content, newsletters, members, comments, analytics, and all Ghost Admin API operations. The supplied code does something much narrower and materially different: it manages local JSON snippet files on disk and can inject snippet cards into a Lexical document structure. Its operations are local file I/O (load/save/list/delete/copy snippets) plus content array insertion. There are no network calls, no Ghost API usage, no authentication, and no logic for posts, newsletters, members, comments, or analytics. This is a clear description-behavior mismatch because the primary purpose and capabilities are substantially different from what is declared.
The code chunk does not interact with Ghost CMS, network APIs, blog content, members, comments, or analytics at all. Its actual purpose is managing local snippet-library storage and configuration on disk, including reading environment variables, creating directories, saving a config JSON file, and migrating local snippet files. This is a materially different primary purpose from the declared comprehensive Ghost CMS integration, so the description does not accurately represent the code.
Referenced artifact was not completely inspected
node scripts/snippet-extractor.js my-snippets-post
Referenced artifact was not completely inspected
node scripts/snippet-extractor.js my-snippets-post
Referenced artifact was not completely inspected
node scripts/snippet-extractor.js my-snippets-post
Referenced artifact was not completely inspected
node scripts/snippet-extractor.js my-snippets-post
Referenced artifact was not completely inspected
node scripts/snippet-extractor.js my-snippets-post
Referenced artifact was not completely inspected
node scripts/snippet-extractor.js my-snippets-post
Referenced artifact was not completely inspected
node scripts/snippet-extractor.js my-snippets-post
Referenced artifact was not completely inspected
node scripts/snippet-extractor.js my-snippets-post
Referenced artifact was not completely inspected
node scripts/snippet-extractor.js my-snippets-post
Referenced artifact was not completely inspected
node scripts/snippet-extractor.js my-snippets-post
Referenced artifact was not completely inspected
node scripts/snippet-extractor.js my-snippets-post
Referenced artifact was not completely inspected
node scripts/snippet-extractor.js my-snippets-post
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).
**Content Management:**
- **POST /posts/** - Create draft post
- **PUT /posts/:id/** - Update post (can publish if status changed!)
- **DELETE /posts/:id/** - Delete post permanently
- **POST /pages/** - Create page
- **PUT /pages/:id/** - Update page (can publish!)
- **DELETE /pages/:id/** - Delete page permanently
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).
- **DELETE /posts/:id/** - Delete post permanently
- **POST /pages/** - Create page
- **PUT /pages/:id/** - Update page (can publish!)
- **DELETE /pages/:id/** - Delete page permanently
**🚨 CRITICAL:** Setting `status: "published"` makes content **immediately public**
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).
**Organization:**
- **POST /tags/** - Create tag
- **PUT /tags/:id/** - Update tag
- **DELETE /tags/:id/** - Delete tag (affects all tagged posts)
**Members & Subscriptions:**
- **POST /members/** - Add member
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).
**Members & Subscriptions:**
- **POST /members/** - Add member
- **PUT /members/:id/** - Update member (can change subscription status)
- **DELETE /members/:id/** - Delete member permanently
- **POST /tiers/** - Create pricing tier
- **PUT /tiers/:id/** - Update tier pricing/benefits
- **DELETE /tiers/:id/** - Archive tier
Detected: suspicious.generated_source_template_injection