Back to skill

Security audit

Gemini Citation

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed Gemini API research helper with some reliability and dependency cautions, but no hidden persistence, exfiltration, or purpose-mismatched behavior was found.

Install and run this only in an environment where sharing the query with Gemini/Google Search grounding is acceptable, keep GEMINI_API_KEY scoped and private, pin or review the google-genai dependency before use, and verify important citations manually because grounding improves traceability but is not a correctness guarantee.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
requirements.txt:1
Finding

Unpinned Third-Party Dependency Permits Unreviewed Future Releases

Content
View full analysis
=0.7.0 ``` Related installation instructions in `SKILL.md:23-28`: ```bash pip install -r requirements.txt ``` ```bash pip install google-genai ``` ### Technical Analysis The dependency specification accepts any `google-genai` release at or above version `0.7.0`. The documented manual installation command is even less restrictive. Consequently, installation is not reproducible and may retrieve a future package version that was never reviewed with this Skill. Python packages can execute code during installation or when imported. The script imports this dependency and provides it with access to the Gemini API key: ```python from google import genai from google.genai import types client = genai.Client(api_key=api_key) ``` There is no evidence that the currently published dependency is malicious. The vulnerability is the absence of an exact reviewed version and integrity hashes, which increases exposure to compromised future releases, account compromise at the package publisher, or an incompatible release. ### Attack Path 1. An attacker compromises the upstream package publisher, distribution account, or a future permitted release. 2. The attacker publishes a malicious `google-genai` version satisfying `>=0.7.0`. 3. A user follows the documented `pip install` command. 4. Package-controlled code executes during installation or when `gemini_cite.py` imports the dependency. 5. The malicious code inherits the invoking user’s local permissions and can access process data, including `GEMINI_API_KEY`, research queries, and available network connectivity. This path depends on an upstream supply-chain compromise; no direct compromise is present in the audited repository. ### Impact Assessment A compromised dependency could execute with the privileges of the user running ...[truncated 707 chars]
Remediation
View remediation
``` 2. Generate and verify cryptographic hashes for the package and all transitive dependencies, then install with: ```bash pip install --require-hashes -r requirements.txt ``` 3. Use a dependency lock file generated from a trusted package index to make installations reproducible. 4. Update `SKILL.md` so the manual installation example also specifies the exact reviewed version rather than installing the latest available release. 5. Establish a controlled dependency-update process that includes changelog review, vulnerability scanning, package-origin verification, and regression testing before changing the pinned version. 6. Run the Skill under a minimally privileged account or isolated environment, and expose only the environment variables and files required for operation. ]]>
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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 (4)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill requires access to an environment secret (GEMINI_API_KEY) but does not declare explicit tool scope such as permissions or allowed-tools. In an agent ecosystem, undeclared capability requirements can broaden invocation and execution trust boundaries, making it harder to enforce least privilege and audit what the skill is permitted to access.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The description says to use the skill when 'Xiaoyan (Research Assistant) or others need highly factual, cited research summaries, literature reviews, or exact evidence,' which is a wide, natural-language activation condition rather than a narrowly scoped trigger. It does not provide explicit trigger phrases, boundaries, or negative examples to clarify when this skill should be selected versus other research or summarization skills.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The documentation claims the skill 'guarantees' grounded, non-hallucinatory facts, but the described implementation only enables Google Search grounding and surfaces grounding metadata. That does not verify that every generated claim is supported, so users may overtrust the output and propagate inaccurate or fabricated statements in research, compliance, or academic contexts.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

The dependency is specified with a lower bound only (google-genai>=0.7.0), which allows installation of any newer version, including breaking or compromised releases. In a security-sensitive research skill that relies on external APIs, this increases supply-chain risk and can also cause unpredictable behavior from upstream changes.

Content

Scanner excerpt · requirements.txt (reported line 1)May include surrounding context.

text
google-genai>=0.7.0

Static analysis

No suspicious patterns detected.