Back to skill

Security audit

Api Gateway 1

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent API gateway skill, but it gives broad read/write/delete access to connected business apps and includes unsafe troubleshooting that can print the API key.

Install only if you trust Maton and intend to let an agent operate across the connected services you authorize. Use narrowly scoped OAuth grants where possible, avoid connecting high-risk admin or financial accounts unless needed, require human confirmation before deletes, sends, refunds, permission changes, or public posts, and do not print or log MATON_API_KEY.

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

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:541
Finding

MATON API Key Exposure Through Troubleshooting Command

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 541–545
Vulnerability Type: Sensitive credential disclosure
Risk Level: Medium

Vulnerable Code

markdown
1. Check that the `MATON_API_KEY` environment variable is set:

```bash
echo $MATON_API_KEY
text

### Technical Analysis

The troubleshooting procedure prints the complete `MATON_API_KEY` bearer credential to standard output. Although the key is not hardcoded in the project, displaying it violates secure secret-handling practices.

Terminal output may be retained in agent transcripts, shell histories, CI logs, observability platforms, support records, or screen recordings. The Skill documents the same key as the bearer credential for both `gateway.maton.ai` and `ctrl.maton.ai`. Consequently, exposure of this value can provide access to Maton connection-management operations and proxied third-party APIs associated with the account.

### Attack Path

1. A user or operator encounters an authentication problem.
2. The agent follows the documented troubleshooting procedure.
3. The command `echo $MATON_API_KEY` writes the complete credential to captured terminal output.
4. An attacker or unauthorized operator with access to the transcript, logs, or monitoring output retrieves the key.
5. The attacker submits the key as a bearer credential to Maton control or gateway endpoints.
6. The attacker enumerates available connections and invokes operations allowed by the third-party OAuth grants associated with those connections.

Exploitation therefore requires access to output containing the disclosed value. The project does not establish that such access already exists.

### Impact Assessment

A disclosed key may allow an attacker to:

- Enumerate Maton connections associated with the affected account.
- Invoke supported third-party APIs through active OAuth connections.
- Read, create, update, or delete third-party data where the correspon
...[truncated 498 chars]
Remediation
View remediation

Remediation Suggestions

Replace secret-printing instructions with a presence-only test:

bash
if [ -n "${MATON_API_KEY:-}" ]; then
  echo "MATON_API_KEY is set"
else
  echo "MATON_API_KEY is not set"
fi

Additional hardening measures:

  1. Never print, log, interpolate into error messages, or include the complete key in diagnostic output.
  2. If identification is necessary, display only a short non-sensitive fingerprint generated locally rather than any reusable portion of the credential.
  3. Redact Authorization headers and connection session tokens in logging and observability systems.
  4. Mark the key as a masked secret in CI/CD and agent execution environments.
  5. Avoid shell tracing such as set -x while handling the credential.
  6. Rotate the key if it has previously appeared in retained terminal output, transcripts, or logs.
  7. Review stored logs and transcripts for historical disclosure and remove them according to the applicable retention policy.
Vulnerability Patterns
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • 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
Findings (415)

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/active-campaign.md (reported line 47)May include surrounding context.

Delete Contact

bash
DELETE /active-campaign/api/3/contacts/{contactId}

Tags

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/active-campaign.md (reported line 87)May include surrounding context.

Remove Tag from Contact

bash
DELETE /active-campaign/api/3/contactTags/{contactTagId}

Lists

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/acuity-scheduling.md (reported line 127)May include surrounding context.

Delete Block

bash
DELETE /acuity-scheduling/api/v1/blocks/{id}

List Forms

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/airtable.md (reported line 99)May include surrounding context.

Delete Records

bash
DELETE /airtable/v0/{baseId}/{tableIdOrName}?records[]=recXXXXX&records[]=recYYYYY

List Bases

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/asana.md (reported line 64)May include surrounding context.

Delete a Task

bash
DELETE /asana/api/1.0/tasks/{task_gid}

Get Subtasks

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/asana.md (reported line 134)May include surrounding context.

Delete Webhook

bash
DELETE /asana/api/1.0/webhooks/{webhook_gid}

Notes

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/attio.md (reported line 76)May include surrounding context.

Delete Record

bash
DELETE /attio/v2/objects/{object}/records/{record_id}

List Tasks

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/beehiiv.md (reported line 61)May include surrounding context.

Delete Subscription

bash
DELETE /beehiiv/v2/publications/{publication_id}/subscriptions/{subscription_id}

Posts

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
88% confidence
Finding

Documenting a folder deletion endpoint exposes a high-risk action that can be triggered if an agent is induced to act on attacker-supplied folder IDs or ambiguous user instructions. In this OAuth-connected API gateway context, the call operates on real user-authorized Box content, so misuse can cause permanent or difficult-to-recover data loss.

Content

Scanner excerpt · references/box.md (reported line 72)May include surrounding context.

Delete Folder

bash
DELETE /box/2.0/folders/{folder_id}
DELETE /box/2.0/folders/{folder_id}?recursive=true

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

The recursive folder deletion variant is especially dangerous because a single parameter materially amplifies the blast radius from one folder to an entire subtree. If an agent passes recursive=true without strong safeguards, large amounts of authorized Box content may be deleted through a single request.

Content

Scanner excerpt · references/box.md (reported line 73)May include surrounding context.

Delete Folder

bash
DELETE /box/2.0/folders/{folder_id}
DELETE /box/2.0/folders/{folder_id}?recursive=true

Get File

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
87% confidence
Finding

The file deletion endpoint enables direct destructive action on user-connected Box files and is susceptible to parameter abuse if an agent accepts untrusted file IDs or inferred targets. Because the gateway can act on third-party SaaS data under the user's OAuth grant, an incorrect or manipulated request can destroy important content.

Content

Scanner excerpt · references/box.md (reported line 98)May include surrounding context.

Delete File

bash
DELETE /box/2.0/files/{file_id}

Create Shared Link

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
84% confidence
Finding

The trash deletion endpoint can permanently remove or alter recoverability of trashed files, making it more sensitive than a simple listing operation. In an agent workflow, an attacker could steer the tool toward destructive cleanup actions on resources identified only by IDs, leading to irreversible loss.

Content

Scanner excerpt · references/box.md (reported line 141)May include surrounding context.

Trash

bash
GET /box/2.0/folders/trash/items
DELETE /box/2.0/files/{file_id}/trash
DELETE /box/2.0/folders/{folder_id}/trash

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Deleting a folder from trash may permanently remove an entire folder's recoverable contents, which can have broader impact than deleting a single file. Without warnings or guardrails, an agent may execute this on attacker-influenced or mistaken folder IDs and cause irreversible loss of user data.

Content

Scanner excerpt · references/box.md (reported line 142)May include surrounding context.

bash
GET /box/2.0/folders/trash/items
DELETE /box/2.0/files/{file_id}/trash
DELETE /box/2.0/folders/{folder_id}/trash

Collections

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Webhook deletion is less directly destructive to stored content but can disable monitoring, automation, or security workflows tied to Box events. In a connected enterprise environment, deleting the wrong webhook could create availability or visibility gaps that persist until manually repaired.

Content

Scanner excerpt · references/box.md (reported line 160)May include surrounding context.

bash
GET /box/2.0/webhooks
POST /box/2.0/webhooks
DELETE /box/2.0/webhooks/{webhook_id}

Pagination

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/brevo.md (reported line 56)May include surrounding context.

Delete Contact

bash
DELETE /brevo/v3/contacts/{identifier}

Lists

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/cal-com.md (reported line 50)May include surrounding context.

Delete Event Type

bash
DELETE /cal-com/v2/event-types/{eventTypeId}

Event Type Webhooks

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/cal-com.md (reported line 77)May include surrounding context.

Delete Webhook

bash
DELETE /cal-com/v2/event-types/{eventTypeId}/webhooks/{webhookId}

Bookings

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/cal-com.md (reported line 130)May include surrounding context.

Delete Schedule

bash
DELETE /cal-com/v2/schedules/{scheduleId}

Availability Slots

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/cal-com.md (reported line 188)May include surrounding context.

Delete Webhook

bash
DELETE /cal-com/v2/webhooks/{webhookId}

Teams

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
83% confidence
Finding

A raw DELETE endpoint for webhook subscriptions can be abused if an agent is induced to act on an attacker-supplied UUID, disabling event delivery and disrupting integrations. In a managed API gateway context, destructive tool parameters are more dangerous because agents may execute them automatically unless the skill clearly requires verification and confirmation.

Content

Scanner excerpt · references/calendly.md (reported line 89)May include surrounding context.

Delete Webhook Subscription

bash
DELETE /calendly/webhook_subscriptions/{uuid}

Notes

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/callrail.md (reported line 120)May include surrounding context.

Delete Tag

bash
DELETE /callrail/v3/a/{account_id}/tags/{tag_id}.json

Users

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/clickfunnels.md (reported line 88)May include surrounding context.

Delete Contact

bash
DELETE /clickfunnels/api/v2/contacts/{contact_id}

Upsert Contact

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/clickfunnels.md (reported line 208)May include surrounding context.

Delete Webhook Endpoint

bash
DELETE /clickfunnels/api/v2/webhooks/outgoing/endpoints/{endpoint_id}

Images

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/clicksend.md (reported line 49)May include surrounding context.

GET /clicksend/v3/sms/templates POST /clicksend/v3/sms/templates PUT /clicksend/v3/sms/templates/{template_id} DELETE /clicksend/v3/sms/templates/{template_id}

text

### MMS

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/clicksend.md (reported line 88)May include surrounding context.

GET /clicksend/v3/lists/{list_id} POST /clicksend/v3/lists PUT /clicksend/v3/lists/{list_id} DELETE /clicksend/v3/lists/{list_id}

text

### Contacts

Static analysis

Detected: suspicious.exposed_resource_identifier

Example code exposes a concrete Google Sheets spreadsheet ID instead of a placeholder.

Critical
Code
suspicious.exposed_resource_identifier
Location
SKILL.md:442

Example code exposes a concrete connection_id instead of a placeholder.

Critical
Code
suspicious.exposed_resource_identifier
Location
SKILL.md:94