Back to skill

Security audit

Clink Integration

Security checks for vulnerabilities and agentic risk

Overview

The skill is coherent for payment integration, but it handles and persists sensitive payment credentials and can run broad local/payment-side actions that deserve manual review before installation.

Install only if you are comfortable giving this skill and its bundled CLI access to Clink payment credentials and merchant configuration. Prefer sandbox, use env: references or a real secret manager instead of literal saved keys, review any webhook/env-file writes before running them, avoid --show-secret unless writing directly to a controlled secret destination, and do not use --restart-command or production skip-validation unless you explicitly approve the exact action.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (28)

Lp3

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding
The skill explicitly instructs the agent to run shell commands, access environment-backed secrets, and fetch external context, but it declares no permissions or trust boundaries. That creates a real capability/expectation mismatch: an agent or host may execute network and shell actions without clear user awareness, increasing the chance of unintended secret access, command execution, or outbound data retrieval.

Context-Inappropriate Capability

Medium
Confidence
97% confidence
Finding
The webhook env-sync feature accepts a user-supplied --restart-command and executes it via child_process.exec, which invokes a shell. In an agent/skill context, that creates an arbitrary command-execution primitive unrelated to core payment integration logic, and it can be triggered after writing secrets to an env file, compounding impact.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The README instructs the agent to reveal, save, and synchronize sensitive credentials such as Secret Keys and webhook signing secrets into local environment files or runtime environments, but it does not include explicit safety guidance about secure storage, least-privilege handling, redaction, or avoiding exposure in logs and agent outputs. In the context of an agent-facing skill, this is more dangerous because an automated agent may follow the instructions mechanically and persist secrets in insecure locations, increasing the risk of credential leakage and account compromise.

Missing User Warnings

Low
Confidence
73% confidence
Finding
The README provides direct installation instructions to clone and install the skill from a remote GitHub repository without an explicit trust or code-review warning. While common in open-source documentation, this is still a supply-chain risk because users or agents may install and execute unreviewed code automatically, especially in an agent ecosystem where remote instructions may be followed without human scrutiny.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The README explicitly instructs agents to reveal and persist a Clink Secret Key into local configuration stores such as an ignored `.env` file without an adjacent warning about handling, rotation, scope, or avoiding accidental exposure. In a payment integration skill, normalizing secret materialization into plaintext files increases the chance of credential leakage through logs, editor plugins, backups, screenshots, or misconfigured source control.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The README recommends `--save-secret` and `--sync-env-file .env.local` for webhook signing secrets but does not clearly warn that the generated secret is sensitive and must be protected like an API credential. Because this skill targets agent-driven automation, an agent may mechanically persist secrets into plaintext env files or artifacts, increasing exposure risk in repos, CI logs, caches, or deployment bundles.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The prompt is written entirely in Chinese and directs the interaction in that language without offering a language choice. This can impair user comprehension, informed consent, and safe execution of sensitive payment-integration steps if the operator is not fluent, increasing the chance of configuration mistakes or mishandling of secrets.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
This prompt explicitly instructs an agent to make impactful changes: modify project files, persist secrets into environment/platform secret stores, configure webhook endpoints, and restart services. Even though these actions are normal for a payments-integration skill, the prompt does not require an explicit user confirmation step immediately before high-impact operations, which increases the risk of unintended secret handling, configuration drift, or external-side effects if the agent acts too autonomously.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The workflow instructs users to initialize/copy a one-time Secret Key and store it securely, but it does not provide an explicit warning that this credential grants sensitive API access, must never be pasted into chat, source control, or logs, and may be irrecoverable if exposed. In a payment-integration skill, this omission increases the chance of credential mishandling during setup, which can lead to unauthorized API actions or account compromise.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The test harness sends a large system prompt containing local repository files and documentation context to a remote chat completions endpoint. In a payment-integration skill, that context can include proprietary integration guidance, internal references, or sensitive implementation details, and the code provides no explicit consent gate, redaction step, or warning before exfiltrating it to a third-party model provider.

Missing User Warnings

Low
Confidence
87% confidence
Finding
Model responses are persisted under tests/live/latest by default, but the script does not prominently warn users that outputs may be stored on disk. Because prompts include integration docs and responses may echo sensitive operational details, these saved artifacts can create unintended local data retention and secondary exposure through source control, shared workstations, or CI artifacts.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The CLI persists profile configuration, including literal API keys and webhook signing keys, to a JSON file under the user's home directory without enforcing file permissions or strongly warning at the write point. In this skill's context, the stored material is highly sensitive payment credential data, so plaintext persistence materially increases exposure from local compromise, backups, or multi-user hosts.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The restart helper runs a shell command through exec with no validation, escaping, or allowlisting, and no meaningful safety interlock at the execution point. In an agent-integrated CLI, this turns configuration convenience into arbitrary local code execution, which is substantially more dangerous than ordinary process control.

