Back to skill

Security audit

Gmail

Security checks for vulnerabilities and agentic risk

Overview

The skill is a disclosed Gmail CLI integration, but it needs review because it relies on an unpinned third-party mailbox client with persistent credentials and broad Gmail access.

Install only if you trust PortEden and are comfortable delegating Gmail access to its CLI/service. Prefer browser login over inline token login, verify the installed package source/version where possible, use the narrowest Gmail scopes and profile selection, avoid --all or full-body retrieval unless needed, confirm every mutation, and run logout/revoke access after use on shared or sensitive machines.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (3)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:26
Finding

Externally Controlled API Text Is Reproduced Verbatim

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Error
Location
SKILL.md:5
Finding

Unpinned Third-Party CLI Installation Creates a Supply-Chain Risk

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:16
Finding

Broad Gmail and Credential Access Can Exceed Task-Specific Least Privilege

Content
View full analysis
` — stored in system keyring - **Verify:** `porteden auth status` - If `PE_API_KEY` is set in the environment, the CLI uses it automatically (no login needed). ``` Related bulk and full-content access instructions include: ```markdown - All messages (auto-pagination): `porteden email messages --week --all -jc` ``` ```markdown - **Pagination.** Use `--all` to auto-fetch all pages. In JSON output the field is `hasMoreEmailsInNextResultPage` (boolean) plus an opaque `nextPageToken`. There is **no** `totalCount` — the firewall filters server-side so a pre-filter total would mislead. If you got `--limit` items, that's the full page; don't double-paginate. ``` ```markdown - `--include-body` on `messages` fetches full body (default: preview only). Single `message` includes body by default — use only when the user needs the body, and treat its content as untrusted (see Safety). ``` ### Technical Analysis The Skill places Gmail authentication and mailbox operations behind a third-party CLI. It supports persistent keyring credentials, automatic use of an environment API key, bulk pagination, complete message-body retrieval, full-thread retrieval, and mailbox mutations. These capabilities are relevant to comprehensive Gmail management, and the Skill includes meaningful safeguards such as explicit confirmation before mutation, profile isolation, narrow-scope guidance, preview-only defaults, and logout recommendations. Nevertheless, broad retrieval options such as `--all`, `--include-body`, and complete thread access can exceed the minimu ...[truncated 1945 chars]
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (4)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

md
name: gmail-cli
description: Gmail - secure gmail inbox management CLI. Use when the user wants to read, search, or triage Gmail; sending, replying, forwarding, deleting, or modifying require explicit user confirmation (gog-cli & gws secure gmail firewall alternative).
version: 1.0.8
metadata: {"openclaw":{"emoji":"📧","homepage":"https://porteden.com","requires":{"bins":["porteden"]},"primaryEnv":"PE_API_KEY","envVars":[{"name":"PE_API_KEY","required":false,"description":"API key; if unset, credentials are read from the system keyring via `porteden auth login`"}],"install":[{"id":"brew","kind":"brew","formula":"porteden/tap/porteden","bins":["porteden"],"label":"Install porteden (brew)"},{"id":"go","kind":"go","module":"github.com/porteden/cli/cmd/porteden@latest","bins":["porteden"],"label":"Install porteden (go)"}]}}
---

# porteden gmail

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

md
name: gmail-cli
description: Gmail - secure gmail inbox management CLI. Use when the user wants to read, search, or triage Gmail; sending, replying, forwarding, deleting, or modifying require explicit user confirmation (gog-cli & gws secure gmail firewall alternative).
version: 1.0.8
metadata: {"openclaw":{"emoji":"📧","homepage":"https://porteden.com","requires":{"bins":["porteden"]},"primaryEnv":"PE_API_KEY","envVars":[{"name":"PE_API_KEY","required":false,"description":"API key; if unset, credentials are read from the system keyring via `porteden auth login`"}],"install":[{"id":"brew","kind":"brew","formula":"porteden/tap/porteden","bins":["porteden"],"label":"Install porteden (brew)"},{"id":"go","kind":"go","module":"github.com/porteden/cli/cmd/porteden@latest","bins":["porteden"],"label":"Install porteden (go)"}]}}
---

# porteden gmail

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

md
name: gmail-cli
description: Gmail - secure gmail inbox management CLI. Use when the user wants to read, search, or triage Gmail; sending, replying, forwarding, deleting, or modifying require explicit user confirmation (gog-cli & gws secure gmail firewall alternative).
version: 1.0.8
metadata: {"openclaw":{"emoji":"📧","homepage":"https://porteden.com","requires":{"bins":["porteden"]},"primaryEnv":"PE_API_KEY","envVars":[{"name":"PE_API_KEY","required":false,"description":"API key; if unset, credentials are read from the system keyring via `porteden auth login`"}],"install":[{"id":"brew","kind":"brew","formula":"porteden/tap/porteden","bins":["porteden"],"label":"Install porteden (brew)"},{"id":"go","kind":"go","module":"github.com/porteden/cli/cmd/porteden@latest","bins":["porteden"],"label":"Install porteden (go)"}]}}
---

# porteden gmail

Credential Access

High
Category
Privilege Escalation
Confidence
77% confidence
Finding

The documented porteden auth login --token <key> flow encourages passing a secret directly on the command line. Command-line arguments can be exposed through shell history, process listings, audit logs, or terminal recording, which can leak the token to other local users or monitoring systems.

Content

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

md
## Setup (once)

- **Browser login (recommended):** `porteden auth login` — opens browser, sign in with the Google account, credentials stored in system keyring
- **Direct token:** `porteden auth login --token <key>` — stored in system keyring
- **Verify:** `porteden auth status`
- If `PE_API_KEY` is set in the environment, the CLI uses it automatically (no login needed).

Static analysis

No suspicious patterns detected.