Back to skill

Security audit

Google Health

Security checks for vulnerabilities and agentic risk

Overview

ClawScan rates this skill suspicious with high confidence because it reports a token-cache file risk and behavior that may exceed the skill's stated purpose and network limits.

Treat this as a review-needed skill, not as a finding of malicious intent. Before installing, consider whether you are comfortable with the reported file deletion or overwrite risk and the possibility that configuration could direct authenticated requests outside the stated Google hosts. Skillspector completed its component scan but marked analysis partial because some referenced local paths were missing, so the evidence is incomplete.

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
internal/config/config.go
Finding

Automatically discovered workspace configuration can redirect token-cache deletion and overwrite

Content
View full analysis

Impact

An attacker can cause deletion of a targeted user file writable through the victim's filesystem permissions. If the user completes auth login under the same configuration, an existing unrelated file can instead be truncated and replaced with OAuth-token JSON. The deletion path does not require browser consent.

Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (11)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

In buildSessionRows, records for which health.ParseSession returns s.Start == nil are counted as unparsed and skipped with continue. Both the default and --json session outputs therefore omit those records. A warning and the --raw escape hatch make this transparent but do not satisfy the declared guarantee that no records are filtered locally. Sorting and flattening are ordinary supporting details of the declared parsed-session view. This chunk does not otherwise show undeclared writes or resource access.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

New accepts baseURL from configuration and only removes trailing slashes. ListDataPoints and RawGet then construct requests against that value without validating its host or scheme. RawGet's path validation restricts the relative path but does not constrain the configured destination. Thus this chunk can issue requests to non-Google hosts or over HTTP, contrary to the declared network permission. Otherwise, the shown behavior matches the read-only retrieval purpose: it uses GET, applies time filters server-side, retains returned points, and performs no file writes. Authentication, roll-ups, and CLI commands are outside this chunk and are not treated as mismatches.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
80% confidence
Finding

Most of this chunk supports the declared authentication and API-client behavior. However, buildAPIClient passes cfg.BaseURL to the authenticated API client, and no HTTPS or hostname restriction is shown. This exposes a configurable destination not reflected in the declared Google-only network permission. The finding is conditional on configuration validation elsewhere: if resolveConfig or api.New enforces the declared destination restrictions, this mismatch would be resolved. No unrelated file writes, health-data modifications, or malicious behavior are demonstrated.

Content

No source excerpt is available for this finding.

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 · internal/auth/tokencache.go (reported line 118)May include surrounding context.

go
// persistingSource wraps a refreshing TokenSource and re-saves the token to disk
// whenever .Token() yields a newer one (an access-token rotation after a
// refresh). x/oauth2 handles refresh-token rotation internally; we only need to
// persist the result so the on-disk access token stays fresh between runs
// (GOAL.md §8 — ghealth doesn't do this; we should).
type persistingSource struct {
	base   oauth2.TokenSource

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 · internal/auth/tokencache.go (reported line 142)May include surrounding context.

go
}

// changed reports whether tok differs from the last persisted token in a way
// worth writing (a new access token or a new expiry).
func (p *persistingSource) changed(tok *oauth2.Token) bool {
	if p.last == nil {
		return true

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 · internal/cli/auth.go (reported line 119)May include surrounding context.

go
report := authStatusReport{TokenPath: cfg.TokenCache}
			if tok != nil {
				report.Present = true
				report.Valid = tok.Valid() // non-empty access token AND not expired.
				if !tok.Expiry.IsZero() {
					report.Expiry = tok.Expiry.UTC().Format(time.RFC3339)
				}

The authenticated API client uses a configurable network origin despite the manifest's fixed Google-host allowlist.

High
Category
Excessive Agency
Confidence
80% confidence
Finding

In internal/cli/client.go, L113-L118 select cfg.BaseURL for production use and pass it to api.New with an OAuth-authenticated HTTP client. This construction does not enforce the declared HTTPS-only Google-host boundary; unless configuration validation elsewhere rejects other origins, API requests and bearer credentials can be directed to an undeclared destination.

Content

No source excerpt is available for this finding.

Legacy-token migration reads and deletes an additional credential file beyond the declared active token cache.

Medium
Category
Excessive Agency
Confidence
91% confidence
Finding

In internal/auth/tokencache.go, L092 reads a separate legacyPath, L096 writes the current cache, and L099 deletes the legacy file. The manifest permits access to its OAuth token cache and describes deletion on logout, but does not disclose migration that reads and removes a second credential file outside that operation.

Content

No source excerpt is available for this finding.

Parsed sessions omit records with unparseable start times despite the manifest's explicit no-filtering guarantee.

Medium
Category
Excessive Agency
Confidence
100% confidence
Finding

At L135-L137, buildSessionRows skips every exercise point whose parsed start time is nil, so normal and JSON session output exclude records returned by the API. This contradicts the manifest's promise that no records are filtered beyond the server-side time window and the file's explicit no-filtering claim at L022-L025; the warning and --raw alternative disclose the omission but do not preserve that guarantee.

Content

No source excerpt is available for this finding.

Permission 'env: the five GOOGLE_HEALTH_* variables listed under envVars' is declared but no corresponding code capability (env) was detected.

Low
Category
MCP Least Privilege
Confidence
65% confidence
Finding

Declared permissions with no matching code capability may indicate removed functionality or pre-staging for future abuse.

Content

No source excerpt is available for this finding.

Permission 'file_read: config.json and the OAuth token cache' is declared but no corresponding code capability (file_read) was detected.

Low
Category
MCP Least Privilege
Confidence
65% confidence
Finding

Declared permissions with no matching code capability may indicate removed functionality or pre-staging for future abuse.

Content

No source excerpt is available for this finding.