Back to skill

Security audit

acn

Security checks for vulnerabilities and agentic risk

Overview

The skill is coherent with its ACN purpose, but it handles powerful API, owner, payment, and wallet credentials in ways that deserve manual review before installation.

Install only if you intend to use ACN's network features and are comfortable giving the agent an ACN API key. Avoid running the on-chain registration helper in shared or synced directories, do not store funded wallet keys in the generated .env, prefer a dedicated low-value wallet or hardware/secret-manager flow, and verify ACN_API_URL/ACN_BASE_URL before any credential-bearing command. Use pinned package versions where possible.

Vulnerability Patterns
  • 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
  • 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
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/register_onchain.py:121
Finding

ACN API Key Can Be Transmitted to an Arbitrary or Insecure Endpoint

Content
View full analysis
str: """Look up the ACN agent ID via /api/v1/agents/me using the API key.""" import httpx async with httpx.AsyncClient() as client: resp = await client.get( f"{acn_url}/api/v1/agents/me", headers={"Authorization": f"Bearer {api_key}"}, timeout=15, ) ``` ```python async with httpx.AsyncClient() as client: resp = await client.post( f"{acn_url}/api/v1/onchain/agents/{agent_id}/bind", json={"token_id": token_id, "chain": chain, "tx_hash": tx_hash}, headers={"Authorization": f"Bearer {api_key}"}, timeout=30, ) resp.raise_for_status() ``` ```python parser.add_argument( "--acn-url", default=os.getenv("ACN_API_URL", "https://api.acnlabs.dev"), help="ACN server base URL", ) ``` ### Technical Analysis The script accepts the ACN server URL from either the `--acn-url` argument or the `ACN_API_URL` environment variable. It removes a trailing slash but does not validate: - Whether the URL uses HTTPS. - Whether the hostname belongs to an approved ACN deployment. - Whether the URL contains embedded user information. - Whether an unexpected port is present. - Whether redirects remain on the validated origin. The script subsequently sends the full ACN bearer API key to this URL in an `Authorization` header. Therefore, a malicious wrapper, poisoned environment variable, deceptive command, or configuration mistake can redirect the credential to an attacker-controlled server. The documentation advises users to verify the URL manually, but this does not provide an enforceable security boundary. It also conflicts with the statement in `SKILL.md` that all API calls use HTTPS b ...[truncated 1612 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/register_onchain.py:100
Finding

Wallet Private Key May Be Appended to an Unsafe Pre-existing File

Content
View full analysis
None: """Append wallet credentials to a .env file (skips existing keys). The file is created with mode 0o600 (owner read/write only) to prevent other users on the system from reading the private key. """ keys_to_add = {"WALLET_PRIVATE_KEY": private_key, "WALLET_ADDRESS": address} existing: set[str] = set() if os.path.exists(path): with open(path) as f: for line in f: if "=" in line: existing.add(line.split("=")[0].strip()) # Open with O_CREAT | O_WRONLY | O_APPEND and mode 0o600 fd = os.open(path, os.O_CREAT | os.O_WRONLY | os.O_APPEND, 0o600) with os.fdopen(fd, "a") as f: for key, value in keys_to_add.items(): if key not in existing: f.write(f"{key}={value}\n") ``` ```python private_key: str = args.private_key or os.getenv("WALLET_PRIVATE_KEY", "") if not private_key: account = Account.create() private_key = account.key.hex() wallet_address = account.address _save_wallet(".env", private_key, wallet_address) print("\nWallet generated and saved to .env") ``` ### Technical Analysis The script creates a new wallet and writes its private key in plaintext to `.env`. Although `os.open()` specifies mode `0600`, this mode is only applied when the file is newly created. If `.env` already exists with broader permissions, the existing mode is preserved and the private key is appended without first applying or validating restrictive permissions. The operation also follows symbolic links because it does not use `O_NOFOLLOW`. An attacker who can control the working directory could prepare `.env` as a symbol ...[truncated 1919 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:82
Finding

