Back to skill

Security audit

Kagi Enrich

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a real Kagi search helper, but it can download and run an unverified GitHub binary, so it should be reviewed before installation.

Install only if you are comfortable with the skill running a local native binary and contacting Kagi with your search queries. Prefer building from the included Go source yourself, or manually verify a pinned release and checksum before running the downloaded binary; avoid accepting the automatic latest-release download on sensitive machines.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T03 · Remote Payload Retrieval and Execution

Error
Location
kagi-enrich.sh:43
Finding

Unverified Remote Binary Download and Execution

Content
View full analysis
/dev/null 2>&1; then RELEASE_META="$(curl -fsSL "https://api.github.com/repos/joelazar/kagi-skills/releases/latest")" elif command -v wget >/dev/null 2>&1; then RELEASE_META="$(wget -qO- "https://api.github.com/repos/joelazar/kagi-skills/releases/latest")" else echo "Error: Neither curl nor wget found. Please download the binary manually from:" >&2 echo " https://github.com/joelazar/kagi-skills/releases/latest" >&2 exit 1 fi TAG="$(printf '%s\n' "$RELEASE_META" | grep -m1 '"tag_name"' | cut -d'"' -f4 || true)" if [[ -z "$TAG" ]]; then echo "Error: Could not resolve latest release tag from GitHub API." >&2 echo "Please download manually from: https://github.com/joelazar/kagi-skills/releases/latest" >&2 exit 1 fi BINARY="kagi-enrich_${TAG}_${OS}_${ARCH}" URL="https://github.com/joelazar/kagi-skills/releases/download/${TAG}/${BINARY}" echo "kagi-enrich binary not found. Download pre-built binary from GitHub releases?" >&2 echo " $URL" >&2 read -r -p "Download? [Y/n] " reply >&2 &2 echo " $URL" >&2 exit 1 ;; esac if command -v curl >/dev/null 2>&1; then curl -fsSL "$URL" -o "$BIN" else wget -qO "$BIN" "$URL" fi chmod +x "$BIN" fi exec "$BIN" "$@" ``` ### Technical Analysis When a suitable locally built binary is unavailable, the wrapper queries a mutable `latest` release endpoint, constructs an a ...[truncated 2313 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared behavior is search, but the documented installation and runtime path includes fetching release metadata from GitHub, downloading executable code, optionally compiling from source, and running a local binary. This mismatch can mislead users and agents into approving code execution and software installation they did not expect from a search skill.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script downloads an executable from a GitHub release and then marks it executable for later execution, without any cryptographic verification of integrity or publisher authenticity beyond TLS. If the release, repository, API response, or network trust boundary is compromised, this becomes arbitrary code execution on the user's machine.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill invokes shell commands, reads environment variables, downloads binaries, and may build/execute code, but it declares no tool scope or permission boundaries. That increases the chance an agent or user invokes capabilities broader than expected, especially for a skill presented as a simple search helper.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill discusses API usage and billing but does not clearly warn that user queries are sent to Kagi's external service. Users may enter sensitive prompts assuming a local enrichment function, causing inadvertent disclosure of proprietary or personal information to a third party.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SKILL.md (reported line 23)May include surrounding context.

md
Requires a Kagi account with API access enabled. Uses the same `KAGI_API_KEY` as all other kagi-* skills.

1. Create an account at https://kagi.com/signup
2. Navigate to Settings → Advanced → API portal: https://kagi.com/settings/api
3. Generate an API Token
4. Add funds at: https://kagi.com/settings/billing_api

External Transmission

Medium
Category
Data Exfiltration
Confidence
96% confidence
Finding

The installation flow makes outbound requests to GitHub API and downloads a release asset selected from the latest tag at runtime. Pulling executable code from a mutable external source without strict pinning or robust verification creates a supply-chain risk if the account, release process, or network path is compromised.

Content

Scanner excerpt · SKILL.md (reported line 130)May include surrounding context.

md
aarch64|arm64) ARCH="arm64" ;;
esac

TAG=$(curl -fsSL "https://api.github.com/repos/joelazar/kagi-skills/releases/latest" | grep '"tag_name"' | cut -d'"' -f4)
BINARY="kagi-enrich_${TAG}_${OS}_${ARCH}"

mkdir -p {baseDir}/.bin

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The wrapper does more than invoke a search tool: it conditionally builds code and, failing that, fetches and installs a prebuilt executable from GitHub at runtime. That creates a software supply-chain and unexpected code-execution path that is not aligned with the stated search-only purpose, and users may execute unreviewed code simply by running the skill.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · kagi-enrich.sh (reported line 48)May include surrounding context.

sh
esac

    if command -v curl >/dev/null 2>&1; then
      RELEASE_META="$(curl -fsSL "https://api.github.com/repos/joelazar/kagi-skills/releases/latest")"
    elif command -v wget >/dev/null 2>&1; then
      RELEASE_META="$(wget -qO- "https://api.github.com/repos/joelazar/kagi-skills/releases/latest")"
    else

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · kagi-enrich.sh (reported line 50)May include surrounding context.

sh
esac

    if command -v curl >/dev/null 2>&1; then
      RELEASE_META="$(curl -fsSL "https://api.github.com/repos/joelazar/kagi-skills/releases/latest")"
    elif command -v wget >/dev/null 2>&1; then
      RELEASE_META="$(wget -qO- "https://api.github.com/repos/joelazar/kagi-skills/releases/latest")"
    else

Static analysis

No suspicious patterns detected.