T09 · Insecure Skill Coding Practices
- Location
scripts/generate-changelog.js:27- Finding
Shell Command Injection Through the Changelog --since Argument
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This GitHub management skill is mostly aligned with its stated purpose, but it handles powerful GitHub tokens and CI/CD automation in ways that need careful review before installation.
Install only if you are comfortable giving this tool GitHub repository authority. Prefer a fine-grained PAT limited to specific repositories and permissions, do not pass secrets in shell history, protect or avoid the plaintext config file, review generated workflows before committing them, and fix the command-injection and mutable-action template issues before using it in CI/CD or production deployment workflows.
scripts/generate-changelog.js:27Shell Command Injection Through the Changelog --since Argument
templates/github-actions/deploy-workflow.yml:34GitHub Actions Shell Injection Through workflow_dispatch Version Input
github-cli.js:34GitHub Personal Access Token Exposed Through Command-Line and Plaintext Storage
templates/github-actions/deploy-workflow.yml:147Mutable Third-Party GitHub Actions Receive API and Webhook Secrets
scripts/generate-changelog.js:177Arbitrary Writable File Overwrite Through the Changelog Output Path
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
## Requirements
- **Node.js**: >= 14.0.0
- **GitHub**: A [Personal Access Token](https://github.com/settings/tokens) with `repo` scope (recommended)
## Installation
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
## Requirements
- **Node.js**: >= 14.0.0
- **GitHub**: A [Personal Access Token](https://github.com/settings/tokens) with `repo` scope (recommended)
## Installation
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
## Requirements
- **Node.js**: >= 14.0.0
- **GitHub**: A [Personal Access Token](https://github.com/settings/tokens) with `repo` scope (recommended)
## Installation
Documenting a self-update command for the tool creates a supply-chain and self-modification risk if updates are fetched and applied without integrity verification, pinning, or operator review. In an agent skill context, self-updating behavior can change capabilities after trust has been established, potentially introducing malicious code or unsafe behavior later.
定期检查更新:
github self-update
查看版本信息:
A documented self-update capability can introduce unreviewed code changes into the toolchain, creating a software supply-chain risk if update sources are compromised or insufficiently verified. In a privileged GitHub management skill, updating itself could alter behavior while retaining access to repositories, deployment workflows, and tokens.
定期检查更新:
github self-update
查看版本信息:
The workflow states that production deployment requires manual approval, but the step only prints informational text and does not enforce any approval gate before continuing to the production deployment step. In a deployment pipeline, this can cause unauthorized or accidental production releases, especially because tag pushes will automatically route to production in this workflow.
This markdown file describes safety-critical actions such as deploying to production and rolling back releases, which can affect system availability and user data. While the document includes token-security notes, it does not warn users in this section about the operational impact or recommend confirmation/review before running these commands.
The example configuration enables autoDeploy for the dev environment, which introduces autonomous operational actions that may execute without sufficient human review. In a GitHub management/deployment skill, this increases the chance of unintended code releases, especially if branch protections, tests, or approval gates are weak or misconfigured.
"environments": {
"dev": {
"branch": "develop",
"autoDeploy": true
},
"prod": {
"branch": "main",
This markdown file describes safety-critical operations such as deploying to production and rolling back releases, which can directly affect system integrity and availability. Although the document has general security notes, this section does not warn users about operational risk, required approvals, or potential service impact before running these commands.
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.
"environments": {
"development": {
"branch": "develop",
"autoDeploy": true,
"notifyOnFailure": true,
"requiredChecks": ["test", "lint"]
},
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.
"environments": {
"development": {
"branch": "develop",
"autoDeploy": true,
"notifyOnFailure": true,
"requiredChecks": ["test", "lint"]
},
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.
"environments": {
"development": {
"branch": "develop",
"autoDeploy": true,
"notifyOnFailure": true,
"requiredChecks": ["test", "lint"]
},
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.
"environments": {
"development": {
"branch": "develop",
"autoDeploy": true,
"notifyOnFailure": true,
"requiredChecks": ["test", "lint"]
},
The CLI accepts a GitHub token on the command line and persists it in plaintext to .github-manager.json under the current working directory. Command-line secrets can be exposed through shell history, process listings, logs, or CI traces, and the local config file may be accidentally committed or read by other local users/processes.
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.
{
"name": "github-manager-cli",
"version": "1.0.0",
"description": "A comprehensive GitHub repository management tool with code review, auto-deployment, changelog generation, CI/CD configuration, bug tracking, and project management automation",
"main": "github-cli.js",
"bin": {
"github": "./github-cli.js"
The file's comments, CLI output, and date formatting are fixed to Chinese, including an explicit zh-CN locale at runtime. This forces a specific language/locale experience without any opt-in, selection mechanism, or documented regional limitation.
This code reads GitHub authentication data, including a token, from .github-manager.json and immediately uses it to authenticate API calls. Although the tool's purpose is code review, there is no nearby disclosure, prompt, or warning to the user in this file that sensitive credentials are being accessed from local storage.
The script builds a shell command string for git log and appends sinceTag directly before passing it to execSync. Because sinceTag can come from the --since CLI argument, an attacker can inject shell metacharacters and execute arbitrary commands in the user's environment when the script runs.
The file header, operational messages, and CLI usage are written in Chinese, which effectively forces a specific language for users. The policy allows fixed locale behavior only when user choice or a justified regional constraint is provided, neither of which appears here.
The release body asserts that security scans passed even though the workflow contains no security scanning step. This creates false security attestations that can mislead operators, auditors, or downstream users into trusting artifacts that were never scanned.
This markdown file documents actions that can modify repository state, including closing issues and creating CI/CD workflow files, but it does not explicitly warn users about reviewing targets or confirming changes before execution. For markdown files, user-facing warnings are expected when behaviors could affect user data or system integrity.
The natural-language instructions and examples are presented only in Chinese, which effectively forces a specific language for users. The file does not mention that the skill is intended only for Chinese-speaking users or provide any language/locale opt-in.
The skill documentation includes commands to create repositories and later to create, assign, and close issues, all of which change remote GitHub resources. The description does not clearly warn that these actions will modify live repository/project data, which is relevant user-impact information for a markdown skill description.
The GitHub client is initialized with a fixed time zone, which imposes a locale setting on all users of the tool. The file does not provide opt-in, configuration, or justification that this is intended only for a China-specific environment.
Using a caret range for @octokit/rest allows future compatible releases to be installed automatically, which can introduce supply-chain risk or unexpected vulnerable versions over time. In a GitHub management CLI that likely handles repository administration and API tokens, dependency drift is more sensitive than in a simple local utility.
"author": "GitHub Manager Team",
"license": "MIT",
"dependencies": {
"@octokit/rest": "^20.0.2",
"commander": "^11.0.0",
"chalk": "^4.1.2",
"inquirer": "^8.2.6",