T09 · Insecure Skill Coding Practices
- Location
scripts/preny-handler.js:6- Finding
Bearer Credentials Can Be Redirected to an Arbitrary Network Endpoint
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This appears to be a Preny analytics integration, but it also asks users to handle live tokens unsafely and includes under-disclosed customer conversation and reply capabilities.
Review carefully before installing. Prefer a read-only, scoped Preny API credential rather than a copied browser session token, do not store tokens in ~/.bashrc, verify requests only go to trusted Preny API hosts, and avoid using the conversation or reply scripts unless you explicitly need and authorize customer-support operations.
scripts/preny-handler.js:6Bearer Credentials Can Be Redirected to an Arbitrary Network Endpoint
scripts/preny-conversations.sh:28Undeclared Conversation and Customer-PII Operations Exceed the Skill's Analytics Scope
scripts/preny-conversations.sh:68Unescaped Message Content Is Interpolated Directly into a JSON Request Body
docs/how-to-get-token.md:29Documentation Recommends Persistent Plaintext Storage of the Preny Bearer Token
Advertising real-time automated sales analysis when the implementation is only manual CLI queries to specific statistics endpoints is a material transparency failure. This can mislead operators into overtrusting the scope, freshness, and automation level of the data flow, obscuring what data is actually being accessed and when.
Advertising real-time automated sales analysis when the implementation is only manual CLI queries to specific statistics endpoints is a material transparency failure. This can mislead operators into overtrusting the scope, freshness, and automation level of the data flow, obscuring what data is actually being accessed and when.
Advertising real-time automated sales analysis when the implementation is only manual CLI queries to specific statistics endpoints is a material transparency failure. This can mislead operators into overtrusting the scope, freshness, and automation level of the data flow, obscuring what data is actually being accessed and when.
YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).
h sách requests, tìm request có tên stats hoặc statistics
2. Click vào request đó
3. Chuyển sang tab Headers
4. Tìm mục Request Headers
5. Tìm dòng Authorization: Bearer <token>
6. Copy phần token (chuỗi sau "Bearer ")
# Thêm vào environment
export PRENY_TOKEN="your-token-here"
# Hoặc thêm vào bashrc để dùng lâu dài
echo 'export PRENY_TOKEN="your-token-here"' >> ~/.bashrc
source ~/.bashrc
F12)// Lấy token từ localStorage
const token = localStorage.getItem('token') ||
JSON.parse(localStorage.getItem('user') || '{}').token;
console.log('Your Preny Token:', token);
Token Preny có thời hạn (thường 7 ngày). Khi hết hạn:
The script retrieves full conversation details including customer name, phone, email, and message contents, which goes beyond the stated analytics/sales-data purpose of the skill. In this context, the mismatch is dangerous because it expands access to customer PII and live support interactions without clear necessity, increasing privacy, misuse, and unauthorized data-handling risk.
The script can send outbound messages to customers through the reply action, which is not justified by an analytics-focused skill description. Even with a local confirmation prompt, this creates a high-risk capability for unauthorized customer contact, social engineering, spam, or harmful business actions if invoked by an agent or automation in the wrong context.
The script explicitly instructs users to retrieve a live Authorization bearer token from browser DevTools and place it into an environment variable. That normalizes unsafe credential extraction and reuse of a session/API token outside its intended context, increasing the risk of account compromise, token leakage in shell history or process environments, and unauthorized API access.
The README states that users can "just ask in natural language" without defining a strict trigger scope, which makes invocation ambiguous. In a skill that grants access to real-time sales analytics and customer-related data, ambiguous triggering increases the chance of unintended execution, data exposure, or abuse through prompt overlap with normal chat.
The example trigger phrase "Thống kê hôm nay" is broad, generic language that could easily appear in ordinary conversation and unintentionally invoke the skill. Because this skill exposes business analytics through natural-language queries backed by a bearer token, accidental or opportunistic invocation could disclose sensitive sales and customer metrics to users who did not explicitly intend to run the skill.
The skill declares access to environment variables and implies network/shell-capable operation via required binaries and token use, but does not declare an explicit tool scope such as allowed-tools or permissions. This weakens least-privilege controls and makes it harder for reviewers and runtime policy to constrain what the skill can do, especially when handling customer analytics and conversation data.
The skill promotes direct connection to a third-party chatbot and real-time analysis of sales-related data but provides no warning about privacy, data transmission, or customer-information handling. In this context, the likely data includes customer conversations, phone numbers, and behavioral status, so omission of privacy disclosure increases the risk of uninformed use and regulatory or policy violations.
The manifest description and the visible documentation content are entirely in Vietnamese, with no indication that language selection is optional or that the skill is intentionally restricted to a Vietnamese-only audience. This constitutes a natural-language policy concern because it forces a locale/language without documented opt-in or justification.
The manifest explicitly advertises analysis of phone numbers, customer tags, interaction status, and new/returning customer behavior, which are privacy-sensitive data categories. There is no visible notice about consent, minimization, retention, access controls, or safe handling, so users may expose regulated personal data to the skill without understanding the privacy implications.
The document instructs users to extract a live bearer token from browser traffic and persist it in shell environment configuration, which increases the chance of credential leakage through shell history, shared accounts, backups, or local compromise. While meant for convenience, these steps normalize unsafe handling of a sensitive authentication secret that grants access to business data.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
set -e
API_URL="${PRENY_API_URL:-https://api.preny.ai/v1}"
API_KEY="${PRENY_API_KEY}"
WORKSPACE_ID="${PRENY_WORKSPACE_ID}"
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
set -e
API_URL="${PRENY_API_URL:-https://api.preny.ai/v1}"
API_KEY="${PRENY_API_KEY}"
WORKSPACE_ID="${PRENY_WORKSPACE_ID}"
This shell script performs HTTP requests with authentication headers and retrieves analytics and conversation data, but the code provides no user-facing notice before these network operations occur. Although missing credentials are reported, there is no warning that running commands will contact a remote service and transmit workspace-identifying information.
User-facing strings throughout the script, including command descriptions and output, are in Vietnamese only. This imposes a specific language on users without opt-in or justification, which matches the language/locale policy violation criteria.
The skill is described as a real-time sales analytics tool, but it also exposes operational customer conversation queues and message previews. This is a scope mismatch that can lead users to grant or use the tool for analytics while unintentionally disclosing customer communications data beyond the stated purpose.
The code prints customer-facing conversation metadata and previews of last messages, which may contain personal, confidential, or commercially sensitive information. Because this access is not justified by the stated analytics purpose, it increases the risk of unauthorized data exposure and privacy violations.
The script emits user-facing prompts and status text in Vietnamese, beginning with the conversation list header, and continues this pattern throughout the file. This enforces a specific language choice without offering the user a locale option or documenting that the skill is intentionally region-specific.
This POST request transmits operator-supplied message content to an external service, affecting real customers and data outside the local environment. External transmission is expected for API clients, but here it is security-relevant because the skill's stated purpose is analytics, while this call performs customer messaging and can be abused for unauthorized outbound communication.
exit 0
fi
response=$(curl -s -X POST \
"${API_URL}/conversations/${CONV_ID}/messages" \
-H "Authorization: Bearer ${API_KEY}" \
-H "X-Workspace-ID: ${WORKSPACE_ID}" \
This code sends date-range query parameters to an external Preny API and includes a bearer token from the environment in the request headers. Although the file comments describe API usage, there is no confirmation prompt or explicit user-facing warning that the user's query will trigger outbound requests using configured credentials.
The tag statistics handler performs external HTTP requests with bearer authentication, but the file provides no user disclosure that asking about tags causes data retrieval from a remote service. This is a safety-relevant external data access operation under the missing-warning rule for code files.
This function issues authenticated network requests to fetch system-tag data, which can affect privacy expectations because user/system data is sent to a remote API. There is no confirmation, visible notice, or warning in this code path to disclose that behavior to the user.