Back to skill

Security audit

聘才猫(Pincaimao)面试报告

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed Pincaimao API helper that uploads interview materials for report generation, with privacy-sensitive but purpose-aligned behavior.

Install only if you are comfortable sending interview recordings/files and job descriptions to Pincaimao for processing. Review the pincaimao-basic dependency separately, protect the API key, confirm the service's retention/deletion terms, and prefer a JSON-serialized request body over the sample's direct string interpolation for real use.

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:66
Finding

Unsafe JSON Construction from Untrusted Values

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 66–74
Vulnerability Type: JSON injection through unsafe string interpolation
Risk Level: Medium

bash
curl -s -X POST 'https://api.pincaimao.com/agents/v1/chat/chat-messages' \
  -H "Authorization: Bearer $PCM_INTERVIEW_REPORT_KEY" \
  -H 'Content-Type: application/json' \
  -d "{
    \"query\": \"$FILE_NAME\",
    \"inputs\": {
      \"job_info\": \"$JOB_INFO\",
      \"file_urls\": \"$COS_KEY\"
    },
    \"response_mode\": \"blocking\"
  }" | python3 -c "import sys,json; print(json.load(sys.stdin)['answer'])"

Technical Analysis

The request body is constructed by directly interpolating FILE_NAME, JOB_INFO, and COS_KEY into a JSON string. These values are not encoded with a JSON serializer.

JOB_INFO contains user-provided content, while FILE_NAME and COS_KEY are obtained from the upload API response. If any interpolated value contains quotation marks, backslashes, control characters, or crafted JSON syntax, it can terminate its intended string value and alter the structure of the request. Ordinary legitimate input containing quotation marks or line breaks can also produce malformed JSON.

This is not direct shell command injection because shell syntax introduced through variable expansion is not reparsed as shell code. The vulnerability is confined to the construction and semantics of the authenticated JSON API request.

Attack Path

  1. An attacker supplies a crafted job description or an interview file with a crafted filename.
  2. The job description is assigned to JOB_INFO, or the upload service returns the filename as FILE_NAME.
  3. The Skill inserts the value directly into the JSON request without serialization or escaping.
  4. The crafted value closes its intended JSON string and injects additional JSON syntax, or causes the body to become malformed.
  5. The request is submitted to the Pincaimao API using t ...[truncated 799 chars]
Remediation
View remediation

Remediation Suggestions

Construct the request body with a JSON serializer rather than shell string interpolation. Pass each value to the serializer as a separate argument so quotation marks, backslashes, line breaks, and control characters are encoded correctly.

bash
PAYLOAD=$(python3 -c '
import json
import sys

print(json.dumps({
    "query": sys.argv[1],
    "inputs": {
        "job_info": sys.argv[2],
        "file_urls": sys.argv[3]
    },
    "response_mode": "blocking"
}))
' "$FILE_NAME" "$JOB_INFO" "$COS_KEY")

curl --fail-with-body --silent --show-error \
  -X POST 'https://api.pincaimao.com/agents/v1/chat/chat-messages' \
  -H "Authorization: Bearer $PCM_INTERVIEW_REPORT_KEY" \
  -H 'Content-Type: application/json' \
  --data-binary "$PAYLOAD" |
  python3 -c "import sys,json; print(json.load(sys.stdin)['answer'])"

Additionally:

  • Validate that FILE_NAME and COS_KEY returned by the upload service have the expected types and reasonable length limits.
  • Apply an appropriate size limit to JOB_INFO.
  • Reject malformed upload responses before constructing the second request.
  • Use curl --fail-with-body --silent --show-error and verify the HTTP response before parsing it as a successful API result.
  • Keep the API key restricted to only the endpoints and operations required for file upload and report generation, if the service supports scoped credentials.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (7)

YARA rule 'agent_skill_mcp_tool_poisoning_metadata': MCP/tool metadata poisoning indicators in tool schemas or skill manifests [agent_skills]

High
Category
YARA Match
Confidence
80% confidence
Finding

YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Content

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

md
---
name: pincaimao-interview-reports
description: 聘才猫 - 面试报告 Use when calling Pincaimao Interview Report API to generate an interview report or coaching materials based on a job description and interview recording file. Requires PCM_INTERVIEW_REPORT_KEY env var.
version: 1.0.1
allowed-tools:
  - Bash
metadata:
  openclaw:
    emoji: "📊"
    homepage: https://www.pincaimao.com
    primaryEnv: PCM_INTERVIEW_REPORT_KEY
    requires:
      env:
        - PCM_INTERVIEW_REPORT_KEY
      bins:
        - curl
        - python3
---

# 聘才猫 - 面试报告

**REQUIRED:** 请先检查是否已安装 `pincaimao-basic`,

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 58)May include surrounding context.

