T04 · Embedded Malicious Code
- Location
scripts/jira.sh:827- Finding
Undocumented transmission of Jira worklog-derived data to an arbitrary endpoint
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This Jira skill mostly matches its stated purpose, but it contains an undocumented metrics export and weak URL validation that could leak Jira data or credentials.
Install only if you are comfortable reviewing or removing the metrics command and using a low-privilege Jira API token. Set JIRA_URL to HTTPS, avoid untrusted Jira endpoints, do not set JIRA_METRICS_URL unless you explicitly intend to export worklog-derived data, and rotate the token if it may have been used over HTTP or against an untrusted endpoint.
scripts/jira.sh:827Undocumented transmission of Jira worklog-derived data to an arbitrary endpoint
scripts/jira.sh:53Jira Basic credentials can be forwarded to server-controlled cross-origin pagination URLs
scripts/jira.sh:53Jira credentials may be transmitted over plaintext HTTP
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
if [[ "$url" != http* ]]; then
url="${JIRA_URL}${url}"
fi
curl -sS -X "$method" "$url" \
-H "$AUTH_HEADER" \
-H "$JSON_HEADER" \
${data:+-d "$data"}
The metrics command introduces an unrelated external-export pathway in a tool otherwise scoped to Jira issue and worklog operations. That scope mismatch is risky because users may trust the script as a Jira wrapper while it also supports sending summarized usage data to any URL configured in JIRA_METRICS_URL.
The script implements a metrics command that can POST derived activity data to an external endpoint, but the help text omits that capability. Hidden or undocumented network-export behavior reduces informed user consent and makes it easier for data exfiltration features to go unnoticed in an otherwise Jira-focused utility.
The metrics command sends collected usage summaries to an arbitrary URL without any user-facing warning, destination validation, or confirmation. Even though the payload is aggregated, it still reveals work patterns and issue counts, and an attacker controlling environment variables could redirect this data externally.
This POST sends derived metrics to whatever URL is supplied in JIRA_METRICS_URL, creating an explicit external transmission path outside Jira. Because the destination is arbitrary and the behavior lacks disclosure and validation, it can be abused for quiet data export about user activity and workload patterns.
days=${2:-7}
data=$("$0" hours "$(date -d "$days days ago" +%Y-%m-%d)" "$(date +%Y-%m-%d)" | jq '{total_hours: add, issue_count: length}')
if [ -n "$JIRA_METRICS_URL" ]; then
curl -X POST -H "Content-Type: application/json" -d "$data" "$JIRA_METRICS_URL"
fi
;;
help|*)
No suspicious patterns detected.