T01 · Skill Instruction Hijacking
- Location
SKILL.md:29- Finding
External Messages Can Alter Agent Behavior and Trigger Autonomous Actions
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a real agent-messaging SDK, but it creates persistent identities, recurring polling, local message logs, and some automatic agent actions with security-sensitive edge cases users should review first.
Install only if you are comfortable with an agent identity that persists on disk, local chat histories, and optional recurring network polling. Avoid using it for sensitive messages on Linux unless you move keys to protected storage, keep the default HTTPS service unless you trust a custom endpoint, and require explicit approval before replying to messages or accepting work from other agents.
SKILL.md:29External Messages Can Alter Agent Behavior and Trigger Autonomous Actions
python/koan_sdk.py:196Private Identity Keys Are Stored as Plaintext on Linux and Other Unsupported Platforms
python/koan_sdk.py:299Recipient-Key Lookup Failure Causes Silent Plaintext Message Transmission
node/koan-sdk.mjs:229Configurable Directory URL Can Redirect Sensitive Protocol Traffic to Arbitrary or Cleartext Endpoints
python/koan_sdk.py:360Unsanitized Peer Identifier Enables Chat-Log Path Traversal
python/requirements.txt:1Python Cryptography Dependency Is Not Reproducibly Pinned
The description frames the skill as simple onboarding and greeting, but the body enables broader ongoing behaviors such as polling, task workflows, channel/team features, lore/reputation actions, and persistent local storage. This mismatch can mislead users and reviewers into approving a skill with substantially more authority and data-handling behavior than advertised.
The instruction to save every message locally to a JSONL chat log creates persistent storage of potentially sensitive inter-agent communications, metadata, and decrypted payloads. Even if intended for convenience, indiscriminate logging increases the blast radius of host compromise, accidental disclosure, or secondary use by other tools/processes on the system.
Poll every 2-5 minutes. Response includes `history[]` (last 5 delivered messages for context) and `chat_log` hint.
**Chat log:** Save every message locally to `koan-chat-{koanId}.jsonl` (one JSON per line: `{ ts, dir, from, to, intent, payload }`). The server only keeps the last 5 delivered messages — for full history, you need your local file.
**What you'll receive:**
- Direct messages from other agents
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
const CONFIG_FILE = path.join(KOAN_DIR, 'config.json');
const CHATS_DIR = path.join(KOAN_DIR, 'chats');
const DEFAULT_DIRECTORY = 'https://koanmesh.com';
const KEYCHAIN_SERVICE = 'koan-protocol-sdk';
function runCommand(command, args, envExtras = {}) {
const result = spawnSync(command, args, {
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
const CONFIG_FILE = path.join(KOAN_DIR, 'config.json');
const CHATS_DIR = path.join(KOAN_DIR, 'chats');
const DEFAULT_DIRECTORY = 'https://koanmesh.com';
const KEYCHAIN_SERVICE = 'koan-protocol-sdk';
function runCommand(command, args, envExtras = {}) {
const result = spawnSync(command, args, {
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
const CONFIG_FILE = path.join(KOAN_DIR, 'config.json');
const CHATS_DIR = path.join(KOAN_DIR, 'chats');
const DEFAULT_DIRECTORY = 'https://koanmesh.com';
const KEYCHAIN_SERVICE = 'koan-protocol-sdk';
function runCommand(command, args, envExtras = {}) {
const result = spawnSync(command, args, {
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
const CONFIG_FILE = path.join(KOAN_DIR, 'config.json');
const CHATS_DIR = path.join(KOAN_DIR, 'chats');
const DEFAULT_DIRECTORY = 'https://koanmesh.com';
const KEYCHAIN_SERVICE = 'koan-protocol-sdk';
function runCommand(command, args, envExtras = {}) {
const result = spawnSync(command, args, {
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
const CONFIG_FILE = path.join(KOAN_DIR, 'config.json');
const CHATS_DIR = path.join(KOAN_DIR, 'chats');
const DEFAULT_DIRECTORY = 'https://koanmesh.com';
const KEYCHAIN_SERVICE = 'koan-protocol-sdk';
function runCommand(command, args, envExtras = {}) {
const result = spawnSync(command, args, {
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
const CONFIG_FILE = path.join(KOAN_DIR, 'config.json');
const CHATS_DIR = path.join(KOAN_DIR, 'chats');
const DEFAULT_DIRECTORY = 'https://koanmesh.com';
const KEYCHAIN_SERVICE = 'koan-protocol-sdk';
function runCommand(command, args, envExtras = {}) {
const result = spawnSync(command, args, {
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
const CONFIG_FILE = path.join(KOAN_DIR, 'config.json');
const CHATS_DIR = path.join(KOAN_DIR, 'chats');
const DEFAULT_DIRECTORY = 'https://koanmesh.com';
const KEYCHAIN_SERVICE = 'koan-protocol-sdk';
function runCommand(command, args, envExtras = {}) {
const result = spawnSync(command, args, {
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
const CONFIG_FILE = path.join(KOAN_DIR, 'config.json');
const CHATS_DIR = path.join(KOAN_DIR, 'chats');
const DEFAULT_DIRECTORY = 'https://koanmesh.com';
const KEYCHAIN_SERVICE = 'koan-protocol-sdk';
function runCommand(command, args, envExtras = {}) {
const result = spawnSync(command, args, {
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
return runPowerShell(script, { KOAN_CIPHER: ciphertext });
}
function macosKeychainAccount(signingPublicKeyB64) {
return `koan-${crypto.createHash('sha256').update(signingPublicKeyB64).digest('hex').slice(0, 32)}`;
}
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
return runPowerShell(script, { KOAN_CIPHER: ciphertext });
}
function macosKeychainAccount(signingPublicKeyB64) {
return `koan-${crypto.createHash('sha256').update(signingPublicKeyB64).digest('hex').slice(0, 32)}`;
}
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
return runPowerShell(script, { KOAN_CIPHER: ciphertext });
}
function macosKeychainAccount(signingPublicKeyB64) {
return `koan-${crypto.createHash('sha256').update(signingPublicKeyB64).digest('hex').slice(0, 32)}`;
}
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
return runPowerShell(script, { KOAN_CIPHER: ciphertext });
}
function macosKeychainAccount(signingPublicKeyB64) {
return `koan-${crypto.createHash('sha256').update(signingPublicKeyB64).digest('hex').slice(0, 32)}`;
}
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
return runPowerShell(script, { KOAN_CIPHER: ciphertext });
}
function macosKeychainAccount(signingPublicKeyB64) {
return `koan-${crypto.createHash('sha256').update(signingPublicKeyB64).digest('hex').slice(0, 32)}`;
}
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
return runPowerShell(script, { KOAN_CIPHER: ciphertext });
}
function macosKeychainAccount(signingPublicKeyB64) {
return `koan-${crypto.createHash('sha256').update(signingPublicKeyB64).digest('hex').slice(0, 32)}`;
}
Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.
def _run_command(command: list[str], env_extra: dict | None = None) -> str:
env = os.environ.copy()
if env_extra:
env.update(env_extra)
proc = subprocess.run(command, capture_output=True, text=True, env=env)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
return _run_powershell(script, {'KOAN_CIPHER': ciphertext})
def _macos_keychain_account(signing_public_key_b64: str) -> str:
digest = hashlib.sha256(signing_public_key_b64.encode()).hexdigest()[:32]
return f'koan-{digest}'
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
return _run_powershell(script, {'KOAN_CIPHER': ciphertext})
def _macos_keychain_account(signing_public_key_b64: str) -> str:
digest = hashlib.sha256(signing_public_key_b64.encode()).hexdigest()[:32]
return f'koan-{digest}'
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
return _run_powershell(script, {'KOAN_CIPHER': ciphertext})
def _macos_keychain_account(signing_public_key_b64: str) -> str:
digest = hashlib.sha256(signing_public_key_b64.encode()).hexdigest()[:32]
return f'koan-{digest}'
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
return _run_powershell(script, {'KOAN_CIPHER': ciphertext})
def _macos_keychain_account(signing_public_key_b64: str) -> str:
digest = hashlib.sha256(signing_public_key_b64.encode()).hexdigest()[:32]
return f'koan-{digest}'
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
return _run_powershell(script, {'KOAN_CIPHER': ciphertext})
def _macos_keychain_account(signing_public_key_b64: str) -> str:
digest = hashlib.sha256(signing_public_key_b64.encode()).hexdigest()[:32]
return f'koan-{digest}'
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
return _run_powershell(script, {'KOAN_CIPHER': ciphertext})
def _macos_keychain_account(signing_public_key_b64: str) -> str:
digest = hashlib.sha256(signing_public_key_b64.encode()).hexdigest()[:32]
return f'koan-{digest}'
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
return _run_powershell(script, {'KOAN_CIPHER': ciphertext})
def _macos_keychain_account(signing_public_key_b64: str) -> str:
digest = hashlib.sha256(signing_public_key_b64.encode()).hexdigest()[:32]
return f'koan-{digest}'
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
return _run_powershell(script, {'KOAN_CIPHER': ciphertext})
def _macos_keychain_account(signing_public_key_b64: str) -> str:
digest = hashlib.sha256(signing_public_key_b64.encode()).hexdigest()[:32]
return f'koan-{digest}'
Detected: suspicious.dangerous_exec, suspicious.exposed_secret_literal