Credential Access

High
Category
Privilege Escalation
Content
resolved = true;
      if (interval) clearInterval(interval);
      page.off("request", onRequest);
      reject(new Error("Timed out waiting for Dashboard Console access token. Finish login in the opened browser and try again."));
    };
    const onRequest = (request) => {
      const credentials = extractCredentialsFromDashboardRequest(request);
Confidence
95% confidence
Finding
The login flow captures Dashboard access tokens from browser requests and storage, then persists them for later API use. In this skill context, that is highly sensitive credential material for a payment dashboard, and broad token harvesting logic from network/storage increases the blast radius if the CLI or profile storage is misused or compromised.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Content
## Main Responsibilities

Before generating code or reviewing an implementation for this path, load the latest available `openclaw-payment-skills` context through `node scripts/load_payment_skill_contexts.mjs --dependency openclaw-payment-skills --print-path` and read the generated context file. Treat this module as integration guidance, and treat the loaded payment skill context as the current source for exact OpenClaw tool names, merchant integration metadata, notification routing, tool return directives, and ownership boundaries.

### Merchant Skill / Agent
Confidence
97% confidence
Finding
The document instructs the agent to dynamically load additional context from a local script and then treat that loaded content as the authoritative source for tool names, metadata, notification routing, and return directives. In a security-sensitive agent skill, this is dangerous because it creates an instruction-loading boundary where untrusted or modified local dependency content can override the reviewed prompt context and influence later tool use or output behavior.

Unsafe Defaults

Medium
Category
Tool Misuse
Content
cacheDir,
  validationInput = null,
  semanticValidation = {},
  skipValidation = false,
}) {
  const route = detectRoute({ prompt, contextBlocks });
  const stack = inferStack(contextBlocks);
Confidence
88% confidence
Finding
The runtime exposes a skipValidation parameter that can disable production validation for gated production routes. Although the code marks resulting output as UNVALIDATED, it still allows production-oriented artifacts such as a production promotion plan, creating a path for operators or upstream callers to bypass enforcement and proceed without required checks.

Unsafe Defaults

Medium
Category
Tool Misuse
Content
let productionValidation = null;

  if (requestedEnvironment === "production" && GATED_PRODUCTION_ROUTES.includes(route)) {
    if (skipValidation) {
      productionValidation = { passed: false, skipped: true, checks: [] };
      runtimeState = skipProductionValidation(
        runtimeState,
Confidence
93% confidence
Finding
This branch actively honors skipValidation for production requests, sets productionValidation as skipped, and transitions runtime state via skipProductionValidation instead of enforcing the normal validation gate. In a skill that scaffolds payment integrations and go-live workflows, allowing a caller-controlled validation bypass materially increases the risk of unsafe production guidance, incomplete controls, and accidental rollout of insecure integrations.

Unsafe Defaults

Medium
Category
Tool Misuse
Content
This exists because hard-blocking may push developers to bypass the skill entirely, which is worse than a tracked, acknowledged skip.

The responsibility split: the runtime trusts `skipValidation` and marks output accordingly; the skill's prompt-level logic is responsible for obtaining the user's explicit double confirmation before setting the flag.

The escape hatch does not change the default. The default path is always: validate first, then promote.
Confidence
90% confidence
Finding
The documented escape hatch allows production artifacts to be generated with validation skipped, while the runtime 'trusts' a skipValidation flag and does not enforce the second confirmation. In an adversarial or failure-prone prompt environment, prompt-layer safeguards are weaker than runtime enforcement, so production guidance could be emitted without the intended controls and with incomplete readiness checks.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
validationFile: null,
    docsSource: process.env.CLINK_DOCS_URL || undefined,
    docsFallbackSource: process.env.CLINK_DOCS_FALLBACK_PATH || null,
    skipValidation: values.includes("--skip-validation"),
    confirmUnvalidatedProduction: values.includes("--confirm-unvalidated-production"),
    allowFixtureFallback: values.includes("--allow-fixture-fallback"),
    json: values.includes("--json"),
Confidence
89% confidence
Finding
The script explicitly supports a --skip-validation flag, which can disable safety or production validation checks before running the skill runtime. In a payment-integration skill that touches production routing and deployment-like workflows, exposing an easy bypass materially increases the chance of unsafe actions proceeding without required validation.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
requiresExplicitUnvalidatedConfirmation &&
    !options.confirmUnvalidatedProduction
  ) {
    throw new Error("--skip-validation requires --confirm-unvalidated-production");
  }

  const validationInput = options.validationFile ? fs.readFileSync(options.validationFile, "utf8") : null;
Confidence
83% confidence
Finding
The code only blocks --skip-validation when the environment is production and the route is in a gated subset, meaning validation bypass is still allowed in other cases. This partial guard can create a false sense of safety and may be circumvented by misclassification of route/environment or by using non-gated sensitive flows.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
"Deploy to production our Clink checkout webhook integration.",
    "--validation-file",
    validationFile,
    "--skip-validation",
    "--confirm-unvalidated-production",
    "--allow-fixture-fallback",
    "--json",
Confidence
81% confidence
Finding
This test confirms that a production deployment path can proceed with --skip-validation when paired with --confirm-unvalidated-production. Even with warning metadata, the feature enables an explicit bypass of production validation controls, which weakens defense-in-depth for a payment integration workflow and could allow unsafe production promotion if misused or socially engineered.

Unsafe Defaults

Medium
Category
Tool Misuse
Content
const prodSkipped = await runSkillRuntime({
    prompt: "Deploy to production our Clink checkout webhook integration.",
    docsFallbackSource: docsFallback,
    skipValidation: true,
  });
  check(prodSkipped.productionValidation?.skipped === true, "skipValidation should set skipped flag");
  check(prodSkipped.environment?.targetEnvironment === "production", "skipValidation should keep production environment");
Confidence
89% confidence
Finding
The runtime test invokes skipValidation: true for a production deployment scenario and expects the system to continue on the production path. In a payment integration skill, allowing production advancement without validation materially increases the chance of misconfiguration, broken webhook verification, or unsafe rollout reaching live traffic.

Unsafe Defaults

Medium
Category
Tool Misuse
Content
docsFallbackSource: docsFallback,
    skipValidation: true,
  });
  check(prodSkipped.productionValidation?.skipped === true, "skipValidation should set skipped flag");
  check(prodSkipped.environment?.targetEnvironment === "production", "skipValidation should keep production environment");
  check(prodSkipped.environment?.baseUrl === "https://api.clinkbill.com", "skipValidation should keep production base URL");
  check(prodSkipped.notes.some((item) => item.includes("UNVALIDATED")), "skipValidation should add UNVALIDATED note");
Confidence
88% confidence
Finding
The test asserts that skipValidation should keep the target environment as production, confirming an unsafe default/override path. In this skill context, production Clink/merchant payment integration guidance directly affects live payment behavior, so bypassing validation is more dangerous than in a non-critical domain.

Unsafe Defaults

Medium
Category
Tool Misuse
Content
skipValidation: true,
  });
  check(prodSkipped.productionValidation?.skipped === true, "skipValidation should set skipped flag");
  check(prodSkipped.environment?.targetEnvironment === "production", "skipValidation should keep production environment");
  check(prodSkipped.environment?.baseUrl === "https://api.clinkbill.com", "skipValidation should keep production base URL");
  check(prodSkipped.notes.some((item) => item.includes("UNVALIDATED")), "skipValidation should add UNVALIDATED note");
  check(!prodSkipped.artifacts.some((item) => item.name === "launch_readiness_checklist"), "skipValidation should not emit launch_readiness_checklist");
