Back to skill

Security audit

scholar-report

Security checks for vulnerabilities and agentic risk

Overview

The skill performs its stated research-report function, but it embeds a shared API bearer token and can send broad research prompts to an external service with limited privacy guidance.

Install only if you are comfortable sending report topics, filters, and generated report data to scholar.x49.ai. Prefer setting your own SCHOLAR_API_KEY, avoid confidential or regulated research content, and confirm before saving generated Markdown into a project directory.

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
SKILL.md:38
Finding

Hard-Coded Shared API Bearer Token

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 38–45 and repeated at line 105
Vulnerability Type: Hard-coded reusable credential
Risk Level: Medium

Vulnerable Code

bash
SCHOLAR_KEY="${SCHOLAR_API_KEY:-psk_tLzPCmJdUw5oAHGeXL2H_fMrDdSyiF_SBJfn2p5uCO4}"
BASE="https://scholar.x49.ai/api/v1"

The same fallback credential is used again in the polling example:

bash
SCHOLAR_KEY="${SCHOLAR_API_KEY:-psk_tLzPCmJdUw5oAHGeXL2H_fMrDdSyiF_SBJfn2p5uCO4}"

Technical Analysis

SKILL.md embeds a reusable Scholar API Bearer token and automatically uses it whenever SCHOLAR_API_KEY is unset. Because Skill files are distributed as readable text, every recipient can extract this token and use it outside the intended Skill workflow.

Bearer tokens grant access based solely on possession. Embedding one in a distributed file prevents effective confidentiality, individual attribution, and secure lifecycle management. Although transmitting a credential to the declared HTTPS API is necessary for authenticated operation, distributing the credential itself is not necessary for the Skill’s report-generation functionality and exceeds secure minimum-privilege design.

The audit did not confirm the pre-scan’s suspected curl | bash behavior. The documented curl commands make ordinary HTTPS API requests and do not pipe downloaded content into a shell or execute a remote script.

Attack Path

  1. An attacker obtains or views the publicly distributed SKILL.md.
  2. The attacker copies the embedded token from the SCHOLAR_KEY fallback expression.
  3. The attacker supplies it as Authorization: Bearer ... in direct requests to https://scholar.x49.ai/api/v1.
  4. The attacker submits arbitrary report jobs or invokes any other endpoint authorized for that token.
  5. Those requests consume shared quota and are attributed to the shared credential rather than an individual authorized user.
  6. Continued misuse may exhaust service limits, disrupt legi ...[truncated 849 chars]
Remediation
View remediation

Remediation Suggestions

  1. Immediately revoke and rotate the exposed Bearer token.
  2. Remove the built-in fallback credential from every example and instruction.
  3. Require users to provide their own credential through SCHOLAR_API_KEY:
bash
: "${SCHOLAR_API_KEY:?Set SCHOLAR_API_KEY before using Scholar Report}"
SCHOLAR_KEY="$SCHOLAR_API_KEY"
BASE="https://scholar.x49.ai/api/v1"
  1. Store credentials in an approved secret manager or protected environment configuration rather than source-controlled or distributed documentation.
  2. Ensure logs, command traces, error output, and generated files do not expose Authorization headers.
  3. Grant each credential only the API scopes and quotas required to create, poll, and download reports.
  4. Prefer per-user credentials to preserve attribution and allow targeted revocation.
  5. If free access is required, implement a server-side unauthenticated or short-lived-token flow with strict rate limits instead of publishing a reusable secret.
  6. Add automated secret scanning to the publication pipeline to prevent future credential exposure.
  7. Warn users that research queries are transmitted to a third-party service and should not contain confidential, regulated, or unpublished information unless that transfer is authorized.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (7)

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

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

md
SCHOLAR_KEY="${SCHOLAR_API_KEY:-psk_tLzPCmJdUw5oAHGeXL2H_fMrDdSyiF_SBJfn2p5uCO4}"

while true; do
  STATUS=$(curl -s "https://scholar.x49.ai/api/v1/reports/${REPORT_ID}" \
    -H "Authorization: Bearer ${SCHOLAR_KEY}")
  echo "$STATUS" | python3 -c "
import sys, json

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger language is overly broad, allowing the skill to activate for general research or complex-question workflows that may not require external API use. Over-broad invocation increases the chance that unrelated or sensitive user content is unnecessarily sent to the third-party Scholar service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill does not prominently warn users up front that their research query and resulting content will be transmitted to an external API. This is dangerous because users may include confidential, proprietary, or sensitive material under the assumption the processing is local.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill embeds and instructs use of a hardcoded Bearer token, causing all invocations to rely on a shared secret if no user-provided key is set. Hardcoded credentials are dangerous because they normalize secret exposure, prevent tenant separation, and can enable unauthorized API use, abuse of quotas, or downstream access tied to the skill author’s account.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
92% confidence
Finding

This command transmits the user’s research query and filters to an external network service. External transmission is expected for this skill’s purpose, but it remains a real security/privacy concern because the content may contain sensitive topics, internal project details, or regulated data.

Content

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

bash
SCHOLAR_KEY="${SCHOLAR_API_KEY:-psk_tLzPCmJdUw5oAHGeXL2H_fMrDdSyiF_SBJfn2p5uCO4}"
curl -s "https://scholar.x49.ai/api/v1/reports" \
  -H "Authorization: Bearer ${SCHOLAR_KEY}" \
  -H "Content-Type: application/json" \
  -d '{

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 · SKILL.md (reported line 152)May include surrounding context.

GET /reports/{report_id}/markdown — Download the final report as Markdown text.

bash
curl -s "${BASE}/reports/${REPORT_ID}/markdown" \
  -H "Authorization: Bearer ${KEY}"

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

The manifest describes generating reports via the Scholar API and downloadable Markdown, but this note explicitly instructs persistence to the local project directory. Local file storage is not necessary to fulfill the core purpose of generating and presenting a report, and the manifest does not describe local data retention as part of the skill's scope.

Content

No source excerpt is available for this finding.