Back to skill

Security audit

Secure Google Sheets Access for OpenClaw by PortEden

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed command guide for managing Google Sheets through the Porteden CLI, with normal but important auth and install risks to consider.

Before installing, make sure you trust the Porteden CLI source, prefer a pinned or verified release if available, and use the narrowest Google and PE_API_KEY permissions that support your task. Treat share, public share, write, and delete operations as high-impact and confirm the exact spreadsheet and permissions before running them.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:5
Finding
Unpinned Third-Party CLI Installation Creates a Supply-Chain Risk## Vulnerability Details **File Location**: `SKILL.md`, lines 5-12 **Vulnerability Type**: Unpinned and mutable third-party dependency installation **Risk Level**: Medium **Vulnerable Code Snippet**: ```yaml metadata: {"openclaw":{"emoji":"📊","requires":{"bins":["porteden"],"env":["PE_API_KEY"]},"primaryEnv":"PE_API_KEY","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)"}]}} ``` ```markdown If `porteden` is not installed: `brew install porteden/tap/porteden` (or `go install github.com/porteden/cli/cmd/porteden@latest`). ``` ### Technical Analysis The Skill directs users or agents to install the `porteden` executable from mutable third-party sources. In particular, the Go installation uses `@latest`, which resolves to whichever release is current at installation time rather than an immutable, previously reviewed version. The Homebrew alternative similarly references a third-party tap without a pinned version or documented integrity verification. Consequently, the effective executable can change after this Skill has been audited without any corresponding change to `SKILL.md`. If the upstream repository, release account, module distribution process, or Homebrew tap is compromised, an attacker could distribute a modified executable under the legitimate package name. The installation instructions do not require checksum, signature, provenance, or publisher verification. This is a supply-chain weakness rather than evidence that the currently referenced project is malicious. ### Attack Path 1. An attacker compromises the upstream GitHub repository, release process, Go module source, Homebrew tap, or an authorized publisher account. 2. The attacker publishes a malicious version that is selected by `@latest` or served through ...[truncated 1475 chars]
Remediation
## Remediation Suggestions 1. Replace `github.com/porteden/cli/cmd/porteden@latest` with a specific reviewed semantic version or immutable commit identifier. 2. Pin the Homebrew installation to a reviewed release where supported, or provide a versioned binary installation process. 3. Publish expected SHA-256 checksums for supported artifacts and require checksum verification before execution. 4. Prefer cryptographically signed releases and verify signatures against a documented, trusted publisher key. 5. Use build provenance or artifact attestations, such as SLSA-compatible provenance, and document how users can verify them. 6. Periodically review and deliberately update the pinned version rather than resolving the newest release automatically. 7. Document the canonical repository, package publisher, expected binary identity, and trusted Homebrew tap to reduce repository-substitution and spoofing risks. 8. Run the CLI with least-privilege Google scopes and narrowly restricted tokens. Avoid exposing broader Drive permissions unless the requested operation requires them. 9. Where practical, isolate the CLI in a restricted execution environment with limited filesystem, network, and environment-variable access.
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 (2)

Credential Access

High
Category
Privilege Escalation
Content
Setup (once)

- **Browser login (recommended):** `porteden auth login` — opens browser, 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).
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
Setup (once)

- **Browser login (recommended):** `porteden auth login` — opens browser, 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).
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Static analysis

No suspicious patterns detected.