Back to skill

Security audit

Jenkins Plugin Skeleton Generator Skill

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent Jenkins plugin skeleton generator, though users should review generated credential-handling code before using it in Jenkins.

Install only if you want an AI-assisted Jenkins plugin skeleton generator. Before using generated plugins in production, review any credential, token, password, persistent configuration, listener, or periodic-task code; replace secret-bearing String fields with Jenkins Secret-backed handling and confirm generated plugin behavior before uploading it to Jenkins.

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

Warning
Location
templates/config-jelly.md:25
Finding

Generated Jenkins Plugins May Persist Secrets as Plaintext Strings

Content
View full analysis
` | `` | | `boolean` | `` | `` | | `int` | `` | `` | | `String`(多行) | `` | `` | | `String`(密钥) | `` | `` | | 枚举选择 | `` | `...` | ``` `references/jelly-reference.md:23-28`: ```xml ### `` — 密码输入框 ```xml ``` ``` `templates/plugin-configuration.md:11-23`: ```java public class PluginConfiguration extends AbstractDescribableImpl implements Serializable { private final String key; private final String value; @DataBoundConstructor public PluginConfiguration(String key, String value) { this.key = key; this.value = value; } public String getKey() { return key; } public String getValue() { return value; } ``` ### Technical Analysis The skill recommends using a Java `String` for a secret and binding it to Jenkins' `` form control. This control masks the value in the browser but does not, by itself, provide encrypted server-side storage. The accompanying persistent-configuration template stores configurat ...[truncated 2025 chars]
Remediation
View remediation
` for masked input, but explicitly document that it only protects browser presentation and must be paired with `Secret` for protected persistence. 3. Convert a secret to plaintext only at the final authorized use point: ```java String tokenValue = Secret.toString(apiToken); ``` Do not log, serialize separately, or return `tokenValue` through Stapler-accessible methods. 4. Create separate templates for ordinary configuration values and confidential values. Do not describe a secret as a "`String` (secret)" field. 5. Review generated getters and UI exposure. Avoid methods that unnecessarily return plaintext credentials, and ensure secret values are not included in logs, exception messages, build output, telemetry, or generated README examples. 6. Add tests that save and reload plugin configuration and verify that the raw credential does not appear in the resulting Jenkins XML configuration file. 7. Update both `templates/config-jelly.md` and `references/jelly-reference.md` with a warning and a complete `Secret`-backed Java example so future generated plugins consistently use encrypted-at-rest Jenkins configuration semantics. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (16)

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · templates/readme-template.md (reported line 5)May include surrounding context.

markdown
# {{PLUGIN_DISPLAY_NAME}}
<!-- 示例: "构建审计插件" -->

{{PLUGIN_DESCRIPTION}}
<!-- 示例: "记录每次构建的关键信息到日志,支持自定义日志级别和输出格式" -->

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · templates/readme-template.md (reported line 5)May include surrounding context.

markdown
# {{PLUGIN_DISPLAY_NAME}}
<!-- 示例: "构建审计插件" -->

{{PLUGIN_DESCRIPTION}}
<!-- 示例: "记录每次构建的关键信息到日志,支持自定义日志级别和输出格式" -->

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The README says 'Say something like this' and lists phrases such as 'Create a Jenkins plugin for me' and 'Generate a Jenkins Builder plugin skeleton' without defining stricter trigger boundaries or exclusion conditions. These examples are understandable but still broad enough that normal conversation about wanting a Jenkins plugin could unintentionally invoke the skill.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The documented trigger phrases are broad natural-language requests such as creating a Jenkins plugin, which can easily overlap with ordinary conversation and unintentionally activate the skill. In an agent environment, accidental invocation can cause the model to enter a code-generation workflow, request additional inputs, or produce project files when the user did not explicitly intend to use this specific skill.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The markdown title and inline comments are written in Chinese throughout the file, with no indication that other languages are supported or that the template is intended only for a Chinese-speaking audience. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The template's getDisplayName method hard-codes a Chinese user-facing label, which would force that locale in downstream generated skills or plugins. This is a natural-language policy issue because the file provides no localization mechanism, fallback, or documented region-specific justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The template’s headings, instructions, examples, and descriptive text are entirely in Chinese, which implicitly constrains generated skill documentation to a specific language. This is a natural-language policy concern because the file does not provide any opt-in, alternative locale, or justification that the template is region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

This markdown file contains user-facing instructional content exclusively in Chinese, and there is no indication that the skill is region-specific or that users can opt into another language. Under the language/locale policy rule, forcing a specific language without opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

This markdown file is entirely written in Chinese, including the title and all table content, with no indication that the skill is intended only for Chinese-speaking users or that another language option is available. Under the policy rules, forcing a specific language without user opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

该 markdown 文件的标题与全部操作说明均以中文编写,未见提供其他语言选项、用户选择机制,或对语言限制的明确说明。根据规则,强制单一语言且无用户 opt-in 属于自然语言层面的语言/locale 政策风险。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

This markdown file presents its title in Chinese, and the embedded template also includes Chinese comments and display text, indicating a fixed locale for user-facing content. Because the file does not offer any opt-in language choice or explain that it is intended only for a Chinese-speaking context, it conflicts with the policy against forcing a specific language without user choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The document title is written entirely in Chinese, which implies a fixed language choice for the skill content without offering the user a language or locale option. Under the policy criteria, forcing a specific language without opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

This markdown template presents headings and inline guidance exclusively in Chinese, such as the title and multiple placeholder comments. Under the policy rules, forcing a specific language without user opt-in or justification is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file begins with a Chinese-only heading, which can indicate a language/locale preference imposed on users without opt-in. The policy allows fixed locale behavior only when user choice is offered or the locale restriction is clearly documented and justified, which is not present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The title is written in Chinese ('Maven 仓库配置片段'), which imposes a specific language in the skill content without any visible user opt-in or explanation that the skill is intended for a Chinese-speaking or region-specific audience. This is a natural-language policy concern because the file provides no alternative language option or documented locale constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown template presents its title and explanatory comments entirely in Chinese, which can impose a language choice on users without any opt-in or justification. The policy explicitly calls for flagging language or locale constraints when the skill does not offer a user choice or document a valid regional reason.

Content

No source excerpt is available for this finding.