md
JOB_INFO="高级销售专员 / 销售主管,行业领先平台,完善晋升通道和培训体系"

# Step 1: 上传面试记录文件
UPLOAD=$(curl -s -X POST 'https://api.pincaimao.com/agents/v1/files/upload' \
  -H "Authorization: Bearer $PCM_INTERVIEW_REPORT_KEY" \
  -F "file=@$INTERVIEW_FILE")
COS_KEY=$(echo "$UPLOAD" | python3 -c "import sys,json; print(json.load(sys.stdin)['cos_key'])")

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 66)May include surrounding context.

md
# Step 2: 生成面试报告
# 注意:query 用文件名,file_urls(复数)传 cos_key
curl -s -X POST 'https://api.pincaimao.com/agents/v1/chat/chat-messages' \
  -H "Authorization: Bearer $PCM_INTERVIEW_REPORT_KEY" \
  -H 'Content-Type: application/json' \
  -d "{

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill's user-facing guidance from the title through setup instructions is presented in Chinese, and the file does not indicate that language selection is optional or user-configurable. This can violate language/locale policy when a skill effectively forces a specific language without user opt-in.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
94% confidence
Finding

The upload step transmits an interview record file to api.pincaimao.com, which may contain highly sensitive personal or confidential information. In context this is intended behavior, but it is still a real privacy and data-handling vulnerability if users are not clearly prompted and the transfer is performed autonomously.

Content

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

md
JOB_INFO="高级销售专员 / 销售主管,行业领先平台,完善晋升通道和培训体系"

# Step 1: 上传面试记录文件
UPLOAD=$(curl -s -X POST 'https://api.pincaimao.com/agents/v1/files/upload' \
  -H "Authorization: Bearer $PCM_INTERVIEW_REPORT_KEY" \
  -F "file=@$INTERVIEW_FILE")
COS_KEY=$(echo "$UPLOAD" | python3 -c "import sys,json; print(json.load(sys.stdin)['cos_key'])")

External Transmission

Medium
Category
Data Exfiltration
Confidence
93% confidence
Finding

The chat request sends job_info and a storage reference for the uploaded interview file to an external API. Even though the endpoint is documented and expected, the skill enables third-party processing of sensitive hiring data and therefore presents a genuine external-transmission risk.

Content

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

md
# Step 2: 生成面试报告
# 注意:query 用文件名,file_urls(复数)传 cos_key
curl -s -X POST 'https://api.pincaimao.com/agents/v1/chat/chat-messages' \
  -H "Authorization: Bearer $PCM_INTERVIEW_REPORT_KEY" \
  -H 'Content-Type: application/json' \
  -d "{

External Transmission

Medium
Category
Data Exfiltration
Confidence
93% confidence
Finding

The chat request sends job_info and a storage reference for the uploaded interview file to an external API. Even though the endpoint is documented and expected, the skill enables third-party processing of sensitive hiring data and therefore presents a genuine external-transmission risk.

Content

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

md
# Step 2: 生成面试报告
# 注意:query 用文件名,file_urls(复数)传 cos_key
curl -s -X POST 'https://api.pincaimao.com/agents/v1/chat/chat-messages' \
  -H "Authorization: Bearer $PCM_INTERVIEW_REPORT_KEY" \
  -H 'Content-Type: application/json' \
  -d "{

Static analysis

No suspicious patterns detected.