Back to skill

Security audit

jef1test

Security checks for vulnerabilities and agentic risk

Overview

This looks like a legitimate Maton API gateway skill, but it gives agents broad power to read, write, and delete data across many connected services without enough scoping or safety warnings.

Review before installing. Use this only if you trust Maton with gateway access to your connected services, keep OAuth scopes minimal, verify the exact app and connection before each call, require explicit user approval before any POST/PUT/PATCH/DELETE or message-sending action, and do not print or share MATON_API_KEY in logs, screenshots, or support messages.

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:594
Finding
API Key Disclosure Through Troubleshooting Command## Vulnerability Details **File Location**: `SKILL.md`, lines 594–600 **Vulnerability Type**: Sensitive credential exposure through terminal output **Risk Level**: Medium **Vulnerable Code Snippet**: ```bash ### Troubleshooting: API Key Issues 1. Check that the `MATON_API_KEY` environment variable is set: ```bash echo $MATON_API_KEY ``` ``` ### Technical Analysis The troubleshooting instructions print the complete value of `MATON_API_KEY` merely to determine whether the environment variable is configured. Revealing the credential is unnecessary for that diagnostic purpose. The exposed value may be retained in CI/CD output, terminal recordings, support transcripts, screenshots, screen-sharing sessions, or other logging and monitoring systems. Because the same key is used as a bearer credential for `gateway.maton.ai` and `ctrl.maton.ai`, anyone who obtains it may authenticate as the affected Maton account until the credential is revoked or rotated. The broader network behavior—sending the bearer key and API request data to Maton's gateway—is declared and necessary for the Skill's proxy functionality. The vulnerability is specifically the unnecessary display of the raw key. ### Attack Path 1. A user encounters an authentication problem and follows the documented troubleshooting procedure. 2. The user runs `echo $MATON_API_KEY`. 3. The complete bearer credential appears in terminal output. 4. The output is captured in a CI log, terminal recording, screenshot, support transcript, or screen-sharing session. 5. An attacker or unauthorized observer retrieves the exposed value. 6. The attacker supplies it in an `Authorization: Bearer` header to Maton's control or gateway endpoints. 7. Subject to the key's account permissions and active OAuth connections, the attacker enumerates or manages connections and invokes connected third-party APIs. ### Impact Assessment Successful exploitation may allow impersonation o ...[truncated 726 chars]
Remediation
## Remediation Suggestions Replace the raw-value command with a presence check that never prints the secret: ```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. Explicitly warn users never to print, log, paste, or include the key in screenshots and support tickets. 2. Recommend immediate revocation and rotation if a key has appeared in logs or other captured output. 3. Redact bearer credentials in application, proxy, CI/CD, and support logging systems. 4. Use minimum OAuth scopes for every connected service. 5. Use separate, narrowly scoped connections or credentials for sensitive services where supported. 6. Require confirmation before destructive or high-impact operations, including connection deletion and third-party write actions. 7. Avoid placing unrelated credentials or sensitive metadata in custom headers or request bodies forwarded through the gateway.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (9)

Vague Triggers

Medium
Confidence
95% confidence
Finding
The skill’s activation guidance says to use it whenever users want to interact with external services, which is extremely broad for a capability that can read, modify, or delete data across many third-party systems. In an agent setting, this over-broad trigger increases the chance the skill is invoked for loosely related requests and performs sensitive external actions without sufficiently explicit user intent or service-specific confirmation.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The examples include state-changing operations such as posting Slack messages and creating HubSpot contacts, but they do not warn that these calls can alter real third-party accounts and production data. In an agent workflow, executable-looking examples without safety notes can normalize write actions and make accidental or unauthorized changes more likely.

External Transmission

Medium
Category
Data Exfiltration
Content
### HubSpot - Create Contact (Native API)

```bash
# Native HubSpot API: POST https://api.hubapi.com/crm/v3/objects/contacts
python <<'EOF'
import urllib.request, os, json
data = json.dumps({'properties': {'email': 'john@example.com', 'firstname': 'John', 'lastname': 'Doe'}}).encode()
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
### Airtable - List Tables (Native API)

```bash
# Native Airtable API: GET https://api.airtable.com/v0/meta/bases/{id}/tables
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://gateway.maton.ai/airtable/v0/meta/bases/appgqan2NzWGP5sBK/tables')
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
### Notion - Query Database (Native API)

```bash
# Native Notion API: POST https://api.notion.com/v1/data_sources/{id}/query
python <<'EOF'
import urllib.request, os, json
data = json.dumps({}).encode()
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
### Stripe - List Customers (Native API)

```bash
# Native Stripe API: GET https://api.stripe.com/v1/customers
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://gateway.maton.ai/stripe/v1/customers?limit=10')
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
### JavaScript (Node.js)

```javascript
const response = await fetch('https://gateway.maton.ai/slack/api/chat.postMessage', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
import os
import requests

response = requests.post(
    'https://gateway.maton.ai/slack/api/chat.postMessage',
    headers={'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}'},
    json={'channel': 'C0123456', 'text': 'Hello!'}
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
import os
import requests

response = requests.post(
    'https://gateway.maton.ai/slack/api/chat.postMessage',
    headers={'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}'},
    json={'channel': 'C0123456', 'text': 'Hello!'}
Confidence
70% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

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:497

Example code exposes a concrete connection_id instead of a placeholder.

Critical
Code
suspicious.exposed_resource_identifier
Location
SKILL.md:94