Back to skill

Security audit

Jenkins Build

Security checks for vulnerabilities and agentic risk

Overview

This Jenkins helper is not clearly malicious, but it needs review because it can trigger CI builds and includes plaintext administrator credentials without strong user-control safeguards.

Review before installing. Only use this with a Jenkins instance where triggering the worker and user jobs is intended, remove or rotate the published administrator credentials, prefer a least-privilege token or user, and require explicit confirmation before any build is triggered.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
config.md:22
Finding

Hardcoded Jenkins Administrator Credentials

Content
View full analysis

Vulnerability Details

File Locations:

  • SKILL.md:56-57
  • config.md:22-24

Vulnerability Type: Hardcoded administrative credentials and plaintext secret exposure
Risk Level: High

Vulnerable Code

SKILL.md:56-57:

markdown
- Jenkins 地址:`http://localhost:8080`
- 默认账号密码:`admin/admin`(如需要 API 方式)

config.md:22-24:

markdown
- **地址**: http://localhost:8080
- **账号**: admin
- **密码**: admin

Technical Analysis

The Skill package publishes a fixed Jenkins administrator username and password in plaintext. Anyone who can read the distributed package learns credentials that may provide administrative access to the Jenkins instance.

Binding Jenkins to localhost reduces direct network exposure but does not provide an adequate security boundary. The endpoint may remain accessible to other local users, compromised processes, containers sharing the host network, malicious browser contexts, or remote users through port forwarding and proxy configuration. The risk would increase further if Jenkins were later bound to another interface without changing the documented credentials.

Jenkins administrators can ordinarily manage jobs, credentials, plugins, nodes, and build configuration. Depending on the Jenkins deployment and agent permissions, control over build definitions can provide an indirect command-execution path on the controller or connected build agents.

Attack Path

  1. An attacker obtains or reads the Skill package and extracts the documented admin/admin credentials.
  2. The attacker gains access to http://localhost:8080, such as through local execution, a compromised process, a shared container network, port forwarding, or an exposed proxy.
  3. The attacker authenticates to Jenkins using the hardcoded credentials.
  4. If the default credentials remain active, the attacker accesses administrative Jenkins functions.
  5. The attacker triggers or modifies jobs, accesses b ...[truncated 1086 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove the username and password from SKILL.md, config.md, repository history, packaged releases, examples, and generated artifacts.
  2. Immediately disable or rotate the exposed admin/admin credentials; do not assume that deleting the documentation invalidates an already disclosed password.
  3. Create a dedicated Jenkins service identity that can only trigger the explicitly approved worker and user jobs and inspect their queue or build status.
  4. Deny that identity permissions to administer Jenkins, modify jobs, manage credentials, install plugins, configure nodes, or execute unrelated builds.
  5. Retrieve credentials at runtime from an approved secret manager or protected environment injection mechanism. Do not store secrets in Skill files or command-line arguments.
  6. Prefer scoped Jenkins API tokens over reusable account passwords, and configure expiration and periodic rotation where supported.
  7. Require explicit secure configuration when credentials are unavailable rather than falling back to a documented default.
  8. Restrict Jenkins network access using host firewall rules, authenticated reverse-proxy controls, or a dedicated private interface. Avoid relying solely on a localhost URL.
  9. Review Jenkins authentication and authorization logs for use of the exposed account and investigate unauthorized job or configuration changes.
  10. Add secret scanning to development and release pipelines to prevent credentials from being republished.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (10)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

声明的核心能力是“自动化触发 Jenkins 构建任务”,但代码只是接受参数(如 worker/user),构造 http://localhost:8080/job/<job_name>/ 的页面地址,并通过 open 命令打开浏览器页面。随后明确提示用户手动点击“立即构建”按钮,或另行使用浏览器自动化工具。因此其主要目的更接近“辅助打开 Jenkins 任务页面”,而不是实际自动触发构建。虽然它确实与师傅端/用户端任务相关,但对核心功能的表述存在实质性夸大,应判定为描述与行为不匹配。

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The file exposes Jenkins access information in plaintext, including a privileged local admin username and password. Even if the Jenkins instance is described as localhost-only, agent skills often run in developer or automation environments where local services may be reachable, reused elsewhere, or exposed through port forwarding, making credential disclosure directly useful for unauthorized build access or lateral movement.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger phrases are broad enough that ordinary conversation could unintentionally activate a build-triggering workflow. Because the action can cause real CI/CD side effects, accidental invocation may consume infrastructure, produce unintended artifacts, or kick off sensitive deployment-adjacent jobs without deliberate operator intent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill describes directly clicking Jenkins 'Build Now' without a clear warning or confirmation gate before performing a state-changing action. In a CI environment, triggering builds can have operational and security consequences, especially if jobs execute privileged scripts, access secrets, or feed deployment pipelines.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

Including default Jenkins credentials ('admin/admin') in skill documentation is dangerous because it normalizes insecure access and may expose a usable weak credential on real deployments. In this context, the skill is specifically designed to trigger CI builds, so embedded credentials could enable unauthorized job execution, access to source code, secrets, or downstream deployment pipelines.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

All user-facing instructions, labels, and trigger phrases are presented exclusively in Chinese, and the file does not indicate that this is a region-specific or language-specific skill. That can violate language or locale policy when no opt-in or justified locale limitation is provided.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The header comments describe this as a 'Jenkins build trigger script,' suggesting the script itself performs the trigger action. In practice, the code only opens the page and explicitly tells the user to click 'Build Now' manually, which contradicts the stated intent in the documentation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest description promises automated build triggering for Jenkins jobs. However, the implemented behavior merely launches a browser to the job URL and instructs the user to manually click the build button, which is a materially different and less automated behavior than claimed.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The description and trigger definitions are written to activate on Chinese phrases only, with no indication that users may invoke the skill in other languages or opt into this locale restriction. That creates a language-policy concern because the skill implicitly requires a specific language without documented user choice or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

This shell script's natural-language content, including comments and usage/output messages, is entirely in Chinese. Under the policy rule for language or locale, forcing a specific language without user opt-in can be a violation unless the locale restriction is clearly documented and justified.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.