T09 · Insecure Skill Coding Practices
- Location
python/koan_sdk.py:177- Finding
Private Keys Stored in Plaintext on Linux and Other Unsupported Platforms
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is mostly coherent for Koan team coordination, but it bundles broad SDK code with persistent identity keys and network behaviors that deserve careful review before installation.
Install only if you are comfortable with a Koan SDK keeping long-lived identity keys and chat history under ~/.koan. Prefer an OS keychain or encrypted vault, keep the directory URL at the default HTTPS Koan endpoint unless you intentionally trust another server, and avoid using untrusted peer identifiers with the bundled chat-log helpers.
python/koan_sdk.py:177Private Keys Stored in Plaintext on Linux and Other Unsupported Platforms
python/koan_sdk.py:255Custom Directory Configuration Can Transmit Authentication Data to Arbitrary or Plaintext Network Endpoints
python/koan_sdk.py:365Unsanitized Peer Identifier Allows Chat-Log Path Traversal
The documented behavior materially understates the broader capabilities inherited through the prerequisite ecosystem, including identity registration, local persistence of keys/chat logs, broader messaging, and other networked operations. This mismatch is dangerous because operators may grant or trust the skill for limited team-joining actions while it actually enables handling of sensitive credentials and wider remote interactions without enforceable approval controls.
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}'
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