Back to skill

Security audit

Jira PAT 管理基础版

Security checks for vulnerabilities and agentic risk

Overview

This Jira skill matches its stated purpose, but it uses Jira credentials and can modify Jira issues while giving overly broad triggers, vague examples, and unsafe credential-check guidance.

Install only if you are comfortable giving the agent Jira PAT-based access. Use a least-privilege PAT, require explicit Jira URL and issue keys in prompts, confirm any create/update/comment/transition action before it runs, and avoid the documented broad environment-variable check; verify only JIRA_PAT and JIRA_URL without printing values.

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
SKILL.md:160
Finding

Overbroad Enumeration and Exposure of Credential-Related Environment Variables

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 160–164
Vulnerability Type: Credential exposure through overbroad environment-variable enumeration
Risk Level: Medium

Vulnerable Code

bash
# Verify environment variables
echo "Configuration check:"
env | grep -E "API|KEY|TOKEN|SECRET" | sed "s/=.*/=***/"  # Linux/macOS
# Or PowerShell
# Get-ChildItem Env: | Where-Object {$_.Name -match "API|KEY|TOKEN"} | Format-Table

Technical Analysis

The connection check only needs to determine whether JIRA_PAT and JIRA_URL are configured. Instead, the documented commands enumerate all process environment variables whose names contain broad credential-related terms such as API, KEY, TOKEN, or SECRET.

The Linux/macOS command replaces values before displaying its output, which reduces direct disclosure but still reveals the names and presence of unrelated credentials. More seriously, the PowerShell alternative sends matching environment-variable objects to Format-Table without redacting their values. It can therefore print unrelated API keys, access tokens, and secrets into the terminal and Agent context.

This violates least-data-access principles and unnecessarily exposes credentials unrelated to Jira. No evidence shows that the Skill transmits these values to an external system, so active credential exfiltration is not established.

Attack Path

  1. A user configures the Skill in an environment that also contains credentials for unrelated services.
  2. The user or Agent follows the documented configuration-validation instructions.
  3. The broad name filter selects all environment variables containing API, KEY, TOKEN, SECRET, or equivalent terms.
  4. On PowerShell, Format-Table may display both the names and values of the matching variables without redaction.
  5. The exposed values enter terminal output and potentially the Agent transcript, model context, logs, screenshots, ...[truncated 859 chars]
Remediation
View remediation

Remediation Suggestions

Replace broad environment enumeration with exact presence checks for only the variables required by the Skill. Do not print their values.

For Linux/macOS:

bash
if [ -n "${JIRA_PAT:-}" ]; then
  echo "JIRA_PAT is set"
else
  echo "JIRA_PAT is not set"
fi

if [ -n "${JIRA_URL:-}" ]; then
  echo "JIRA_URL is set"
else
  echo "JIRA_URL is not set"
fi

For PowerShell:

powershell
if ([string]::IsNullOrEmpty($env:JIRA_PAT)) {
    Write-Output "JIRA_PAT is not set"
} else {
    Write-Output "JIRA_PAT is set"
}

if ([string]::IsNullOrEmpty($env:JIRA_URL)) {
    Write-Output "JIRA_URL is not set"
} else {
    Write-Output "JIRA_URL is set"
}

Additional hardening measures:

  • Never use env, set, Get-ChildItem Env:, or similar global enumeration commands for credential validation.
  • Ensure Agent transcripts and command logs do not retain authentication headers or secret values.
  • Keep Jira PAT permissions limited to the projects and operations required by the user.
  • Rotate any credential that may already have appeared in terminal output, Agent history, or logs.
  • Preserve redaction at every output boundary, including error messages and debug logs.
Vulnerability Patterns
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (6)

Vague Triggers

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The trigger condition is overly broad and mismatched to the skill's Jira-specific purpose, which can cause the agent to invoke this skill for generic analytics or visualization requests unrelated to Jira. In a skill with exec and write capabilities plus PAT-based remote actions, unintended invocation increases the chance of unnecessary network access, accidental issue modification, or use of sensitive environment credentials in the wrong context.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Manifest 描述 L004 将适用对象扩展到“企业团队”和“团队协作”场景,但版本定位表 L041-L045 明确 FREE 版目标用户为“个人用户”且“不支持团队协作”。这属于技能用途说明之间的直接冲突,会导致 skill 的预期适用范围与实际定位不一致。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The description explicitly states '支持中文交互' as a default capability, and the document is written to assume Chinese interaction without offering a language choice. Per policy, language/locale constraints should not be imposed unless the user is given an explicit option or the restriction is clearly justified.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

L056/L062/L068/L074/L080 写明核心能力“支持创建/查询/导出操作”,L104 又声明支持 csv 输出;但 L096 明确把“批量 JQL 查询与结果导出(CSV/JSON)”列为 PRO 扩展功能,L253 也称 FREE 版本不支持批量操作。该文档内部对 FREE 版实际能力的表述相互矛盾,容易误导 agent 执行超出预期的导出/批量类操作。

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The example invocation phrase '请帮我查看事务详情' is too generic because it does not require the user to specify Jira, a project key, issue key, target instance, or whether remote access is intended. In the context of a skill that can execute commands and use PAT credentials, such vague phrasing raises the risk of the agent inferring scope and performing unintended queries against a configured Jira server.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

L261 声称“所有数据本地存储,不上传云端,确保隐私安全”,但 L270 明确写明“部分功能需要网络连接访问外部 API”,且前文多处 curl 示例直接向 Jira 服务器发送事务数据。对于该技能而言,数据至少会传输到远程 Jira 实例,因此“所有数据本地存储、不上传云端”的表述与实际操作意图相矛盾。

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.