Back to skill

Security audit

07 互联网访问

Security checks for vulnerabilities and agentic risk

Overview

This skill mostly matches its web-access purpose, but its default installer and credential handling are too broad and under-disclosed for normal installation.

Review this before installing. Prefer safe or dry-run mode, avoid the default browser-cookie import, use dedicated low-risk accounts, and do not provide social-session cookies unless you accept that the tool can act with those sessions. Pin or manually install dependencies from trusted sources instead of allowing unpinned global npm installs, curl-to-bash setup, or the mutable Docker image.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (5)

T03 · Remote Payload Retrieval and Execution

Error
Location
cli.py:330
Finding

Default Installer Executes an Unpinned Remote Script with System Privileges

Content
View full analysis
/dev/null && apt-get install -y -qq nodejs 2>/dev/null", shell=True, capture_output=True, timeout=120, ) ``` ### Technical Analysis The normal installation path downloads mutable content from an external URL and immediately pipes it into `bash`. The downloaded script is not pinned to a particular release and is not verified using a checksum or cryptographic signature. The command then installs a system package through `apt-get`. Installers of this type are commonly run as root or through a privileged environment, so the remotely supplied script may inherit system-level privileges. The use of `shell=True` creates an explicit shell execution channel and further increases the consequences of a compromised response. Even though NodeSource is a recognizable software provider, the design delegates effective control of the executed payload to infrastructure that can change after this project has been audited. ### Attack Path 1. A user or AI Agent invokes `agent-reach install` without safe mode. 2. `_cmd_install()` calls `_install_system_deps()`. 3. The installer retrieves the current response from `https://deb.nodesource.com/setup_22.x`. 4. The response is passed directly to `bash` without integrity verification. 5. If the upstream account, hosting service, DNS/TLS trust path, or distribution endpoint is compromised, attacker-controlled shell commands execute. 6. If the installer is running with root privileges, those commands can modify the entire host. ### Impact Assessment Successful exploitation can provide arbitrary code execution with the privileges of the installer. In a privileged installation context, this may include: - Installation or replacement of system binaries - Reading o ...[truncated 316 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
cli.py:171
Finding

Default Installation Automatically Extracts Browser Session Cookies

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Error
Location
cli.py:347
Finding

Mutable Third-Party Packages and Container Images Are Installed and Executed Without Verification

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
security/encrypt_cookies.py:94
Finding

Cookie Protection Silently Falls Back to Reversible XOR Obfuscation

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
security/encrypt_cookies.py:43
Finding

Fixed-Salt Password Derivation and Plaintext Cookie Disclosure Through CLI Interfaces