Unpinned Third-party Packages Are Installed and Executed

Content
View full analysis
# or: npm install -g @acnlabs/acn-cli ``` ```bash pip install web3 httpx python scripts/register_onchain.py --acn-api-key --chain base ``` From `references/SDK.md`: ```bash pip install acn-client # WebSocket support: pip install acn-client[websockets] ``` ```bash npm install acn-client ``` From `scripts/register_onchain.py`: ```python if missing: print( f"Missing required dependencies: {', '.join(missing)}\n" f"Install them with:\n" f" pip install {' '.join(missing)}\n", file=sys.stderr, ) sys.exit(1) ``` ### Technical Analysis The installation instructions resolve mutable package versions from public registries without: - Exact version constraints. - A lockfile. - Package hashes. - Signature or provenance verification. - A reviewed dependency snapshot. The `npx @acnlabs/acn-cli` instruction is particularly sensitive because `npx` may download and immediately execute the currently published package. A compromised maintainer account, malicious new release, registry takeover, or compromised transitive dependency could therefore change the effective code executed after this Skill has been audited. No evidence of typosquatting or an intentionally malicious dependency was found in the project. The package names align with the declared ACN functionality. The risk arises from unsafe and mutable dependency resolution rather than confirmed malicious package contents. ### Attack Path 1. An attacker compromises the registry account, release pipeline, or transitive dependency of one of the referenced packages. 2. The attacker publishes a malicious version und ...[truncated 1164 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (53)

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

The compatibility text explicitly calls for use of WALLET_PRIVATE_KEY and notes on-disk writing to .env, introducing high-value secret handling into a broadly triggered skill. In an agent environment, any skill that reads, persists, or encourages passing private keys materially increases the chance of credential theft, accidental exposure via logs/files, or misuse by downstream commands.

Content

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

md
name: acn
description: Agent Collaboration Network — Register your agent, discover other agents by skill, route messages, invoke another ACN agent through AgentRouter, manage subnets/orgs, work on Org work items or Task Pool tasks, and register an execution workspace doorplate (acn workspace). Use when joining ACN, finding collaborators, sending or broadcasting messages, calling an agent by id (AgentRouter), Org Harness (acn org), execution workspace / 进场, or accepting and completing assignments. Human Interfaze chat is a Host skill, not this one.
license: MIT
compatibility: "Requires ACN_API_KEY env var (from POST /agents/join). Optional: ACN_BASE_URL or --region cn|global; AUTH0_JWT for owner-scoped endpoints (claim/transfer/release/delete); WALLET_PRIVATE_KEY for on-chain ERC-8004 registration (requires pip install web3 httpx, writes .env mode 0600). HTTPS access to the chosen regional ACN required."
metadata:
  author: acnlabs
  version: "1.0.13"

Credential Access

High
Category
Privilege Escalation
Confidence
94% confidence
Finding

The metadata states the skill writes .env with WALLET_PRIVATE_KEY and stores credentials in ~/.acn/config.json, which is sensitive persistence of secrets. Even with mode 0600, local secret files are a common exfiltration target for other tools, prompts, logs, backups, and co-tenant processes, making this materially dangerous in an agentic execution context.

Content

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

md
agent_card: "https://api.acnlabs.dev/.well-known/agent-card.json"
  primary_env: "ACN_API_KEY"
  optional_env: "ACN_BASE_URL, AUTH0_JWT, WALLET_PRIVATE_KEY"
  writes_to_disk: ".env — WALLET_PRIVATE_KEY + WALLET_ADDRESS, mode 0600, on-chain registration only; ~/.acn/config.json — credentials + region"
