Back to skill

Security audit

Google Docs Log Automation — Append log lines to auto-created daily documents in Google Drive by PortEden Secure Access.

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward Google Docs logging helper, but users should treat logged content and the PortEden CLI/token as cloud-access sensitive.

Before installing, verify you trust PortEden and the install source, use a dedicated or least-privilege Google account or folder where possible, restrict folder sharing, and avoid logging secrets, tokens, personal data, customer data, or regulated information unless you have explicitly approved that cloud storage and retention model.

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–13 **Vulnerability Type**: Unpinned executable dependency from mutable upstream sources **Risk Level**: Medium ### Vulnerable Code ```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 and execute the `porteden` CLI from mutable third-party sources. In particular, the Go installation uses `@latest`, which resolves to whichever upstream version is current at installation time rather than a version reviewed during this audit. The custom Homebrew tap is also installed without a pinned version, commit, checksum, or signature-verification procedure. This creates a time-of-check/time-of-use supply-chain gap: the code executed by a future user may differ from the dependency available when the skill was reviewed. This dependency is security-sensitive because the skill requires `PE_API_KEY`, supports authentication tokens stored in the system keyring, and uses the installed CLI to access connected Google Drive resources. No evidence establishes that the current upstream dependency is malicious. The vulnerability is the unsafe, mutable dependency-installation mechanism and the absence of integrity controls. ### Attack Path 1. An attacker compromises the upstream Go repository, release process, PortEden Homebrew tap, or an authorized publisher account. 2. The attacker publishes a malicious version that beco ...[truncated 1552 chars]
Remediation
## Remediation Suggestions 1. Replace `github.com/porteden/cli/cmd/porteden@latest` with a specific, reviewed release version. 2. Where practical, pin the dependency to an immutable source commit rather than a mutable tag. 3. Pin the Homebrew installation to a reviewed release and avoid silently tracking the current tap formula. 4. Publish cryptographic checksums for supported binaries and require checksum verification before execution. 5. Use signed releases or artifact attestations and document how users must verify the publisher signature. 6. Maintain a documented dependency-update process that includes source review, security testing, and explicit version changes in `SKILL.md`. 7. Run the CLI with least-privilege Drive scopes and narrowly scoped PortEden tokens to reduce the impact of a compromised dependency. 8. Avoid exposing unrelated secrets to the CLI process; use a restricted environment containing only the variables required for the logging workflow.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Rogue AgentSelf-Modification, Session Persistence
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (4)

Credential Access

High
Category
Privilege Escalation
Content
### 1. Authenticate (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
### 1. Authenticate (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.

Session Persistence

Medium
Category
Rogue Agent
Content
# porteden docs-logger

Append log lines to daily Google Docs — one document per day, auto-created inside a `PE_Logs` folder. Works like a cloud-native `.txt` log file that agents can write to from anywhere. **Use `-jc` flags** for AI-optimized output.

If `porteden` is not installed: `brew install porteden/tap/porteden` (or `go install github.com/porteden/cli/cmd/porteden@latest`).
Confidence
82% confidence
Finding
The skill promotes a persistent cloud-based logging workflow that agents can write to 'from anywhere,' with daily documents retained in Google Drive. That creates session/persistence and audit-data retention risk because agent outputs may accumulate over time in a remotely accessible location, potentially exposing historical operational data if the account or folder is misconfigured or compromised.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill instructs agents to append arbitrary log lines to Google Docs/Drive but does not clearly warn that log contents are transmitted to third-party cloud services. This creates a real risk of operators or autonomous agents sending sensitive data, secrets, or regulated information off-host without informed consent or data-classification checks.

Static analysis

No suspicious patterns detected.