Back to skill

Security audit

authentication-patterns

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marks this authentication-guidance skill suspicious because scanners report several actions beyond its stated purpose, including accessing repository and cloud resources, while one referenced script could not be inspected.

Consider the reported extra account and cloud actions, the plaintext API-key storage example, and the uninspected referenced script before installing. The verdict is suspicious, meaning the scan found meaningful concerns; it does not establish malicious intent.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (9)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The authentication checks are consistent with the declared subject. However, the subsequent commands access repository, issue-tracking, and cloud-storage resources rather than merely providing or implementing authentication patterns. Those resource-reading operations are not declared and are not necessary to establish authentication. The sourced script's internals are unavailable, so no additional behavior is assumed.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
84% confidence
Finding

The function tests whether a model invocation succeeds rather than implementing or reviewing authentication or credential handling. Although authentication could affect the command's success, the code does not distinguish authentication failures from model availability or other execution failures. Its demonstrated purpose is model-access verification, which is not described by the declared authentication-focused scope.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
84% confidence
Finding

Ensuring GitHub authentication is consistent with the declared authentication scope. However, unconditionally clearing all authentication caches introduces a broad credential-state reset that the description does not disclose and that is not evidently required to ensure GitHub authentication. The helper implementations are not supplied, so the exact effects remain uncertain.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · modules/auth-methods.md (reported line 16)May include surrounding context.

Set in environment

export GEMINI_API_KEY="your-key-here"

Or in .env file

echo "GEMINI_API_KEY=your-key-here" >> ~/.env

text

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · modules/auth-methods.md (reported line 17)May include surrounding context.

export GEMINI_API_KEY="your-key-here"

Or in .env file

echo "GEMINI_API_KEY=your-key-here" >> ~/.env

text

### Verification

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 · modules/auth-methods.md (reported line 65)May include surrounding context.

python
# OAuth tokens typically stored by CLI
# Common locations:
# ~/.config/{service}/credentials.json
# ~/.{service}/auth.json

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 · modules/interactive-auth.md (reported line 50)May include surrounding context.

export GITLAB_TOKEN="..." # GitLab export AWS_ACCESS_KEY_ID="..." # AWS export AWS_SECRET_ACCESS_KEY="..." export GOOGLE_APPLICATION_CREDENTIALS="path/to/credentials.json"

text

## Core Functions

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 · modules/interactive-auth.md (reported line 126)May include surrounding context.

md
then cache, then prompts:

1. Browser OAuth (recommended)
2. Personal Access Token
3. Cancel workflow

### AWS

API-key setup persists a secret in plaintext without a credential-storage warning.

Medium
Category
Output Handling
Confidence
91% confidence
Finding

The setup example encourages persisting a real API key in a plaintext home-directory file without enforcing restrictive permissions or explaining storage risks. If copied, a permissive umask or existing readable file could expose the key to other local users; entering the literal command can also retain it in shell history. This omission is particularly consequential in guidance intended to teach secure credential handling.

Content

No source excerpt is available for this finding.