Content
View full analysis
bytes: if self.key_file.exists(): if password: kdf = hashlib.pbkdf2_hmac( "sha256", password.encode(), b"agent-reach-salt", 100000 ) return kdf else: with open(self.key_file, "rb") as f: return f.read() else: key = self._generate_key() if password: key = hashlib.pbkdf2_hmac( "sha256", password.encode(), b"agent-reach-salt", 100000 ) else: with open(self.key_file, "wb") as f: f.write(key) os.chmod(self.key_file, 0o600) return key ``` The password can be supplied as a command-line argument: ```python parser.add_argument( "--password", help="Encryption password; optional, otherwise use the key file" ) ``` The decrypt operation prints all recovered cookies: ```python cookies = encryptor.decrypt_cookies(args.password) if cookies: print(json.dumps(cookies, indent=2)) ``` ### Technical Analysis Password-derived keys use a constant salt, `agent-reach-salt`, for every user and encrypted file. Salts are intended to be unique and random so attackers cannot reuse precomputed work across targets. A fixed salt makes password reuse and bulk offline guessing more efficient. PBKDF2-HMAC-SHA256 with 100,000 iterations is also less resistant to modern GPU-assisted attacks than a properly configured memory-hard KDF. Accepting a password through `--password` may expose it in shell history, process listings, telemetry, or Agent execution logs. Printing decry ...[truncated 1085 chars]
Remediation
View remediation
Vulnerability Patterns
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (160)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Undeclared cookie encryption/decryption, key generation, storage, rotation, and file deletion are sensitive secret-management behaviors. Even if intended for safety, they are dangerous when not clearly declared because they involve handling authentication material and cryptographic keys, and errors can expose or destroy access credentials.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Undeclared cookie encryption/decryption, key generation, storage, rotation, and file deletion are sensitive secret-management behaviors. Even if intended for safety, they are dangerous when not clearly declared because they involve handling authentication material and cryptographic keys, and errors can expose or destroy access credentials.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Undeclared cookie encryption/decryption, key generation, storage, rotation, and file deletion are sensitive secret-management behaviors. Even if intended for safety, they are dangerous when not clearly declared because they involve handling authentication material and cryptographic keys, and errors can expose or destroy access credentials.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Undeclared cookie encryption/decryption, key generation, storage, rotation, and file deletion are sensitive secret-management behaviors. Even if intended for safety, they are dangerous when not clearly declared because they involve handling authentication material and cryptographic keys, and errors can expose or destroy access credentials.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Undeclared cookie encryption/decryption, key generation, storage, rotation, and file deletion are sensitive secret-management behaviors. Even if intended for safety, they are dangerous when not clearly declared because they involve handling authentication material and cryptographic keys, and errors can expose or destroy access credentials.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Undeclared cookie encryption/decryption, key generation, storage, rotation, and file deletion are sensitive secret-management behaviors. Even if intended for safety, they are dangerous when not clearly declared because they involve handling authentication material and cryptographic keys, and errors can expose or destroy access credentials.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

Undeclared cookie encryption/decryption, key generation, storage, rotation, and file deletion are sensitive secret-management behaviors. Even if intended for safety, they are dangerous when not clearly declared because they involve handling authentication material and cryptographic keys, and errors can expose or destroy access credentials.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Undeclared cookie encryption/decryption, key generation, storage, rotation, and file deletion are sensitive secret-management behaviors. Even if intended for safety, they are dangerous when not clearly declared because they involve handling authentication material and cryptographic keys, and errors can expose or destroy access credentials.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Undeclared cookie encryption/decryption, key generation, storage, rotation, and file deletion are sensitive secret-management behaviors. Even if intended for safety, they are dangerous when not clearly declared because they involve handling authentication material and cryptographic keys, and errors can expose or destroy access credentials.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Undeclared cookie encryption/decryption, key generation, storage, rotation, and file deletion are sensitive secret-management behaviors. Even if intended for safety, they are dangerous when not clearly declared because they involve handling authentication material and cryptographic keys, and errors can expose or destroy access credentials.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
88% confidence
Finding

Undeclared cookie encryption/decryption, key generation, storage, rotation, and file deletion are sensitive secret-management behaviors. Even if intended for safety, they are dangerous when not clearly declared because they involve handling authentication material and cryptographic keys, and errors can expose or destroy access credentials.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

Undeclared cookie encryption/decryption, key generation, storage, rotation, and file deletion are sensitive secret-management behaviors. Even if intended for safety, they are dangerous when not clearly declared because they involve handling authentication material and cryptographic keys, and errors can expose or destroy access credentials.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Undeclared cookie encryption/decryption, key generation, storage, rotation, and file deletion are sensitive secret-management behaviors. Even if intended for safety, they are dangerous when not clearly declared because they involve handling authentication material and cryptographic keys, and errors can expose or destroy access credentials.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

Undeclared cookie encryption/decryption, key generation, storage, rotation, and file deletion are sensitive secret-management behaviors. Even if intended for safety, they are dangerous when not clearly declared because they involve handling authentication material and cryptographic keys, and errors can expose or destroy access credentials.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Undeclared cookie encryption/decryption, key generation, storage, rotation, and file deletion are sensitive secret-management behaviors. Even if intended for safety, they are dangerous when not clearly declared because they involve handling authentication material and cryptographic keys, and errors can expose or destroy access credentials.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Undeclared cookie encryption/decryption, key generation, storage, rotation, and file deletion are sensitive secret-management behaviors. Even if intended for safety, they are dangerous when not clearly declared because they involve handling authentication material and cryptographic keys, and errors can expose or destroy access credentials.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Undeclared cookie encryption/decryption, key generation, storage, rotation, and file deletion are sensitive secret-management behaviors. Even if intended for safety, they are dangerous when not clearly declared because they involve handling authentication material and cryptographic keys, and errors can expose or destroy access credentials.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Undeclared cookie encryption/decryption, key generation, storage, rotation, and file deletion are sensitive secret-management behaviors. Even if intended for safety, they are dangerous when not clearly declared because they involve handling authentication material and cryptographic keys, and errors can expose or destroy access credentials.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Undeclared cookie encryption/decryption, key generation, storage, rotation, and file deletion are sensitive secret-management behaviors. Even if intended for safety, they are dangerous when not clearly declared because they involve handling authentication material and cryptographic keys, and errors can expose or destroy access credentials.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Undeclared cookie encryption/decryption, key generation, storage, rotation, and file deletion are sensitive secret-management behaviors. Even if intended for safety, they are dangerous when not clearly declared because they involve handling authentication material and cryptographic keys, and errors can expose or destroy access credentials.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Undeclared cookie encryption/decryption, key generation, storage, rotation, and file deletion are sensitive secret-management behaviors. Even if intended for safety, they are dangerous when not clearly declared because they involve handling authentication material and cryptographic keys, and errors can expose or destroy access credentials.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Undeclared cookie encryption/decryption, key generation, storage, rotation, and file deletion are sensitive secret-management behaviors. Even if intended for safety, they are dangerous when not clearly declared because they involve handling authentication material and cryptographic keys, and errors can expose or destroy access credentials.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Undeclared cookie encryption/decryption, key generation, storage, rotation, and file deletion are sensitive secret-management behaviors. Even if intended for safety, they are dangerous when not clearly declared because they involve handling authentication material and cryptographic keys, and errors can expose or destroy access credentials.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Undeclared cookie encryption/decryption, key generation, storage, rotation, and file deletion are sensitive secret-management behaviors. Even if intended for safety, they are dangerous when not clearly declared because they involve handling authentication material and cryptographic keys, and errors can expose or destroy access credentials.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
93% confidence
Finding

The skill instructs deletion of a local key file via a raw shell command. In an agent or copy-paste workflow, destructive commands are risky because they can cause denial of access, break decryption for stored secrets, and normalize unsafe command execution without safeguards or validation.

Content

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

解决:

bash
# 删除密钥重新导入
rm ~/.config/agent-reach/.key
python security/encrypt_cookies.py import --file cookies.json

Static analysis

No suspicious patterns detected.