Back to skill

Security audit

Companies House API - UK Company Search, Officers, Filings

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent Companies House lookup skill; its main cautions are normal third-party API use, API-key handling, paid credits, and optional SDK installation.

Before installing or using it, confirm you are comfortable sending company lookup queries and your Scavio API key to Scavio, monitor paid credit usage, prefer direct HTTPS calls if you do not need the SDKs, and install any SDK in a constrained environment with normal dependency-review practices.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (1)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:212
Finding

Third-Party SDK Installation Without Integrity Verification

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 212 and 229
Vulnerability Type: Supply-chain exposure through third-party package installation
Risk Level: Medium

Vulnerable Code Snippet

bash
pip install scavio==0.15.0
bash
npm install scavio@0.15.0

Technical Analysis

The Skill recommends installing Python and JavaScript SDKs from public package registries. Although both dependencies are pinned to version 0.15.0, the instructions do not provide cryptographic hashes, lockfiles, package provenance, or source-verification procedures.

Version pinning prevents unintended upgrades but does not protect against a compromised publisher account, malicious package release, registry compromise, or package artifact replacement. Python package installation may execute build-system code, while npm packages may execute lifecycle scripts during installation. Imported SDK code also executes within the calling agent's process.

The SDKs are not strictly necessary for the declared functionality because SKILL.md already documents direct HTTPS requests to the Scavio API. Consequently, installing executable third-party code increases the Skill's local privilege and supply-chain exposure beyond the minimum required for API access.

There is no evidence in the reviewed project that scavio==0.15.0 or scavio@0.15.0 is currently malicious. The finding concerns the unverified installation workflow and resulting trust boundary.

Attack Path

  1. An attacker compromises the relevant package publisher account, registry infrastructure, or pinned package artifact.
  2. The attacker introduces malicious installation, build, lifecycle, or runtime code into version 0.15.0.
  3. A user follows the Skill instructions and installs the affected package.
  4. Malicious code executes during package installation or when the SDK is imported.
  5. The code runs with the installing user's privileges and may access ...[truncated 866 chars]
Remediation
View remediation

Remediation Suggestions

  1. Prefer the documented direct HTTPS API workflow, which avoids executing an optional SDK locally.
  2. If SDK use is retained, provide lockfiles and verify package artifacts using cryptographic hashes or registry integrity metadata.
  3. Publish links to the authoritative source repositories and document a process for verifying package provenance and release signatures.
  4. For Python, use hash-locked requirements such as pip install --require-hashes -r requirements.txt.
  5. For npm, commit a reviewed lockfile, use npm ci, and consider --ignore-scripts when lifecycle scripts are unnecessary.
  6. Install dependencies inside a sandboxed virtual environment or container with minimal filesystem, secret, and network access.
  7. Do not expose SCAVIO_API_KEY or unrelated credentials during package installation.
  8. Perform dependency scanning and package-content review before approving future SDK versions.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (6)

Session Persistence

Medium
Category
Rogue Agent
Confidence
80% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

md
| Endpoint | Credits | What it returns |
|---|---|---|
| `POST /api/v1/companieshouse/search` | 1 | **Start here.** Name search returning the company number |
| `POST /api/v1/companieshouse/company` | 1 | Full register entry for one company |
| `POST /api/v1/companieshouse/officers` | 1 | Officers current and resigned, 35 per page |
| `POST /api/v1/companieshouse/filing-history` | 1 | Filings, most recent first, with the filed PDF |

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 142)May include surrounding context.

md
HEADERS = {"Authorization": f"Bearer {API_KEY}"}

# 1. Find the company number - matches former names too
hits = requests.post(f"{BASE}/api/v1/companieshouse/search", headers=HEADERS,
    json={"query": "Monzo Bank", "page": 1}).json()

# 2. Full register entry. Loose numbers are fine - "445790" and "sc090312" both work.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 146)May include surrounding context.

md
json={"query": "Monzo Bank", "page": 1}).json()

# 2. Full register entry. Loose numbers are fine - "445790" and "sc090312" both work.
company = requests.post(f"{BASE}/api/v1/companieshouse/company", headers=HEADERS,
    json={"company_number": "09446231"}).json()

# 3. Officers, current and resigned

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 150)May include surrounding context.

md
json={"company_number": "09446231"}).json()

# 3. Officers, current and resigned
officers = requests.post(f"{BASE}/api/v1/companieshouse/officers", headers=HEADERS,
    json={"company_number": "09446231", "page": 1}).json()

# 4. Filings, most recent first (note the hyphen in the path)

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 154)May include surrounding context.

json={"company_number": "09446231", "page": 1}).json()

4. Filings, most recent first (note the hyphen in the path)

filings = requests.post(f"{BASE}/api/v1/companieshouse/filing-history", headers=HEADERS, json={"company_number": "09446231", "page": 1}).json()

text

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 166)May include surrounding context.

md
"""1 credit per page. Stop on the first empty page."""
    pages = []
    for page in range(1, max_pages + 1):
        data = requests.post(f"{BASE}/api/v1/companieshouse/{path}", headers=HEADERS,
                             json={"company_number": company_number, "page": page}).json()["data"]
        if not data:
            break                     # empty page: past the end (or nothing to list at all)