Back to skill

Security audit

gemini video analyze

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it claims: sends a user-provided public video URL and prompt to Gemini for analysis, with no hidden persistence or unrelated local access found.

Install only if you are comfortable sending the video URL and your prompt to Google Gemini. Use public URLs, avoid confidential or signed/internal links, and prefer GEMINI_API_KEY or GOOGLE_API_KEY over passing an API key on the command line.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/gemini_video_url_analyzer.py:32
Finding
API Key Exposure Through Command-Line Arguments## Vulnerability Details **File Location**: `scripts/gemini_video_url_analyzer.py`, lines 32–35 **Vulnerability Type**: Sensitive credential exposure through process arguments **Risk Level**: Medium ```python parser.add_argument( "--api-key", help="Gemini API key. If omitted, GEMINI_API_KEY or GOOGLE_API_KEY is used.", ) ``` ### Technical Analysis The script permits a Gemini API key to be supplied through the `--api-key` command-line option. Command-line arguments are not a secure secret-transfer mechanism: they may be stored in shell history, captured by process-monitoring or audit tools, included in diagnostic logs, and exposed through process inspection to other sufficiently privileged local users. Although environment-variable alternatives are supported, the insecure command-line option remains available and is explicitly documented in the help text. ### Attack Path 1. A user runs the analyzer with `--api-key <secret>`. 2. The key becomes part of the process command line and may also be retained in shell history or execution logs. 3. A local user, monitoring service, support bundle, or log reader obtains the exposed argument. 4. The observer reuses the key to make unauthorized Gemini API requests. Exploitation requires access to command history, process metadata, or logs containing the invocation. ### Impact Assessment Disclosure grants the attacker the API permissions associated with the compromised Gemini key. The attacker may consume the account's API quota, incur charges, access enabled Gemini services, and cause service disruption through quota exhaustion. This issue does not directly grant operating-system privileges beyond those already needed to inspect the relevant process data or logs.
Remediation
## Remediation Suggestions - Remove the `--api-key` command-line option and accept credentials only through a protected secret manager or environment variable. - For interactive use, obtain the key with `getpass.getpass()` so it is not echoed or added to shell history. - If command-line support must remain for compatibility, emit a prominent warning and mark the option as deprecated. - Ensure application logs, telemetry, process snapshots, and support bundles redact API keys. - Document key rotation and revocation procedures for credentials that may already have been exposed. - Scope API keys to the minimum required APIs, projects, quotas, and network restrictions supported by the provider.

T08 · Insecure Dependencies

Note
Location
scripts/gemini_video_url_analyzer.py:50
Finding
Unpinned Third-Party Dependency Installation Guidance## Vulnerability Details **File Location**: `scripts/gemini_video_url_analyzer.py`, lines 50–52 **Vulnerability Type**: Unpinned supply-chain dependency **Risk Level**: Low ```python raise RuntimeError( "Missing dependency 'google-genai'. Install it with: pip install google-genai" ) from exc ``` ### Technical Analysis When the Google GenAI dependency is unavailable, the script instructs users to install `google-genai` without a version constraint or integrity hash. Consequently, installation resolves whichever release is current at that time rather than a version reviewed with this project. The package name is not visibly misspelled, and the audited project does not itself execute `pip`; therefore, this is an unsafe dependency-management practice rather than evidence that a malicious package is currently included. Risk arises from mutable upstream releases, compromised distribution infrastructure, or an unexpectedly incompatible or vulnerable future package version. ### Attack Path 1. A user runs the script without `google-genai` installed. 2. The script displays the unpinned `pip install google-genai` instruction. 3. The user executes that command. 4. Package tooling downloads the latest available package and transitive dependencies from its configured registry without project-provided version or hash verification. 5. If an upstream release, dependency, registry, or package index is compromised, attacker-controlled package code can execute during installation or subsequent import. This path depends on a compromised or unsafe dependency source or release; no such compromise was demonstrated in the audited files. ### Impact Assessment A malicious dependency would execute with the privileges of the user installing or running the analyzer. It could access that user's files and environment, including `GEMINI_API_KEY` or `GOOGLE_API_KEY`, alter local data, make network requests, or run additional code. In a privile ...[truncated 177 chars]
Remediation
## Remediation Suggestions - Add a maintained dependency manifest or lock file that pins an audited `google-genai` version and its transitive dependencies. - Use integrity hashes where supported, such as a hash-locked requirements file installed with `pip --require-hashes`. - Replace the generic installation message with instructions referencing the project's locked dependency file. - Install dependencies in an isolated virtual environment rather than globally or with elevated privileges. - Use a trusted package index and apply dependency scanning, update review, and provenance verification in CI. - Periodically update pinned versions after reviewing release notes and known-vulnerability reports.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (3)

Lp3

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding
The skill declares access to environment-derived secrets via API key variables but does not define an explicit tool scope or permissions boundary. That omission increases the chance that the skill will be run with broader-than-necessary capabilities and makes secret usage less transparent to reviewers and users.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The skill encourages users to submit a video URL and prompt to Google Gemini but does not clearly disclose that both the URL and prompt content are transmitted to an external third-party service. This can cause accidental data exposure if users provide sensitive, private, internal, or tokenized URLs or include confidential information in prompts.

Context-Inappropriate Capability

Low
Confidence
81% confidence
Finding
The manifest describes a skill that sends a public video URL to Gemini for analysis, but the implementation also probes process environment variables for GEMINI_API_KEY or GOOGLE_API_KEY. While credential use is operationally convenient, reading ambient secrets is a broader capability than the stated purpose and is not mentioned in the manifest description.

Static analysis

No suspicious patterns detected.