Back to skill

Security audit

Jentic WhatsApp QR

Security checks for vulnerabilities and agentic risk

Overview

The skill does the advertised WhatsApp QR-linking job, but it also uses a stored Mattermost bearer token and direct API calls to post the QR in threads, which deserves manual review before installation.

Install only if you are comfortable letting this skill initiate a WhatsApp device-linking session after confirmation and, in Mattermost threads, read a local OpenClaw config token to upload and post the QR. Prefer a brokered or scoped messaging tool over raw bearer-token curl commands, and rotate or narrowly scope the Mattermost token if this workflow is used.

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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:47
Finding

Mattermost bearer token exposed through command-line arguments

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/qr_decode.py:58
Finding

Unbounded QR dimensions allow local memory-exhaustion denial of service

Content
View full analysis
cols, trim to cols. if rows > cols: matrix = matrix[:cols] rows = cols total_w = (cols + 2 * quiet) * scale total_h = (rows + 2 * quiet) * scale pixels = [[(255, 255, 255)] * total_w for _ in range(total_h)] for r, row in enumerate(matrix): for c, val in enumerate(row): color = (0, 0, 0) if val else (255, 255, 255) for pr in range(scale): for pc in range(scale): y = (r + quiet) * scale + pr x = (c + quiet) * scale + pc pixels[y][x] = color ``` The relevant command-line values are accepted without validation at `scripts/qr_decode.py`, lines 113–114: ```python parser.add_argument('--scale', type=int, default=10, help='Pixel scale per module (default: 10)') parser.add_argument('--quiet', type=int, default=6, help='Quiet zone modules (default: 6)') ``` ### Technical Analysis The decoder does not impose limits on: - The number of input lines. - The width of each input line. - The `--scale` value. - The `--quiet` value. - The resulting image width, height, or total pixel count. The code first creates a Python integer matrix for the decoded modules an ...[truncated 2134 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (10)

Tp4

High
Category
MCP Tool Poisoning
Confidence
89% confidence
Finding

The description understates the operational behavior: the skill does more than passive QR generation by initiating a WhatsApp linking flow and directing the agent to perform time-sensitive actions immediately. This mismatch can mislead reviewers and users about what the skill actually does, reducing informed consent and increasing the chance of unintended account-linking operations.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The description understates the operational behavior: the skill does more than passive QR generation by initiating a WhatsApp linking flow and directing the agent to perform time-sensitive actions immediately. This mismatch can mislead reviewers and users about what the skill actually does, reducing informed consent and increasing the chance of unintended account-linking operations.

Content

No source excerpt is available for this finding.

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · SKILL.md (reported line 48)May include surrounding context.

md
SHIRKA_TOKEN=$(python3 -c "import json; print(json.load(open('/root/.openclaw/openclaw.json'))['env']['vars']['JENTIC_MM_SHIRKA_TOKEN'])")

# 1. Upload the file
FILE_ID=$(curl -s -X POST "https://mattermost.claw.jentic.ai/api/v4/files" \
  -H "Authorization: Bearer $SHIRKA_TOKEN" \
  -F "channel_id=CHANNEL_ID" \
  -F "files=@/tmp/whatsapp_qr.png;filename=whatsapp_qr.png" \

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · scripts/generate_qr.py (reported line 91)May include surrounding context.

python
master_fd, slave_fd = pty.openpty()
    os.set_inheritable(slave_fd, True)
    env = os.environ.copy()
    env['COLUMNS'] = '120'
    env['TERM'] = 'xterm-256color'

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill invokes shell commands, writes files under /tmp, and reads environment-backed configuration, but it declares no explicit tool scope or permissions boundary. That increases the chance the skill is executed with broader-than-necessary capabilities and makes review, enforcement, and least-privilege controls harder.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The activation text is broad enough to match generic WhatsApp help requests, not just explicit requests to generate or scan a linking QR. In context, this is more dangerous because the skill initiates an account-linking workflow tied to a short-lived credential artifact, so accidental invocation could start a sensitive linking session the user did not clearly request.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill instructs the agent to read a bearer token from a local OpenClaw config file and use it for API calls. Accessing local credentials for a secondary delivery path expands the trust boundary significantly; if the skill is misused, modified, or triggered inappropriately, it can abuse stored credentials to act on Mattermost beyond the core QR-generation purpose.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 55)May include surrounding context.

md
| python3 -c "import json,sys; r=json.load(sys.stdin); print(r['file_infos'][0]['id'])")

# 2. Post into the thread
curl -s -X POST "https://mattermost.claw.jentic.ai/api/v4/posts" \
  -H "Authorization: Bearer $SHIRKA_TOKEN" \
  -H "Content-Type: application/json" \
  -d "{

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

The script invokes python3 and a sibling script using a relative interpreter/binary lookup and accepts a user-controlled output_path. While arguments are passed safely without a shell, this still creates execution-trust and file-write risk: a hijacked PATH could run an unexpected interpreter, and the helper script can write to arbitrary filesystem locations supplied by the caller.

Content

Scanner excerpt · scripts/generate_qr.py (reported line 61)May include surrounding context.

python
f.write('\n'.join(lines))
        tmpfile = f.name
    try:
        r = subprocess.run(
            ['python3', decoder, tmpfile, output_path,
             '--scale', str(scale), '--quiet', str(quiet)],
            capture_output=True, text=True

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/generate_qr.py (reported line 95)May include surrounding context.

python
env['COLUMNS'] = '120'
    env['TERM'] = 'xterm-256color'

    proc = subprocess.Popen(
        ['openclaw', 'channels', 'login', '--channel', 'whatsapp'],
        stdin=slave_fd, stdout=slave_fd, stderr=slave_fd,
        close_fds=True, env=env