Back to skill

Security audit

心事空间

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marked this skill suspicious because scanners report broad private-chat capture, automatic cloud synchronization, and a confirmed risk that a working-directory helper could run with access to a secret; some inspection was incomplete.

The verdict is suspicious, with medium confidence, and the scan is incomplete. Consider not installing until the broad chat capture and automatic cloud sync are clarified and the helper-source risk is addressed; if you do install, treat private conversation data and secrets as potentially exposed.

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
.
Finding

Cloud snapshots bypass reviewer authorization and can forge confirmed memories

Content
View full analysis

Impact

Fabricated records persist locally and become eligible for confirmed-memory search and, for supported structured record kinds, selected consultation exports. This defeats the human-review boundary without requiring local account control or an authorized review command.

Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
Findings (54)

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
本包带有预构建程序 [scripts/reflection.mjs](scripts/reflection.mjs),不依赖原项目、TypeScript 或 npm 安装。Node.js 最低 22.13,支持 macOS 和 Linux。使用宿主告知的技能绝对路径运行:

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · assets/openclaw/keychain-set.c (reported line 8)May include surrounding context.

text
int main(int argc, char **argv) {
  if (argc != 3) {
    fputs("usage: keychain-set SERVICE ACCOUNT\n", stderr);
    return 2;
  }

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · assets/openclaw/openclaw.mjs (reported line 14720)May include surrounding context.

js
throw new Error("macOS Keychain is required on this host");
    }
    if (!secret) throw new Error("Refusing to store an empty Keychain secret");
    const temporaryDirectory = await mkdtemp(path.join(os.tmpdir(), "emotion-keychain-"));
    const helper = path.join(temporaryDirectory, "keychain-set");
    const source = process.env.EMOTION_ARCHIVE_KEYCHAIN_HELPER_SOURCE ?? path.resolve(process.cwd(), "scripts/keychain-set.c");
    try {

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · assets/openclaw/openclaw.mjs (reported line 14721)May include surrounding context.

js
}
    if (!secret) throw new Error("Refusing to store an empty Keychain secret");
    const temporaryDirectory = await mkdtemp(path.join(os.tmpdir(), "emotion-keychain-"));
    const helper = path.join(temporaryDirectory, "keychain-set");
    const source = process.env.EMOTION_ARCHIVE_KEYCHAIN_HELPER_SOURCE ?? path.resolve(process.cwd(), "scripts/keychain-set.c");
    try {
      await runProcess("clang", [

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/keychain-set.c (reported line 8)May include surrounding context.

text
int main(int argc, char **argv) {
  if (argc != 3) {
    fputs("usage: keychain-set SERVICE ACCOUNT\n", stderr);
    return 2;
  }

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/reflection.mjs (reported line 29722)May include surrounding context.

js
throw new Error("macOS Keychain is required on this host");
    }
    if (!secret) throw new Error("Refusing to store an empty Keychain secret");
    const temporaryDirectory = await mkdtemp(path2.join(os.tmpdir(), "emotion-keychain-"));
    const helper = path2.join(temporaryDirectory, "keychain-set");
    const source = process.env.EMOTION_ARCHIVE_KEYCHAIN_HELPER_SOURCE ?? path2.resolve(process.cwd(), "scripts/keychain-set.c");
    try {

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/reflection.mjs (reported line 29723)May include surrounding context.

js
}
    if (!secret) throw new Error("Refusing to store an empty Keychain secret");
    const temporaryDirectory = await mkdtemp(path2.join(os.tmpdir(), "emotion-keychain-"));
    const helper = path2.join(temporaryDirectory, "keychain-set");
    const source = process.env.EMOTION_ARCHIVE_KEYCHAIN_HELPER_SOURCE ?? path2.resolve(process.cwd(), "scripts/keychain-set.c");
    try {
      await runProcess("clang", [

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · assets/openclaw/keychain-set.c (reported line 72)May include surrounding context.

text
CFRelease(service);

  if (status != errSecSuccess) {
    fprintf(stderr, "Keychain update failed with status %d\n", (int)status);
    return 1;
  }
  return 0;

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · assets/openclaw/openclaw.mjs (reported line 14694)May include surrounding context.

js
var MacOsKeychainSecretStore = class {
  async get(service, account) {
    if (process.platform !== "darwin") {
      throw new Error("macOS Keychain is required on this host");
    }
    try {
      const { stdout } = await execFileAsync("security", [

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · assets/openclaw/openclaw.mjs (reported line 14712)May include surrounding context.

js
if (candidate.code === 44 || candidate.stderr?.includes("could not be found")) {
        return null;
      }
      throw new Error(`Unable to read secret '${service}' from macOS Keychain`);
    }
  }
  async set(service, account, secret) {

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · assets/openclaw/openclaw.mjs (reported line 14717)May include surrounding context.

js
}
  async set(service, account, secret) {
    if (process.platform !== "darwin") {
      throw new Error("macOS Keychain is required on this host");
    }
    if (!secret) throw new Error("Refusing to store an empty Keychain secret");
    const temporaryDirectory = await mkdtemp(path.join(os.tmpdir(), "emotion-keychain-"));

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · assets/openclaw/openclaw.mjs (reported line 14719)May include surrounding context.

js
if (process.platform !== "darwin") {
      throw new Error("macOS Keychain is required on this host");
    }
    if (!secret) throw new Error("Refusing to store an empty Keychain secret");
    const temporaryDirectory = await mkdtemp(path.join(os.tmpdir(), "emotion-keychain-"));
    const helper = path.join(temporaryDirectory, "keychain-set");
    const source = process.env.EMOTION_ARCHIVE_KEYCHAIN_HELPER_SOURCE ?? path.resolve(process.cwd(), "scripts/keychain-set.c");

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/keychain-set.c (reported line 72)May include surrounding context.

text
CFRelease(service);

  if (status != errSecSuccess) {
    fprintf(stderr, "Keychain update failed with status %d\n", (int)status);
    return 1;
  }
  return 0;

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/reflection.mjs (reported line 29693)May include surrounding context.

js
import path2 from "node:path";
import { promisify } from "node:util";
var execFileAsync = promisify(execFile);
var MacOsKeychainSecretStore = class {
  async get(service, account) {
    if (process.platform !== "darwin") {
      throw new Error("macOS Keychain is required on this host");

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/reflection.mjs (reported line 29696)May include surrounding context.

js
var MacOsKeychainSecretStore = class {
  async get(service, account) {
    if (process.platform !== "darwin") {
      throw new Error("macOS Keychain is required on this host");
    }
    try {
      const { stdout } = await execFileAsync("security", [

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/reflection.mjs (reported line 29714)May include surrounding context.

js
if (candidate.code === 44 || candidate.stderr?.includes("could not be found")) {
        return null;
      }
      throw new Error(`Unable to read secret '${service}' from macOS Keychain`);
    }
  }
  async set(service, account, secret) {

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/reflection.mjs (reported line 29719)May include surrounding context.

js
}
  async set(service, account, secret) {
    if (process.platform !== "darwin") {
      throw new Error("macOS Keychain is required on this host");
    }
    if (!secret) throw new Error("Refusing to store an empty Keychain secret");
    const temporaryDirectory = await mkdtemp(path2.join(os.tmpdir(), "emotion-keychain-"));

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/reflection.mjs (reported line 29721)May include surrounding context.

js
if (process.platform !== "darwin") {
      throw new Error("macOS Keychain is required on this host");
    }
    if (!secret) throw new Error("Refusing to store an empty Keychain secret");
    const temporaryDirectory = await mkdtemp(path2.join(os.tmpdir(), "emotion-keychain-"));
    const helper = path2.join(temporaryDirectory, "keychain-set");
    const source = process.env.EMOTION_ARCHIVE_KEYCHAIN_HELPER_SOURCE ?? path2.resolve(process.cwd(), "scripts/keychain-set.c");

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/reflection.mjs (reported line 30342)May include surrounding context.

js
const bundled = fileURLToPath(new URL("./keychain-set.c", import.meta.url));
    process.env.EMOTION_ARCHIVE_KEYCHAIN_HELPER_SOURCE = existsSync(bundled) ? bundled : path4.resolve("scripts/keychain-set.c");
  }
  const secrets = options.secrets ?? new EnvironmentSecrets(process.platform === "darwin" ? new MacOsKeychainSecretStore() : void 0);
  const key = options.key ?? await getOrCreateVaultKey(secrets);
  const store = new LocalStore(path4.join(dataDir, "reflection.sqlite"), key);
  let remote;

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · assets/openclaw/openclaw.mjs (reported line 14691)May include surrounding context.

js
import path from "node:path";
import { promisify } from "node:util";
var execFileAsync = promisify(execFile);
var MacOsKeychainSecretStore = class {
  async get(service, account) {
    if (process.platform !== "darwin") {
      throw new Error("macOS Keychain is required on this host");

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · assets/openclaw/openclaw.mjs (reported line 15623)May include surrounding context.

js
const bundled = fileURLToPath(new URL("./keychain-set.c", import.meta.url));
    process.env.EMOTION_ARCHIVE_KEYCHAIN_HELPER_SOURCE = existsSync(bundled) ? bundled : path3.resolve("scripts/keychain-set.c");
  }
  const secrets = options.secrets ?? new EnvironmentSecrets(process.platform === "darwin" ? new MacOsKeychainSecretStore() : void 0);
  const key = options.key ?? await getOrCreateVaultKey(secrets);
  const store = new LocalStore(path3.join(dataDir, "reflection.sqlite"), key);
  let remote;

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · assets/openclaw/openclaw.mjs (reported line 14722)May include surrounding context.

js
if (!secret) throw new Error("Refusing to store an empty Keychain secret");
    const temporaryDirectory = await mkdtemp(path.join(os.tmpdir(), "emotion-keychain-"));
    const helper = path.join(temporaryDirectory, "keychain-set");
    const source = process.env.EMOTION_ARCHIVE_KEYCHAIN_HELPER_SOURCE ?? path.resolve(process.cwd(), "scripts/keychain-set.c");
    try {
      await runProcess("clang", [
        source,

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · assets/openclaw/openclaw.mjs (reported line 14722)May include surrounding context.

js
if (!secret) throw new Error("Refusing to store an empty Keychain secret");
    const temporaryDirectory = await mkdtemp(path.join(os.tmpdir(), "emotion-keychain-"));
    const helper = path.join(temporaryDirectory, "keychain-set");
    const source = process.env.EMOTION_ARCHIVE_KEYCHAIN_HELPER_SOURCE ?? path.resolve(process.cwd(), "scripts/keychain-set.c");
    try {
      await runProcess("clang", [
        source,

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · assets/openclaw/openclaw.mjs (reported line 14735)May include surrounding context.

js
]);
      await runProcess(helper, [service, account], secret);
    } catch (error51) {
      throw new Error(`Unable to store secret '${service}' in macOS Keychain: ${error51 instanceof Error ? error51.message : String(error51)}`);
    } finally {
      await rm(temporaryDirectory, { recursive: true, force: true });
    }

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · assets/openclaw/openclaw.mjs (reported line 14762)May include surrounding context.

js
var FLOWUS_API_BASE = process.env.FLOWUS_API_BASE ?? "https://api.flowus.cn/v2";
var FLOWUS_TOKEN_SERVICE = "emotional-support-archive.flowus-token";
var VAULT_KEY_SERVICE = "emotional-support-archive.vault-key";
var KEYCHAIN_ACCOUNT = process.env.USER ?? "local-user";

// src/security/vault-key.ts
import { randomBytes } from "node:crypto";