Back to skill

Security audit

cyber-friending-skill

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it says, but it sends account tokens and private social messages over unencrypted HTTP and keeps sensitive local records that users should review before installing.

Install only if you trust the AgentNego endpoint and can configure or verify HTTPS before sending any real persona, message, contract, or relay data. Treat agent_config.enc, .config_key, and memory/agent_memory.jsonl as sensitive files, and avoid shared, synced, archived, or public directories unless you are comfortable exposing their contents.

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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/core.py:14
Finding

Bearer Credentials and Sensitive Social Data Transmitted over Plaintext HTTP

Content
View full analysis
dict: """Enter the plaza and get agent credentials.""" payload = {"agent_name": agent_name, "owner_persona": owner_persona, "target_persona": target_persona, "metadata": metadata or {}} response = self._call_api("enter_plaza", data=payload) ``` ```python def relay_send(self, relay_id: str, content: str, sender_type: str = "AGENT") -> dict: if not self.relays.get(relay_id, {}).get("token"): raise ValueError(f"Relay {relay_id} not found or not authenticated.") relay_token = self.relays[relay_id]["token"] headers = {"Authorization": f"Bearer {relay_token}"} response = self._call_api("relay/send", data={"relay_id": relay_id, "content": content, "sender_type": sender_type}, headers=headers) ``` ```python def relay_read(self, relay_id: str, cursor: Optional[int] = None) -> dict: if not self.relays.get(relay ...[truncated 3276 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/memory_logger.py:51
Finding

Private Conversations and Owner Persona Persisted in Unprotected Plaintext Logs

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/core.py:43
Finding

Credential Encryption Key Stored Beside the Encrypted Credential File

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (24)

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

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

md
---
name: cyber-friending
description: A skill for an AI agent to represent its owner in AgentNego's Hub Plaza for social interaction, including initial communication, interest matching, risk screening, and establishing secure relay connections with potential friends.
---

Memory Manipulation

High
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

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

md
parser_memory_get_agents = memory_subparsers.add_parser("get-agents", help="Get all interacted agents")
    parser_memory_get_agents.add_argument("agent_id", help="Agent ID")

    parser_memory_clear = memory_subparsers.add_parser("clear", help="Clear memory")
    parser_memory_clear.add_argument("agent_id", help="Agent ID")
    parser_memory_clear.add_argument("--all", action="store_true", help="Clear all memory")

Memory Manipulation

High
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

Scanner excerpt · scripts/cli.py (reported line 95)May include surrounding context.

python
parser_memory_get_agents = memory_subparsers.add_parser("get-agents", help="Get all interacted agents")
    parser_memory_get_agents.add_argument("agent_id", help="Agent ID")

    parser_memory_clear = memory_subparsers.add_parser("clear", help="Clear memory")
    parser_memory_clear.add_argument("agent_id", help="Agent ID")
    parser_memory_clear.add_argument("--all", action="store_true", help="Clear all memory")

Memory Manipulation

High
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

Scanner excerpt · scripts/memory_logger.py (reported line 187)May include surrounding context.

python
parser_memory_get_agents = memory_subparsers.add_parser("get-agents", help="Get all interacted agents")
    parser_memory_get_agents.add_argument("agent_id", help="Agent ID")

    parser_memory_clear = memory_subparsers.add_parser("clear", help="Clear memory")
    parser_memory_clear.add_argument("agent_id", help="Agent ID")
    parser_memory_clear.add_argument("--all", action="store_true", help="Clear all memory")

Memory Manipulation

High
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

Scanner excerpt · scripts/memory_logger.py (reported line 190)May include surrounding context.

python
Clear memory

        Args:
            agent_id: Agent ID for which to clear memory. If None and clear_all=True, all memory will be cleared
            clear_all: Whether to clear all memory
        """
        if os.path.exists(self.log_file):

Memory Manipulation

High
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

Scanner excerpt · scripts/memory_logger.py (reported line 198)May include surrounding context.

python
Clear memory

        Args:
            agent_id: Agent ID for which to clear memory. If None and clear_all=True, all memory will be cleared
            clear_all: Whether to clear all memory
        """
        if os.path.exists(self.log_file):

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill states that a MemoryLogger automatically records all interactions to persistent JSONL files, but it does not clearly warn users before use that conversations and events will be retained on disk. Because this skill handles social messages, contracts, and relay content, silent logging can expose sensitive interpersonal data and increase privacy and compliance risk.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documentation says credentials are stored in an encrypted file (agent_config.enc) while the workflow and credential-management sections say they are saved to agent_config.json. This inconsistency can cause operators to assume stronger protection than actually exists, leading to plaintext token storage and accidental exposure of reusable agent credentials.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill describes automatic saving and reuse of agent credentials but does not prominently warn users that authentication material will be persisted locally. In a delegated social/relay agent, silently caching reusable tokens increases the risk of credential theft, unintended impersonation, and use by other local users or processes.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The credential management section explicitly states agent_id and agent_token are saved to agent_config.json, conflicting with earlier claims that credentials are kept in agent_config.enc. For a skill that handles authentication tokens and automatically reuses them, this ambiguity is security-relevant because it can result in insecure local storage and unsafe operator assumptions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The code automatically generates and stores an encryption key in a local '.config_key' file next to the encrypted credential file, which means local compromise of the skill directory exposes both the ciphertext and the decryption key. This weakens the protection of stored agent credentials and does so silently, without user awareness or stronger OS-backed secret storage.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The skill loads and later persists agent tokens from local storage without any clear controls around secure storage lifecycle, rotation, or user consent. Combined with the colocated key file design, an attacker with local file access can recover reusable authentication tokens and impersonate the agent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

API requests send agent credentials and message content to a hard-coded default endpoint over plain HTTP, so bearer tokens and private message data can be intercepted or modified by any network attacker in path. The risk is elevated because the transmission includes authentication material and potentially sensitive communications.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
97% confidence
Finding

This external transmission is security-relevant because it occurs through the shared API helper using a default plaintext HTTP base URL and may include bearer tokens, agent identifiers, and message contents. In the context of a messaging/negotiation client, exfiltration or tampering of these requests can directly compromise confidentiality and account integrity.

Content

Scanner excerpt · scripts/core.py (reported line 138)May include surrounding context.

python
try:
            if method == "POST":
                response = requests.post(url, json=data, headers=request_headers, timeout=10)
            elif method == "GET":
                response = requests.get(url, params=data, headers=request_headers, timeout=10)
            else:

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The logger persists raw interaction content, topics, keywords, and metadata to disk in a JSONL file, which can include sensitive conversation data or identifiers. In an agent skill context, silent persistence of conversational memory increases privacy and data-handling risk because users or operators may not realize sensitive data is being retained locally.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Contract terms and related metadata are written directly to disk, which may expose sensitive business, legal, or operational details if the host is shared or compromised. Because the code stores the full terms without any classification, redaction, or access controls, it creates unnecessary persistence of sensitive agreement data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

When clear_all is true, the code irreversibly empties the memory log by opening the file in write mode and closing it immediately. This is a destructive operation, and the implementation includes neither a confirmation prompt nor a visible warning at the point of execution.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
96% confidence
Finding

The dependency is specified with a lower bound only, which allows future installs to resolve to different versions over time and makes builds non-reproducible. This is dangerous because security posture cannot be verified reliably, and a newly introduced vulnerable or incompatible release could be pulled in without review.

Content

Scanner excerpt · requirements.txt (reported line 4)May include surrounding context.

text
# Cyber-Friending Skill Dependencies

# HTTP client for API calls
requests>=2.31.0
cryptography>=42.0.0

Unverifiable Dependency: requests has 16 known advisory(ies) (CVE-2014-1830 (Exposure of Sensitive Information to an Unauthorized Actor in Requests); CVE-2024-47081 (Requests vulnerable to .netrc credentials leak via malicious URLs); CVE-2024-35195 (Requests `Session` object does not verify requests after making first request wi) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
87% confidence
Finding

Requests has multiple known advisories, and because the manifest does not pin a version, there is no way to determine whether deployed environments will install a fixed or affected release. This makes the risk real rather than theoretical: a vulnerable version could be selected at install time, potentially exposing secrets, weakening TLS/request handling, or enabling other request-layer issues depending on the resolved version.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
96% confidence
Finding

The cryptography package is also unpinned, so installations are not deterministic and may resolve to different versions across environments or over time. Because this is a security-sensitive library, failing to pin and review the exact version increases the risk of silently installing a release with known vulnerabilities or behavioral changes.

Content

Scanner excerpt · requirements.txt (reported line 5)May include surrounding context.

text
# HTTP client for API calls
requests>=2.31.0
cryptography>=42.0.0

Unverifiable Dependency: cryptography has 16 known advisory(ies) (GHSA-39hc-v87j-747x (Vulnerable OpenSSL included in cryptography wheels); CVE-2023-50782 (Python Cryptography package vulnerable to Bleichenbacher timing oracle attack); GHSA-537c-gmf6-5ccf (Vulnerable OpenSSL included in cryptography wheels) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
88% confidence
Finding

Cryptography is a high-value dependency with numerous published advisories, and the lack of version pinning means affected releases cannot be ruled out. If a vulnerable version is installed, cryptographic protections may be weakened or broken, which can have outsized consequences for confidentiality, integrity, and authentication features that depend on this library.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The file includes user-readable natural-language comments in Chinese such as 确保配置文件路径是相对于技能目录的, while the rest of the file's instructional text is in English. This imposes a language assumption on maintainers or users reading the skill without any opt-in or documented locale-specific justification.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
98% confidence
Finding

The docstring for _current_time says it returns the current time in ISO format, which implies a formatted date-time string. The implementation actually returns time.time(), a Unix timestamp float, which directly contradicts the documented behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

Several comments and docstrings are in Chinese while other user-facing and developer-facing text is in English, indicating an implicit language assumption. The file does not state that the skill is intended for Chinese-speaking users or provide any language/locale opt-in.

Content

No source excerpt is available for this finding.