Back to skill

Security audit

App Access

Security checks for vulnerabilities and agentic risk

Overview

The skill clearly provides Gmail access through Reasonlayer, but it asks users to persist a powerful Gmail API key in weakly protected local storage and installs from a mutable remote file.

Install only if you are comfortable giving Reasonlayer-mediated access to read and send Gmail. Store the API key in a real secret manager or a file with 600 permissions, avoid saving it in agent memory or transcripts, review any fetched update before replacing the local skill, and revoke or rotate the key if it is exposed.

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

Plaintext Gmail Access Credential Stored Without Restrictive Permissions

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 61–77
Vulnerability Type: Plaintext sensitive credential storage with potentially permissive file permissions
Risk Level: Medium

Vulnerable Code Snippet

bash
**Recommended:** Save your credentials to `~/.reasonlayer/credentials`:

```bash
mkdir -p ~/.reasonlayer
echo 'rl_ak_xxx' > ~/.reasonlayer/credentials

This way you can always find your key later. You can also save it to your memory, environment variables (REASONLAYER_API_KEY), or wherever you store secrets.


Check for Existing Credentials

Before registering, check if you already have a key:

bash
cat ~/.reasonlayer/credentials
text

### Technical Analysis

The instructions store a sensitive bearer API key in a plaintext file but do not enforce restrictive directory or file permissions. With a common `022` process umask, `mkdir -p` can create the directory with mode `0755`, while shell redirection can create the credential file with mode `0644`. On a multi-user system, other local users may therefore be able to read the token.

The use of `cat` also writes the credential directly to standard output. This can expose it through terminal capture, agent transcripts, debugging logs, shell automation, or other output-recording systems. The alternative suggestion to save the key in agent memory unnecessarily broadens the number of places where the secret may persist.

The document states that the key grants access to the connected Gmail account through Reasonlayer. Consequently, possession of the key may enable Gmail-reading and email-sending operations within the OAuth permissions granted by the user.

### Attack Path

1. A user follows the documented commands to save the Reasonlayer API key.
2. The shell creates `~/.reasonlayer/credentials` according to the current umask, potentially resulting in a world-readable `0644` file.
3. Another local user or a compromised process reads the file, or the credential is capt
...[truncated 986 chars]
Remediation
View remediation

Remediation Suggestions

Create the credential directory and file with explicitly restrictive permissions rather than relying on the user's umask:

bash
install -d -m 700 ~/.reasonlayer
umask 077
printf '%s\n' 'rl_ak_xxx' > ~/.reasonlayer/credentials
chmod 600 ~/.reasonlayer/credentials

Additional hardening measures should include:

  1. Prefer an operating-system credential manager or secret store instead of a plaintext file.
  2. Do not recommend persistent agent memory as a credential-storage location.
  3. Avoid printing the token with cat; load it directly into the required process while preventing command tracing and log capture.
  4. Document token revocation and rotation procedures for suspected disclosure.
  5. Redact bearer tokens from application logs, agent transcripts, diagnostics, and error messages.
  6. Use narrowly scoped OAuth authorization. Separate read-only and send permissions where supported, and request send access only when required.
  7. Require explicit user authorization before each email-sending operation.
  8. Consider short-lived credentials or scoped delegated tokens instead of a long-lived bearer key with all connected Gmail capabilities.
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 (15)

External Transmission

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

md
version: 0.0.3
description: Give your AI agent access to Gmail. Send emails, fetch inbox, read threads — all via simple API calls.
homepage: https://reasonlayer.com
metadata: {"reasonlayer":{"category":"app-access","api_base":"https://api.reasonlayer.com/app-access/v1"}}
---

# Reasonlayer App Access

External Transmission

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

md
version: 0.0.3
description: Give your AI agent access to Gmail. Send emails, fetch inbox, read threads — all via simple API calls.
homepage: https://reasonlayer.com
metadata: {"reasonlayer":{"category":"app-access","api_base":"https://api.reasonlayer.com/app-access/v1"}}
---

# Reasonlayer App Access

External Transmission

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

md
version: 0.0.3
description: Give your AI agent access to Gmail. Send emails, fetch inbox, read threads — all via simple API calls.
homepage: https://reasonlayer.com
metadata: {"reasonlayer":{"category":"app-access","api_base":"https://api.reasonlayer.com/app-access/v1"}}
---

# Reasonlayer App Access

External Transmission

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

md
version: 0.0.3
description: Give your AI agent access to Gmail. Send emails, fetch inbox, read threads — all via simple API calls.
homepage: https://reasonlayer.com
metadata: {"reasonlayer":{"category":"app-access","api_base":"https://api.reasonlayer.com/app-access/v1"}}
---

# Reasonlayer App Access

External Transmission

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

md
version: 0.0.3
description: Give your AI agent access to Gmail. Send emails, fetch inbox, read threads — all via simple API calls.
homepage: https://reasonlayer.com
metadata: {"reasonlayer":{"category":"app-access","api_base":"https://api.reasonlayer.com/app-access/v1"}}
---

# Reasonlayer App Access

External Transmission

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

md
version: 0.0.3
description: Give your AI agent access to Gmail. Send emails, fetch inbox, read threads — all via simple API calls.
homepage: https://reasonlayer.com
metadata: {"reasonlayer":{"category":"app-access","api_base":"https://api.reasonlayer.com/app-access/v1"}}
---

# Reasonlayer App Access

External Transmission

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

md
version: 0.0.3
description: Give your AI agent access to Gmail. Send emails, fetch inbox, read threads — all via simple API calls.
homepage: https://reasonlayer.com
metadata: {"reasonlayer":{"category":"app-access","api_base":"https://api.reasonlayer.com/app-access/v1"}}
---

# Reasonlayer App Access

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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
version: 0.0.3
description: Give your AI agent access to Gmail. Send emails, fetch inbox, read threads — all via simple API calls.
homepage: https://reasonlayer.com
metadata: {"reasonlayer":{"category":"app-access","api_base":"https://api.reasonlayer.com/app-access/v1"}}
---

# Reasonlayer App Access

External Transmission

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

md
version: 0.0.3
description: Give your AI agent access to Gmail. Send emails, fetch inbox, read threads — all via simple API calls.
homepage: https://reasonlayer.com
metadata: {"reasonlayer":{"category":"app-access","api_base":"https://api.reasonlayer.com/app-access/v1"}}
---

# Reasonlayer App Access

External Transmission

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

md
version: 0.0.3
description: Give your AI agent access to Gmail. Send emails, fetch inbox, read threads — all via simple API calls.
homepage: https://reasonlayer.com
metadata: {"reasonlayer":{"category":"app-access","api_base":"https://api.reasonlayer.com/app-access/v1"}}
---

# Reasonlayer App Access

External Transmission

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

md
version: 0.0.3
description: Give your AI agent access to Gmail. Send emails, fetch inbox, read threads — all via simple API calls.
homepage: https://reasonlayer.com
metadata: {"reasonlayer":{"category":"app-access","api_base":"https://api.reasonlayer.com/app-access/v1"}}
---

# Reasonlayer App Access

External Transmission

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

md
version: 0.0.3
description: Give your AI agent access to Gmail. Send emails, fetch inbox, read threads — all via simple API calls.
homepage: https://reasonlayer.com
metadata: {"reasonlayer":{"category":"app-access","api_base":"https://api.reasonlayer.com/app-access/v1"}}
---

# Reasonlayer App Access

External Transmission

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

md
version: 0.0.3
description: Give your AI agent access to Gmail. Send emails, fetch inbox, read threads — all via simple API calls.
homepage: https://reasonlayer.com
metadata: {"reasonlayer":{"category":"app-access","api_base":"https://api.reasonlayer.com/app-access/v1"}}
---

# Reasonlayer App Access

Session Persistence

Medium
Category
Rogue Agent
Confidence
86% confidence
Finding

The skill instructs the agent/user to persist fetched skill content under ~/.reasonlayer/skills/SKILL.md, creating durable local state from a mutable remote URL. This increases supply-chain and persistence risk: a compromised or changed remote skill can be reinstalled and remain trusted locally, and the install flow provides no integrity verification, version pinning, or signature check.

Content

Scanner excerpt · SKILL.md (reported line 22)May include surrounding context.

Install locally:

bash
mkdir -p ~/.reasonlayer/skills
curl -s https://reasonlayer.com/skill.md > ~/.reasonlayer/skills/SKILL.md

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 23)May include surrounding context.

Install locally:

bash
mkdir -p ~/.reasonlayer/skills
curl -s https://reasonlayer.com/skill.md > ~/.reasonlayer/skills/SKILL.md

Or just read from the URL above!