Back to skill

Security audit

go-xai

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward Go helper for using the xAI API and its sensitive parts are disclosed and scoped to user-directed API use.

Install this only in Go projects where you intend to use xAI/Grok APIs. Keep XAI_API_KEY in environment or secret storage, review the third-party github.com/psyb0t/go-xai dependency before adopting it, and only run upload/delete or cost-incurring API calls on resources you explicitly requested.

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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/setup.md (reported line 37)May include surrounding context.

md
| `POST /v1/chat/completions` | `HandleGenericCompletionRequest` |
| `GET /v1/chat/deferred-completion/{request_id}` | `HandleGetDeferredCompletionRequest` |
| `POST /v1/responses` | `HandleGenericModelRequest` |
| `GET` / `DELETE /v1/responses/{response_id}` | `HandleGetStoredCompletionRequest`, `HandleDeleteStoredCompletionRequest` |
| `POST /v1/messages` | `HandleGenericMessagesRequest` |
| `POST /v1/embeddings` | `HandleEmbeddingRequest` |
| `POST /v1/tokenize-text` | `HandleTokenizeTextRequest` |

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/setup.md (reported line 45)May include surrounding context.

md
| `POST /v1/videos/generations` | `HandleGenerateVideoRequest` |
| `GET /v1/videos/{request_id}` | `HandleGetDeferredVideoRequest` |
| `GET` / `POST /v1/files` | `HandleListFilesRequest`, `HandleUploadFileRequest` |
| `DELETE /v1/files/{file_id}` | `HandleDeleteFileRequest` |
| `GET` / `POST /v1/skills` | `HandleListSkillsRequest`, `HandleUploadSkillRequest` |
| `POST /v1/documents/search` | `HandleDocumentSearchRequestV2` |

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

This markdown file instructs users to set an Authorization: Bearer <key> header on every request, which involves transmitting sensitive credentials to an external API. The document provides no warning or disclosure about credential sensitivity, key handling, or the privacy implications of sending authenticated requests.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.