T09 · Insecure Skill Coding Practices
- Location
scripts/config.sh:9- Finding
Credential Exfiltration Through Unrestricted API Endpoint Override
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent Cin7 inventory tool, but it can change live business data and its credential configuration can be redirected to a non-Cin7 endpoint without validation.
Review before installing. Use only with Cin7 credentials that have the minimum needed permissions, keep any .env file private, verify that CIN7_API_URL is absent or points to the official Cin7 HTTPS API, and treat create/update/stock scripts as live production changes requiring explicit user approval.
scripts/config.sh:9Credential Exfiltration Through Unrestricted API Endpoint Override
README.md:8Unpinned Package Execution in Documented Installation Command
scripts/update-order.sh:9Unsafe JSON Construction in Sales Order Update
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
#!/bin/bash
# Shared config for Cin7 Core API scripts
# Sources .env from the project root
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SKILL_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
#!/bin/bash
# Shared config for Cin7 Core API scripts
# Sources .env from the project root
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SKILL_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SKILL_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
ENV_FILE="$SKILL_DIR/.env"
if [ -f "$ENV_FILE" ]; then
# Read .env safely, stripping any Windows \r characters
The README instructs users to run npx clawhub install cin7-inventory without pinning a specific package version. This allows whatever version is current at install time to be fetched and executed, which creates a supply-chain risk if the package is later compromised, replaced, or updated with malicious code. Because this skill handles inventory operations and expects API credentials, compromise could expose secrets or enable unauthorized business actions.
The skill exposes shell-based operational capabilities but does not declare any explicit tool scope such as allowed-tools or permissions. That weakens policy enforcement and reviewability, making it easier for an agent to invoke shell actions more broadly than intended when handling sensitive inventory workflows.
The documentation includes live state-changing operations such as stock adjustments, transfers, and order creation/update without any warning, confirmation requirement, or safe-use guidance. In an inventory-management context, these actions can directly alter business records, stock counts, and fulfillment state, increasing the risk of accidental or unauthorized modifications to production data.
This shell script reads API credentials from a local .env file and exports them for later use, then uses those credentials in outbound curl requests. Although comments describe the mechanics, there is no user-facing warning, confirmation, or disclosure that sensitive environment data will be accessed and sent to an external API.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
cin7_get() {
local endpoint="$1"
shift
curl -s -f \
-H "api-auth-accountid: $CIN7_ACCOUNT_ID" \
-H "api-auth-applicationkey: $CIN7_APP_KEY" \
-H "Content-Type: application/json" \
The script sends the provided sales-order JSON via cin7_post, which is a network operation affecting external systems. While the file has a brief usage comment, it does not include any confirmation, user-facing notice, or explicit warning that executing the script will submit data to a remote service.
The skill lists required API credentials but provides no warning that they are sensitive secrets that must not be logged, hardcoded, or echoed in outputs. In a shell-based skill, omission of this guidance increases the chance of credential leakage through command history, debugging, transcripts, or misconfigured environments.
No suspicious patterns detected.