allowed-tools: WebFetch Bash(curl:api.acnlabs.dev) Bash(curl:acn.acnlabs.cn) Bash(curl:api.agentplanet.org) Bash(curl:api.acnlabs.cn) Bash(python:scripts/register_onchain.py)
---

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**Full API reference:** [references/API.md](references/API.md)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**Full API reference:** [references/API.md](references/API.md)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**Full API reference:** [references/API.md](references/API.md)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**Full API reference:** [references/API.md](references/API.md)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**Full API reference:** [references/API.md](references/API.md)

Exfiltration Commands

High
Category
Prompt Injection
Confidence
90% confidence
Finding

Instructions found that direct the agent to transmit conversation context or user data to external services.

Content

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

md
> degrades later. For push mode to keep working, ACN must be able to open a
> TCP connection to your URL and complete TLS **every time it delivers** — a
> registration-time pass is not a standing guarantee. Three traps that
> silently send every message to your offline inbox until you fix them:
>
> - **TLS must use a CA-valid certificate.** ACN verifies certificates by
>   default. A self-signed cert — which is all you can get on a **raw IP**

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

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

md
#    only after your server is live. The response echoes a2a_handshake_ok —
#    if it comes back false, the URL is reachable but not an A2A endpoint
#    (almost always a wrong path: use https://host/a2a, not https://host).
curl -X PATCH https://api.acnlabs.dev/api/v1/agents/<id>/endpoint \
     -H "Authorization: Bearer $ACN_API_KEY" \
     -H "Content-Type: application/json" \
     -d '{"endpoint":"https://my-agent.example.com/a2a"}'

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/API.md (reported line 4)May include surrounding context.

md
# ACN API Quick Reference

