T09 · Insecure Skill Coding Practices
- Location
assets/config.json:43- Finding
Operational credentials are hardcoded in the distributed configuration
- Content
View full analysis
Vulnerability Details
File Location:
assets/config.json, lines 43, 59, and 65-67
Vulnerability Type: Hardcoded secrets and plaintext credential storage
Risk Level: CriticalVulnerable Code
Sensitive values are redacted below to prevent further credential disclosure:
json "feishu_deploy_webhook": "https://open.feishu.cn/open-apis/bot/v2/hook/[REDACTED]", ... "feishu_app_id": "cli_a9393c9afd621cc4", "feishu_app_secret": "[REDACTED]", ... "jenkins": { "url": "https://jenkins.dl-aiot.com/", "user": "samual", "api_token": "[REDACTED]", "ci_job_template": "dev-{repo}-ci", "cd_job_template": "dev-{repo}-ci" }Technical Analysis
The Skill package contains a Jenkins API token, a Feishu application secret, and a credential-bearing Feishu webhook URL in plaintext. These credentials are loaded directly from the packaged configuration by
scripts/git_flow.py.This conflicts with the Skill documentation's instruction not to expose tokens and secrets. Packaging credentials alongside executable code means that any user, process, agent, artifact registry, backup, or source-control account with read access to the Skill can extract and reuse them outside the intended workflow.
The Jenkins credential is actively used for authenticated queue inspection, build triggering, and build-status polling. The Feishu webhook is actively used to post notifications. The Feishu application secret is not used by the reviewed scripts, so distributing it exceeds the minimum privileges and data required for the declared Jenkins-build-and-notify functionality.
The partially masked
github_tokenat line 3 was not treated as a confirmed usable credential.Attack Path
- An attacker obtains read access to the Skill directory, source repository, packaged artifact, backup, or deployment image.
- The attacker reads
assets/config.json. - The attacker extracts the Jenkins API token, Feishu we ...[truncated 1583 chars]
- Remediation
View remediation
Remediation Suggestions
- Immediately revoke and rotate the exposed Jenkins API token, Feishu webhook, and Feishu application secret.
- Review Jenkins and Feishu audit logs for unauthorized activity involving the exposed credentials.
- Remove all secrets from
assets/config.json, package archives, source-control history, release artifacts, caches, and backups where feasible. - Load credentials at runtime from a protected secret manager or environment variables supplied by the execution platform.
- Distribute only a non-sensitive configuration template containing endpoint and job names.
- Remove the Feishu application secret entirely if this Skill does not use application authentication.
- Replace the personal Jenkins identity with a dedicated service account restricted to the exact jobs and actions required by this Skill.
- Restrict the Jenkins account from administrative actions, credential management, script-console access, job reconfiguration, and unrelated jobs.
- Use a narrowly scoped Feishu integration dedicated to deployment notifications.
- Add automated secret scanning and commit-time protection to prevent credentials from entering future releases.
- Fail closed when required runtime secrets are absent, without printing their values in error messages or logs.
