Back to skill

Security audit

UK Company Data API - Companies House Filings and Officers

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward Scavio API guide for UK Companies House lookups, with expected API-key and network use disclosed.

Before installing optional SDK packages, use a virtual environment or project lockfile where possible and provide SCAVIO_API_KEY only to the process that needs it. Be mindful that officer records can include public personal details such as correspondence address and partial date of birth, so use the data only for the requested company check.

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:203
Finding

Third-Party SDK Installation Without Integrity Verification

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 203-224
Vulnerability Type: Supply-chain risk from unverified third-party dependencies
Risk Level: Medium

Vulnerable Code

bash
pip install scavio==0.15.0
python
from scavio import ScavioClient

client = ScavioClient()  # reads SCAVIO_API_KEY
bash
npm install scavio@0.15.0
js
import { Scavio } from "scavio";

const scavio = new Scavio(); // reads SCAVIO_API_KEY

Technical Analysis

The Skill instructs users to install the scavio Python and JavaScript packages from public package registries. Although both packages are pinned to version 0.15.0, the instructions do not provide integrity hashes, lockfiles, verified provenance, trusted registry configuration, or other controls for authenticating the downloaded artifacts and their transitive dependencies.

Package installation may invoke package-manager lifecycle behavior, while subsequent imports execute package code in the user's environment. The examples also demonstrate that the installed SDK reads SCAVIO_API_KEY. Consequently, a compromised package artifact or dependency could execute with the invoking user's privileges and gain access to that credential and other data available to the process.

Version pinning reduces exposure to unexpected future releases, but it does not independently verify package integrity or secure unpinned transitive dependencies.

Attack Path

  1. An attacker compromises a referenced package artifact, maintainer account, package distribution channel, or transitive dependency.
  2. A user follows the Skill instructions and runs pip install scavio==0.15.0 or npm install scavio@0.15.0.
  3. The package manager downloads the affected package or dependency without verification against a project-provided integrity hash or lockfile.
  4. Attacker-controlled code executes during installation or when the SDK is imported and init ...[truncated 907 chars]
Remediation
View remediation

Remediation Suggestions

  1. Prefer the documented direct HTTPS API requests where an SDK is not necessary, reducing the executable dependency surface.
  2. For Python, publish a requirements or lock file containing exact versions and cryptographic hashes, and install with hash verification such as pip install --require-hashes.
  3. For JavaScript, provide and validate a lockfile with integrity metadata, and use reproducible installation such as npm ci.
  4. Pin and audit transitive dependencies rather than relying only on the top-level package version.
  5. Document the expected official registry, package publisher, repository, and artifact provenance so users can detect dependency confusion or package substitution.
  6. Use package provenance or signature verification where supported by the distribution ecosystem.
  7. Disable package lifecycle scripts where feasible, or explicitly document why they are required.
  8. Run installation and SDK execution in a minimally privileged virtual environment, container, or dedicated service account.
  9. Expose SCAVIO_API_KEY only to the process that requires it, use a restricted key where supported, and rotate the key if dependency compromise is suspected.
  10. Add automated dependency scanning and periodic review of the pinned SDK releases and their transitive dependency trees.
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 54)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 128)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 132)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 136)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 140)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 152)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)