Back to skill

Security audit

Jira OpenClaw

Security checks for vulnerabilities and agentic risk

Overview

This Jira skill is coherent but should be reviewed because it gives an agent broad authenticated Jira API access and suggests automated Jira mutations without strong built-in limits.

Install only if you are comfortable giving the agent reusable Jira authority. Use a least-privileged Jira token, restrict it to specific projects, add endpoint and method allowlists before letting the agent call `jira.sh`, avoid automatic due-date mutation unless explicitly approved, and consider storing secrets in a proper secret manager instead of a sourced shell file.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:43
Finding
Unrestricted Authenticated Jira API Helper<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 43-56 **Vulnerability Type**: Unrestricted privileged API access **Risk Level**: High ### Complete Code Snippet ```bash METHOD="${1:?Usage: jira.sh <METHOD> <endpoint> [body]}" ENDPOINT="${2:?Usage: jira.sh <METHOD> <endpoint> [body]}" BODY="${3:-}" URL="${JIRA_URL%/}${ENDPOINT}" if [ -n "$BODY" ]; then curl -s --http1.1 -X "$METHOD" \ -u "${JIRA_EMAIL}:${JIRA_TOKEN}" \ -H "Content-Type: application/json" \ -d "$BODY" "$URL" else curl -s --http1.1 -X "$METHOD" \ -u "${JIRA_EMAIL}:${JIRA_TOKEN}" \ -H "Content-Type: application/json" "$URL" fi ``` ### Technical Analysis The helper accepts an arbitrary HTTP method, Jira endpoint, and request body from its caller. It then attaches the configured Jira credential to every request. No method allowlist, endpoint allowlist, mutation confirmation, or authorization policy is enforced by the script. Although `SKILL.md` recommends pairing the helper with `chainwatch`, that control is optional and external to the implementation. Quoting the variables prevents ordinary shell metacharacter injection through these arguments, but it does not restrict which authenticated Jira operations may be performed. Consequently, any agent or process allowed to invoke this helper receives the full effective Jira authority of the configured account rather than only the permissions required by the documented search, linking, and due-date workflows. ### Attack Path 1. A user configures `jira.env` with a Jira account or token that has read and write privileges. 2. The OpenClaw agent is permitted to invoke `jira.sh`. 3. Malicious issue content, prompt injection, or an erroneous agent decision causes the agent to select an unintended HTTP method, endpoint, or body. 4. The helper attaches `JIRA_EMAIL` and `JIRA_TOKEN` and sends the request to the configured Jira instance. 5. Jira executes the operation with all privileges granted to that creden ...[truncated 590 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Enforce an explicit allowlist of supported HTTP methods, such as `GET`, `POST`, and `PUT`, and reject all other values. - Maintain an exact or pattern-based endpoint allowlist limited to the Jira resources required by the Skill. - Separate read-only and mutation helpers so routine searches cannot implicitly exercise write authority. - Require explicit user confirmation for issue updates, transitions, links, deletions, or other consequential operations. - Reject endpoint values containing control characters, user-info components, fragments, traversal sequences, or unexpected URL schemes. - Use a dedicated, least-privileged Jira service account restricted to the necessary projects and operations. - Make endpoint policy enforcement mandatory rather than relying on an optional external `chainwatch` deployment. - Log requested methods and normalized endpoints without recording authorization headers, tokens, or sensitive response bodies. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:41
Finding
Credential File Is Evaluated as Shell Code<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 41 **Vulnerability Type**: Unsafe shell configuration loading **Risk Level**: Medium ### Complete Code Snippet ```bash source "$SCRIPT_DIR/jira.env" ``` ### Technical Analysis Bash `source` does not parse `jira.env` as a passive data file. It evaluates every line as shell code in the current process. The documented `chmod 600` permission reduces exposure, but the helper does not verify the file's owner, permissions, type, or integrity before evaluating it. If another process, unsafe automation, compromised plugin, or attacker gains write access to `jira.env`, arbitrary shell statements placed in the file execute whenever `jira.sh` runs. This converts modification of a credential configuration file into command execution under the account running OpenClaw. ### Attack Path 1. The user creates `jira.env` according to the Skill instructions. 2. An attacker or compromised local component obtains write access to that file or replaces it where directory permissions permit. 3. The attacker inserts a shell command alongside or instead of the expected variable assignments. 4. The user or agent invokes `jira.sh`. 5. Bash executes the injected statement through `source` before making the Jira request. ### Impact Assessment Successful exploitation provides command execution with the privileges of the local user running the helper. This can expose files available to that user, including the Jira token and other workspace secrets, modify workspace content, invoke network utilities, or interfere with subsequent agent activity. Exploitation requires the ability to modify or replace the credential file, so the prescribed restrictive permissions reduce but do not eliminate the risk. ]]>
Remediation
<![CDATA[ ## Remediation Suggestions - Do not evaluate the credential file with `source`. - Parse a strict key/value format using a non-evaluating parser and accept only the exact keys `JIRA_TOKEN`, `JIRA_URL`, and `JIRA_EMAIL`. - Reject command substitutions, shell expansions, malformed lines, duplicate keys, and unexpected variable names. - Before reading the file, verify that it is a regular file, is owned by the expected user, is not a symbolic link, and has no group or world permissions. - Ensure the parent `.secrets` directory is owned by the expected user and is not writable by other accounts. - Where supported, use an operating-system credential store or secret manager instead of a shell-readable environment file. ]]>

T08 · Insecure Dependencies

Warning
Location
SKILL.md:190
Finding
Unpinned External Skill Installation in Validation Instructions<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 190 **Vulnerability Type**: Unpinned third-party dependency installation **Risk Level**: Medium ### Complete Code Snippet ```bash clawhub install ancc && ancc validate . ``` ### Technical Analysis The validation command installs the external `ancc` Skill by a mutable package name without specifying a reviewed version, immutable digest, checksum, or signature requirement. The command then invokes the installed component. This creates a supply-chain trust dependency on the package registry, package namespace, and current package release. A compromised registry entry, transferred namespace, malicious update, or dependency confusion event could cause users to install and run code different from the version reviewed when this Skill was authored. ### Attack Path 1. A user follows the validation command in `SKILL.md`. 2. `clawhub install ancc` resolves the mutable package name using the configured registry. 3. The registry or package is compromised, replaced, or updated with malicious behavior. 4. The user invokes `ancc validate .`. 5. The substituted package executes with the privileges and workspace access of the invoking user. ### Impact Assessment Impact depends on the behavior and runtime permissions of the installed package. A malicious validator could read or alter project files, inspect accessible local data, modify the workspace, or make outbound network requests. If invoked from a privileged environment, the resulting scope would increase accordingly. The instruction is optional and does not itself prove that the current `ancc` package is malicious; the vulnerability is the absence of immutable dependency verification. ]]>
Remediation
<![CDATA[ ## Remediation Suggestions - Pin `ancc` to a specific reviewed version or, preferably, an immutable package digest. - Verify a trusted publisher signature and package checksum before installation or execution. - Document the expected registry and publisher identity to reduce namespace and dependency-confusion risk. - Review the pinned package and its transitive dependencies before recommending it. - Run validation in a sandbox with minimal filesystem access, no unnecessary secrets, and restricted network access. - Separate installation from execution so users can inspect and approve the resolved package before running it. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Rogue AgentSelf-Modification, Session Persistence
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (7)

Credential Access

High
Category
Privilege Escalation
Content
**Token types:**
- **API token** (id.atlassian.com → Security → API tokens) — works with Basic auth
- **PAT** (ATATT... prefix, Jira settings → Personal Access Tokens) — also works with Basic auth (`email:PAT`)

Both use the same script below. Bearer auth is NOT needed.
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
The agent reads jira.env through pastewatch MCP — it sees `__PW{CREDENTIAL_1}__` instead of the real token. The script runs credentials at the shell level (never in LLM context).

```
Agent calls exec → jira.sh sources .env → curl sends real token → response comes back
                    ↑ never in context      ↑ direct to Atlassian
```
Confidence
82% confidence
Finding
The skill explicitly describes a design where the agent can trigger a shell script that sources persistent credentials and then performs authenticated API actions on behalf of the user. Even if the token is redacted from LLM context, the capability still grants indirect use of sensitive credentials and can enable unauthorized reads or modifications if endpoint access is not tightly constrained.

Session Persistence

Medium
Category
Rogue Agent
Content
## 1. Credential Setup

```bash
mkdir -p ~/.openclaw/workspace/.secrets
chmod 700 ~/.openclaw/workspace/.secrets
echo ".secrets/" >> ~/.openclaw/workspace/.gitignore
Confidence
84% confidence
Finding
The skill instructs users to store long-lived Jira credentials in a persistent local file under the workspace, creating durable session/authentication material that can be reused by the agent. Persistent secrets increase blast radius if the workspace is later exposed, backed up insecurely, or accessed by other tools or users on the host.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
```bash
mkdir -p ~/.openclaw/workspace/.secrets
chmod 700 ~/.openclaw/workspace/.secrets
echo ".secrets/" >> ~/.openclaw/workspace/.gitignore

cat > ~/.openclaw/workspace/.secrets/jira.env << 'EOF'
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
JIRA_URL=https://your-org.atlassian.net/
JIRA_EMAIL=your@email.com
EOF
chmod 600 ~/.openclaw/workspace/.secrets/jira.env
```

**Token types:**
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

External Transmission

Medium
Category
Data Exfiltration
Content
URL="${JIRA_URL%/}${ENDPOINT}"

if [ -n "$BODY" ]; then
  curl -s --http1.1 -X "$METHOD" \
    -u "${JIRA_EMAIL}:${JIRA_TOKEN}" \
    -H "Content-Type: application/json" \
    -d "$BODY" "$URL"
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
94% confidence
Finding
The documented 'Overdue Bumper' cron performs live state changes in Jira by automatically advancing due dates on unresolved tickets. This is dangerous because it can silently alter operational records, hide lateness, and interfere with workflows or compliance expectations if enabled without explicit warning, approval, and guardrails.

Static analysis

No suspicious patterns detected.