Confidence
87% confidence
Finding
Retaining the production base URL while validation is skipped means downstream consumers may interact with live production configuration despite lacking readiness checks. The added UNVALIDATED note is not a sufficient technical control because it relies on human attention rather than enforcement.

Unsafe Defaults

Medium
Category
Tool Misuse
Content
check(prodSkipped.productionValidation?.skipped === true, "skipValidation should set skipped flag");
  check(prodSkipped.environment?.targetEnvironment === "production", "skipValidation should keep production environment");
  check(prodSkipped.environment?.baseUrl === "https://api.clinkbill.com", "skipValidation should keep production base URL");
  check(prodSkipped.notes.some((item) => item.includes("UNVALIDATED")), "skipValidation should add UNVALIDATED note");
  check(!prodSkipped.artifacts.some((item) => item.name === "launch_readiness_checklist"), "skipValidation should not emit launch_readiness_checklist");
  check(prodSkipped.artifacts.some((item) => item.name === "production_promotion_plan"), "skipValidation should still emit production_promotion_plan");
  const promoPlan = prodSkipped.artifacts.find((item) => item.name === "production_promotion_plan");
Confidence
84% confidence
Finding
The system still emits a production_promotion_plan even when validation is skipped, which normalizes and operationalizes an unvalidated production rollout. In payment and webhook integrations, such normalization can facilitate unsafe live deployments with incomplete ownership, signature verification, or environment checks.

Static analysis

Detected: suspicious.dangerous_exec, suspicious.env_credential_access, suspicious.exposed_secret_literal

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/load_payment_skill_contexts.mjs:75

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/verify_cli_bundle.mjs:151

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
tests/run_skill_runtime_tests.mjs:627

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
tests/run_skill_tests.mjs:20

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
vendor/clink-integ-cli/clink-integ-cli.js:5164

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
tests/run_llm_skill_tests.mjs:18

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
vendor/clink-integ-cli/clink-integ-cli.js:3715

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
references/clink-integ-cli-integration.md:234