Back to skill

Security audit

Datagate

Security checks for vulnerabilities and agentic risk

Overview

DataGate is a small local JSON-schema validation service with disclosed behavior and no evidence of hidden data collection or persistence.

Install only in an environment where resolving current Python packages is acceptable. Run the server locally or behind trusted access controls, and do not expose it to untrusted networks without adding request limits, timeouts, and rate limiting.

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

T09 · Insecure Skill Coding Practices

Warning
Location
datagate/app.py:35
Finding
Unbounded Schema Validation Can Cause Resource Exhaustion## Vulnerability Details **File Location**: `datagate/models.py:10-17`, `datagate/app.py:35-42` **Vulnerability Type**: Uncontrolled resource consumption **Risk Level**: Medium ### Vulnerable Code `datagate/models.py:10-17`: ```python class ValidateRequest(BaseModel): model_config = ConfigDict(extra="forbid") json_schema: dict[str, Any] = Field( ..., description="JSON Schema to validate against." ) payload: Any = Field(..., description="The data payload to validate.") ``` `datagate/app.py:35-42`: ```python for error in sorted(validator.iter_errors(request.payload), key=lambda e: list(e.path)): path = ".".join(str(p) for p in error.absolute_path) or "$" errors.append(ValidationError(path=path, message=error.message)) return ValidateResponse( valid=len(errors) == 0, error_count=len(errors), errors=errors, ) ``` ### Technical Analysis The API accepts arbitrarily sized and deeply nested schemas and payloads. It does not impose application-level limits on body size, nesting depth, schema complexity, validation duration, or the number of generated errors. `validator.iter_errors()` can produce a large number of validation errors for an adversarial payload. The call to `sorted()` materializes the complete iterator in memory before processing begins. The application then creates and retains a second collection of Pydantic `ValidationError` objects and serializes all of them into the response. Large or complex inputs can therefore consume substantial CPU and memory at several stages: 1. Parsing the request body. 2. Checking the supplied schema. 3. Traversing the payload during validation. 4. Materializing and sorting all validation errors. 5. Constructing and serializing the complete response. Certain combinations of nested schemas, combinatorial schema constructs, and payloads containing many invalid elements can amplify validation work and response s ...[truncated 1096 chars]
Remediation
## Remediation Suggestions - Enforce a strict maximum HTTP request-body size at the reverse proxy and application layers. - Add limits for schema size, payload size, nesting depth, array length, object property count, and schema complexity. - Stop validation after a configured maximum number of errors instead of materializing every error. - Avoid `sorted()` over an unbounded iterator. Iterate incrementally and terminate once the error limit is reached. - Apply per-client rate limiting and concurrency controls to the endpoint. - Configure request and worker timeouts, along with container or process CPU and memory limits. - Consider executing complex validation in an isolated worker with a bounded execution budget. - Return a truncated-results indicator when additional validation errors exist beyond the configured cap.

T08 · Insecure Dependencies

Note
Location
SKILL.md:4
Finding
Third-Party Dependencies Are Installed Without Version or Integrity Pinning## Vulnerability Details **File Location**: `SKILL.md:4` **Vulnerability Type**: Unpinned third-party dependencies **Risk Level**: Low ### Vulnerable Code ```yaml metadata: {"openclaw":{"emoji":"✅","requires":{"bins":["python"]},"install":[{"id":"pip","kind":"uv","packages":["fastapi","uvicorn","pydantic","jsonschema"]}]}} ``` ### Technical Analysis The installation metadata specifies package names without exact versions, a lockfile, or integrity hashes. Consequently, installation resolves whichever compatible releases are available from the configured package source at that time. This makes builds non-reproducible and prevents the reviewed source from defining the exact dependency code that will execute. A future compromised, malicious, or incompatible upstream release could be installed without a corresponding change to this project. The available evidence does not indicate that any currently named package is malicious; the risk arises from mutable dependency resolution and absent integrity controls. ### Attack Path 1. An upstream package account, release process, or configured package repository is compromised, or a problematic future release is published. 2. A user installs the Skill after that release becomes the version selected by the resolver. 3. Because no exact versions or hashes are specified, the installation retrieves the changed package. 4. Dependency code executes during installation, import, or application runtime with the privileges of the user or service running DataGate. ### Impact Assessment The ultimate impact depends on the behavior of a compromised dependency and the privileges assigned to installation and runtime. Such code could potentially access application data, environment variables, files, or network resources available to the DataGate process. This finding does not itself demonstrate compromise, arbitrary code execution, or a malicious dependency in the audited project.
Remediation
## Remediation Suggestions - Pin every direct dependency to an exact, reviewed version. - Generate and commit a lockfile that records the complete transitive dependency graph. - Use package hashes or equivalent integrity verification where the installation system supports them. - Install only from explicitly trusted package indexes over authenticated TLS. - Run automated dependency vulnerability and provenance checks in continuous integration. - Review and deliberately update pinned versions on a regular schedule rather than resolving mutable latest releases during installation. - Perform installation and runtime under a dedicated, least-privileged account or isolated container.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (1)

External Transmission

Medium
Category
Data Exfiltration
Content
## Validate data

```bash
curl -s -X POST http://localhost:8004/v1/validate \
  -H "Content-Type: application/json" \
  -d '{
    "json_schema": {
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Static analysis

No suspicious patterns detected.