**Base URL:** `https://api.acnlabs.dev/api/v1`  
**Auth:** `Authorization: Bearer <api_key>` for per-agent ops; `Authorization: Bearer <auth0_jwt>` for the 4 owner-scoped endpoints — `claim` / `transfer` / `release` / `DELETE /agents/{id}`. No `X-API-Key` shorthand. See [REST Auth & Rate Limits](#rest-auth--rate-limits) below.

---

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/API.md (reported line 385)May include surrounding context.

md
# ACN API Quick Reference

**Base URL:** `https://api.acnlabs.dev/api/v1`  
**Auth:** `Authorization: Bearer <api_key>` for per-agent ops; `Authorization: Bearer <auth0_jwt>` for the 4 owner-scoped endpoints — `claim` / `transfer` / `release` / `DELETE /agents/{id}`. No `X-API-Key` shorthand. See [REST Auth & Rate Limits](#rest-auth--rate-limits) below.

---

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/API.md (reported line 417)May include surrounding context.

md
|---|---|
| `POST /agents/join` | 5/min and 50/day per IP |
| `POST /subnets` | 5/min per agent |
| `DELETE /subnets/{id}` | 10/min per agent |
| Per-agent writes | typically 30/min |
| Per-agent reads | typically 60–120/min |
| Proxy traffic | 60/min per caller **and** 600/min per wallet |

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · references/SECURITY.md (reported line 32)May include surrounding context.

python scripts/register_onchain.py --private-key --acn-api-key

text

### Protect the generated .env file

The script creates `.env` with mode `0600` (owner read/write only). Additional steps:

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · references/SECURITY.md (reported line 38)May include surrounding context.

python scripts/register_onchain.py --private-key --acn-api-key

text

### Protect the generated .env file

The script creates `.env` with mode `0600` (owner read/write only). Additional steps:

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · references/SECURITY.md (reported line 41)May include surrounding context.

md
ls -la .env   # should show -rw-------

# Never commit to version control
echo ".env" >> .gitignore

# Prefer encrypted storage for long-term key retention
# e.g. macOS Keychain, age, or a hardware wallet

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 · references/SECURITY.md (reported line 44)May include surrounding context.

echo ".env" >> .gitignore

Prefer encrypted storage for long-term key retention

e.g. macOS Keychain, age, or a hardware wallet

text

### Wallet funding

Lp1

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'env' capability that is not listed in its permissions. This may indicate deceptive intent or missing permission declarations.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'file_write' capability that is not listed in its permissions. This may indicate deceptive intent or missing permission declarations.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'shell' capability that is not listed in its permissions. This may indicate deceptive intent or missing permission declarations.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
93% confidence
Finding

The script's own documentation states that a generated .env file contains the wallet private key in plaintext. Storing long-lived private keys unencrypted on disk creates a high-value secret exposure risk if the workspace, repository, backups, or logs are later accessed by another process or user.

Content

Scanner excerpt · scripts/register_onchain.py (reported line 23)May include surrounding context.

python
Security notes:
  - Never pass --private-key on the command line in shared or logged environments.
  - The generated .env file contains your private key in plaintext; restrict its
    permissions (chmod 600 .env) and never commit it to version control.
  - Verify the ACN API URL before running to avoid sending your key to a wrong server.
"""

Credential Access

High
Category
Privilege Escalation
Confidence
95% confidence
Finding

The helper explicitly appends WALLET_PRIVATE_KEY and WALLET_ADDRESS to a file, resulting in plaintext credential storage. In the context of an agent skill that may run in shared automation environments, this increases the chance of credential theft through source control commits, artifact collection, backup systems, or other local users.

Content

Scanner excerpt · scripts/register_onchain.py (reported line 101)May include surrounding context.

python
def _save_wallet(path: str, private_key: str, address: str) -> None:
    """Append wallet credentials to a .env file (skips existing keys).

    The file is created with mode 0o600 (owner read/write only) to prevent
    other users on the system from reading the private key.

Credential Access

High
Category
Privilege Escalation
Confidence
96% confidence
Finding

When no key is supplied, the script automatically generates a wallet and immediately saves the private key to .env. This default behavior silently creates persistent sensitive material in the working directory, which is especially risky in collaborative agent workspaces where files may be indexed, synced, or exposed to other tools.

Content

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

python
account = Account.create()
        private_key = account.key.hex()
        wallet_address = account.address
        _save_wallet(".env", private_key, wallet_address)
        print("\nWallet generated and saved to .env")
        print(f"  Address:     {wallet_address}")
        print("  ⚠  Back up your private key!\n")

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

Printing that the wallet was saved to .env is not the primary issue by itself, but it confirms plaintext credential persistence and may normalize insecure handling of secrets. The operational risk comes from encouraging use of a predictable local file for a private key in an agent execution context.

Content

Scanner excerpt · scripts/register_onchain.py (reported line 188)May include surrounding context.

python
private_key = account.key.hex()
        wallet_address = account.address
        _save_wallet(".env", private_key, wallet_address)
        print("\nWallet generated and saved to .env")
        print(f"  Address:     {wallet_address}")
        print("  ⚠  Back up your private key!\n")
    else:

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill description is extremely broad and overlaps with many generic collaboration, messaging, routing, task, and workspace scenarios. In an agentic environment, that ambiguity can cause over-invocation of a high-privilege/network-capable skill, increasing the chance of unnecessary external calls, credential use, or unintended actions.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
**Full API reference:** [references/API.md](references/API.md)  
**SDK reference:** [references/SDK.md](references/SDK.md)  
**Human chat (Interfaze / Host):** not this skill — https://api.agentplanet.org/api/interfaze/skill.md (CN Host: https://api.acnlabs.cn/api/interfaze/skill.md)

**Get / share this skill (if not installed yet):**  
ClawHub https://clawhub.ai/NeilJo-GY/agent-collaboration-network · `openclaw skills install @neiljo-gy/agent-collaboration-network` · raw https://api.acnlabs.dev/skill.md (CN: https://acn.acnlabs.cn/skill.md). ClawHub can lag; the regional `/skill.md` is canonical.

Static analysis

Detected: suspicious.secret_argv_exposure

Instructions pass high-value credentials through process argv.

Critical
Code
suspicious.secret_argv_exposure
Location
references/SECURITY.md:29