Is kyesh/google-workspace-byok safe?

https://github.com/openclaw/skills/tree/main/skills/kyesh/google-workspace-byok

73
CAUTION

The google-workspace-byok skill provides functional Google Calendar and Gmail integration but contains a significant supply chain red flag: [email protected] (with native binary @napi-rs/canvas) is declared as a direct dependency in package-lock.json's root entry while being entirely absent from package.json and undocumented in SKILL.md—users running npm ci would silently install pre-compiled native binary packages. Beyond this hidden dependency, the skill requests full Google Calendar write access when the stated purpose only requires reading, and stores long-lived OAuth refresh tokens that grant the agent persistent access to the user's complete email and calendar data across all future sessions.

Category Scores

Prompt Injection 93/100 · 30%
Data Exfiltration 58/100 · 25%
Code Execution 48/100 · 20%
Clone Behavior 90/100 · 10%
Canary Integrity 95/100 · 10%
Behavioral Reasoning 58/100 · 5%

Findings (8)

HIGH Undisclosed pdf-parse dependency hidden in package-lock.json root entry -35

The package-lock.json packages[""].dependencies section declares pdf-parse@^2.4.5 as a direct project dependency. This package is entirely absent from package.json and unmentioned in SKILL.md, which only documents mupdf for PDF processing. In npm lockfileVersion 3 format, the packages[""] entry represents installed direct dependencies. Any user running 'npm ci' (which treats the lock file as authoritative) will silently install pdf-parse and its full dependency tree including native binary packages. This is a classic supply chain obfuscation pattern: package.json appears clean while the lock file carries hidden dependencies.

HIGH @napi-rs/canvas native binary packages installed via hidden pdf-parse -12

[email protected] depends on @napi-rs/[email protected], which distributes pre-compiled native binaries for 10 platform combinations (linux-x64-gnu, linux-x64-musl, linux-arm64-gnu, linux-arm64-musl, linux-arm-gnueabihf, linux-riscv64-gnu, darwin-arm64, darwin-x64, win32-x64-msvc, android-arm64). These are pre-compiled C++ shared libraries that execute directly in the process, bypassing any JavaScript sandboxing. [email protected] is also pulled in as a large secondary dependency.

MEDIUM Full Google Calendar write scope requested by default -20

auth.js uses SCOPES_READWRITE by default, which includes the full https://www.googleapis.com/auth/calendar scope granting read and write access to all calendars. The skill's stated purpose (listing calendars, listing events, checking free/busy) requires only https://www.googleapis.com/auth/calendar.readonly. The --readonly flag exists but is not the default. In an agentic context, this means the LLM agent can create, modify, and delete calendar events, not merely read them.

MEDIUM gmail.readonly scope grants agent persistent access to all user email content -15

The gmail.readonly OAuth scope allows the agent to search, list, and read every email in the user's Gmail account, including downloading all attachments. The gmail.js script supports arbitrary Gmail search queries, meaning the agent can be instructed to search for password reset emails, financial statements, or other sensitive content. Combined with other skills or adversarial prompt injection from email content itself, this creates a significant data exposure surface.

MEDIUM OAuth refresh tokens stored in plaintext providing indefinite account access -10

The getAuthClient() function in shared.js sets up automatic token refresh and persists new tokens on refresh via the 'tokens' event. These tokens, including long-lived refresh tokens, are stored as plaintext JSON in ~/.openclaw/google-workspace-byok/tokens/

LOW Email attachment download to filesystem paths with no sanitization -7

The gmail.js attachment download action writes email attachment data to --out-dir paths specified at runtime. The SKILL.md examples default to /tmp/attachments. In an agent context, a malicious email could contain attachments with crafted filenames. No filename sanitization is visible in the documented usage or script code. The agent could potentially be instructed to use a different --out-dir to write files to sensitive locations.

LOW Dual PDF library discrepancy between documentation and lock file -20

SKILL.md explicitly describes and documents mupdf for PDF text extraction, providing inline Node.js code examples using the mupdf API. However, the lock file secretly includes pdf-parse (a completely different PDF library by a different author) with no use of pdf-parse found in any of the five JavaScript source files. The coexistence of two PDF processing libraries—one documented, one hidden—with no code referencing the hidden one is unexplained and suspicious.

INFO Sensitive credential files opened during audit window; attributed to monitoring system -5

Filesystem monitoring detected open+read events on .env, .ssh/id_rsa, .aws/credentials, .npmrc, .docker/config.json, and .config/gcloud/application_default_credentials.json at two time points. Timing analysis places the first access (~1771929444.705) immediately after the Oathe ss-tunap network baseline command, and the second access (~1771929462.377) immediately after the Oathe skill file scanning phase completed—both consistent with monitoring system canary baseline and teardown reads. Canary integrity check confirmed all files unmodified.