Back to skill

Security audit

Google seach console

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward cURL guide for using Google Search Console through Maton, but users should handle the API key and delete examples carefully.

Install only if you intend to use Maton as a gateway for Google Search Console. Do not paste or print the full MATON_API_KEY in chats, logs, or support tickets, and verify connection IDs, site URLs, and sitemap paths before running DELETE or PUT examples.

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

Plaintext API Key Disclosure in Troubleshooting Command

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 306
Vulnerability Type: Plaintext sensitive-data exposure
Risk Level: Medium

Vulnerable Code:

bash
echo $MATON_API_KEY

Technical Analysis

The troubleshooting instructions recommend printing the complete MATON_API_KEY value to standard output. This value is used as a bearer credential in authorization headers throughout the Skill.

Revealing a bearer credential in terminal output creates an avoidable disclosure risk. Output may be retained in AI-agent transcripts, CI/CD logs, shell session recordings, screen captures, support tickets, or centralized logging systems. Bearer credentials generally do not require additional proof of identity, so possession of the exposed value may be sufficient for unauthorized API access.

Attack Path

  1. A user or automated agent follows the documented API-key troubleshooting procedure.
  2. The command prints the complete MATON_API_KEY value.
  3. The output is captured in a transcript, build log, terminal recording, diagnostic bundle, or support conversation.
  4. An unauthorized party with access to that retained output extracts the credential.
  5. The party supplies the key as an Authorization: Bearer credential to Maton endpoints.
  6. The party can attempt operations available to the compromised account and its connected Google Search Console resources until the key is revoked or expires.

Impact Assessment

Successful exploitation discloses the privileges associated with the compromised Maton API key. Based on the documented functionality, this may permit access to connection information and Google Search Console data, including sites and search analytics. It may also permit state-changing actions exposed by the documented workflow, such as creating or deleting connections and submitting or deleting sitemaps.

The precise scope depends on the permissions, active connections, account controls, an ...[truncated 141 chars]

Remediation
View remediation

Remediation Suggestions

Replace the plaintext output with a presence check that never reveals the credential:

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

Apply the following additional controls:

  1. Do not print complete API keys in troubleshooting guides, logs, error messages, or agent responses.
  2. If credential identification is operationally necessary, display only a short masked suffix.
  3. Ensure CI/CD systems and agent platforms apply secret masking to known credential variables.
  4. Redact authorization headers and environment-variable values from diagnostic output.
  5. Rotate any API key that has already been printed into a retained or shared transcript.
  6. Use least-privilege credentials and provide a documented revocation procedure.
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 (5)

External Transmission

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

Create Connection

bash
curl -s -X POST \
  -H "Authorization: Bearer $MATON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"app":"google-search-console"}' \

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This markdown file includes a connection deletion example using curl -X DELETE, but the surrounding documentation does not warn that the action will remove an existing OAuth connection. The same section presents the command as a routine operation, which lacks the kind of user-facing caution expected for actions that affect account configuration or access.

Content

No source excerpt is available for this finding.

External Transmission

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

Search Analytics

bash
curl -s -X POST \
  -H "Authorization: Bearer $MATON_API_KEY" \
  -H "Content-Type: application/json" \
  https://gateway.maton.ai/google-search-console/webmasters/v3/sites/{siteUrl}/searchAnalytics/query \

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill description includes a DELETE request for removing a sitemap, but there is no adjacent warning explaining that this changes Search Console state for the selected site. For markdown files, destructive or integrity-affecting behaviors should be clearly disclosed so users understand the consequences before running the command.

Content

No source excerpt is available for this finding.

External Transmission

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

bash
SITE_URL=$(python3 -c "import urllib.parse; print(urllib.parse.quote('https://example.com', safe=''))")

curl -s -X POST \
  -H "Authorization: Bearer $MATON_API_KEY" \
  -H "Content-Type: application/json" \
  "https://gateway.maton.ai/google-search-console/webmasters/v3/sites/$SITE_URL/searchAnalytics/query" \

Static analysis

Detected: suspicious.exposed_resource_identifier

Example code exposes a concrete connection_id instead of a placeholder.

Critical
Code
suspicious.exposed_resource_identifier
Location
SKILL.md:101