Back to skill

Security audit

Snowsand Jira

Security checks for vulnerabilities and agentic risk

Overview

This Jira skill is mostly coherent, but it can make live Jira changes and can send Jira API credentials to an unvalidated URL configured in the environment.

Review before installing. Use this only with a narrowly permissioned Jira API token, set JIRA_BASE_URL only to your HTTPS Atlassian tenant, and treat all create, update, comment, transition, worklog, raw API, link, and attachment examples as live Jira changes that should be explicitly approved.

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
scripts/jira.py:24
Finding
Jira credentials can be transmitted to an arbitrary or plaintext destination<![CDATA[ ## Vulnerability Details **File Location**: `scripts/jira.py`, lines 24–50 **Vulnerability Type**: Unvalidated credential destination and insecure transport **Risk Level**: Medium ### Vulnerable Code ```python base_url = os.environ.get("JIRA_BASE_URL", "").rstrip("/") email = os.environ.get("JIRA_USER_EMAIL", "") token = os.environ.get("JIRA_API_TOKEN", "") if not all([base_url, email, token]): missing = [] if not base_url: missing.append("JIRA_BASE_URL") if not email: missing.append("JIRA_USER_EMAIL") if not token: missing.append("JIRA_API_TOKEN") print(f"Error: Missing environment variables: {', '.join(missing)}", file=sys.stderr) sys.exit(1) return base_url, email, token def make_request(method, endpoint, data=None): """Make authenticated request to Jira API.""" base_url, email, token = get_config() url = f"{base_url}{endpoint}" import base64 auth = base64.b64encode(f"{email}:{token}".encode()).decode() headers = { "Authorization": f"Basic {auth}", "Accept": "application/json", } ``` The request containing this header is subsequently sent at lines 57–60: ```python req = Request(url, data=body, headers=headers, method=method) try: with urlopen(req) as resp: ``` ### Technical Analysis The script obtains `JIRA_BASE_URL` directly from the environment and concatenates it with an API endpoint without validating its scheme, hostname, port, or origin. It then sends the Jira user email and API token in an HTTP Basic Authorization header to the resulting URL. Base64 encoding is the encoding required by HTTP Basic authentication; it is not encryption. Anyone who receives the header can trivially recover the email and token. The encoded value is not printed to stdout by this script, so the pre-scan warning about direct encoded-secret output is not confirmed. Network transmission of credentials is nece ...[truncated 2021 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Parse `JIRA_BASE_URL` with `urllib.parse.urlsplit` before using it. 2. Require the `https` scheme and reject plaintext HTTP. 3. Reject URLs containing user information, query strings, or fragments. 4. Restrict the hostname to the organization's explicitly configured Jira tenant. If appropriate for the deployment, permit only a specific `*.atlassian.net` hostname rather than every subdomain. 5. Reject unexpected ports and malformed hostnames. 6. Ensure authentication headers are never forwarded to a different origin during redirects. Prefer disabling redirects for authenticated API calls or validating every redirect target before following it. 7. Keep the API token in a protected secret store or narrowly scoped environment variable, and provision a token with only the Jira scopes required by the intended operations. 8. Avoid logging the Authorization header, email/token pair, environment contents, or complete request objects. 9. Add automated tests confirming that HTTP URLs, attacker-controlled hosts, cross-origin redirects, URLs containing user information, and malformed URLs are rejected. A hardened configuration check should follow this pattern: ```python from urllib.parse import urlsplit def validate_base_url(value): parsed = urlsplit(value) if parsed.scheme != "https": raise ValueError("JIRA_BASE_URL must use HTTPS") if not parsed.hostname: raise ValueError("JIRA_BASE_URL must contain a hostname") if parsed.username or parsed.password: raise ValueError("JIRA_BASE_URL must not contain user information") if parsed.query or parsed.fragment: raise ValueError("JIRA_BASE_URL must not contain a query or fragment") if parsed.hostname != "yourcompany.atlassian.net": raise ValueError("JIRA_BASE_URL is not an approved Jira tenant") if parsed.port not in (None, 443): raise ValueError("JIRA_BASE_URL uses an unexpected port") return value.rstrip("/") ` ...[truncated 8 chars]
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (8)

Tainted flow: 'req' from os.environ.get (line 55, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Content
req = Request(url, data=body, headers=headers, method=method)
    
    try:
        with urlopen(req) as resp:
            content = resp.read().decode()
            return json.loads(content) if content else {}
    except HTTPError as e:
Confidence
90% confidence
Finding
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Lp3

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding
The skill documents use of environment variables and outbound network access to Jira, but it does not declare any tool scope such as permissions or allowed-tools. That omission weakens execution guardrails and can allow the skill to be invoked with broader capabilities than users or the platform expect, especially because it can read credentials from the environment and perform remote actions.

Vague Triggers

Medium
Confidence
96% confidence
Finding
The trigger language is very broad, including phrases like any Atlassian Jira Cloud task, which increases the chance of unintended invocation. In a skill that can create, update, transition, comment on issues, and log work, accidental activation can lead to unintended changes in production project data.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The description advertises issue creation and updates but does not clearly warn that these operations modify remote Jira data. This is dangerous because users may treat the skill as informational while it is actually capable of making authenticated state changes in an external system.

External Transmission

Medium
Category
Data Exfiltration
Content
"$JIRA_BASE_URL/rest/api/3/issue/PROJ-123" | jq .

# POST request
curl -s -X POST -u "$JIRA_USER_EMAIL:$JIRA_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"body": {"type": "doc", "version": 1, "content": [{"type": "paragraph", "content": [{"type": "text", "text": "Comment"}]}]}}' \
  "$JIRA_BASE_URL/rest/api/3/issue/PROJ-123/comment" | jq .
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
```bash
# Create link
curl -X POST -u "$JIRA_USER_EMAIL:$JIRA_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "type": {"name": "Blocks"},
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The skill exposes state-changing Jira operations such as create, update, comment, transition, and worklog without any confirmation, dry-run mode, or user-visible warning before execution. In an agent setting, ambiguous prompts, prompt injection from issue content, or mistaken tool selection could cause unintended writes to production Jira data, workflow changes, or audit-affecting worklog entries.

Missing User Warnings

Low
Confidence
80% confidence
Finding
The authentication section instructs users to supply an account email and API token but provides no warning about protecting those credentials or avoiding logging and sharing them. While this is standard for Jira API usage, omitting basic credential-handling guidance increases the risk of accidental exposure.

Static analysis

No suspicious patterns detected.