T03 · Remote Payload Retrieval and Execution
- Location
scripts/install_junie.sh:94- Finding
Unverified Remote Installer Download and Execution
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This Junie helper appears coherent and not malicious, but it should be reviewed because installation can run unverified external code and persist agent configuration.
Install only if you trust JetBrains Junie and are comfortable with external installer/package-manager code running as your user. Prefer a reviewed or pinned install path where available, inspect config changes before writing ~/.junie or project .junie files, keep API keys in environment variables instead of durable config unless you explicitly want persistence, and confirm which model/provider will receive repository context before launching Junie tasks.
scripts/install_junie.sh:94Unverified Remote Installer Download and Execution
scripts/install_junie.sh:108Unpinned Global Third-Party Package Installation
The code is aligned with only a narrow subset of the description: installing/reinstalling Junie CLI, with some update-like behavior via brew upgrade and version reporting. The declared purpose, however, presents a substantially broader skill centered on full Junie lifecycle management and orchestration, including authentication, configuration management, bootstrap of repo layouts, CI/headless setup, and specific command-phrase-triggered interactions. None of those broader behaviors appear in the supplied code chunk. This is a description-versus-behavior mismatch because the actual code implements only installation logic rather than the wider native Junie steering/setup functionality described.
The description presents a broad Junie CLI setup and orchestration skill, focused on installation, authentication, configuration, bootstrapping, CI/headless preparation, and directing Junie execution. The actual code does none of those things. Instead, it is a standalone analytics utility for reading local Junie session logs and summarizing observed usage and cost. This is a materially different primary purpose and introduces an undeclared capability: inspection of local session log/state files under ~/.junie/sessions. While both relate to Junie, the implemented behavior is usage-reporting/telemetry analysis rather than CLI management or control. Therefore the description does not accurately represent the code chunk.
The skill encourages selecting external models/providers and exporting provider API keys for use with Junie. This creates a real data-exfiltration and policy-bypass risk because repository contents or prompts may be sent to third-party model providers, and the skill is specifically designed to steer another agent to perform implementation and review tasks over local code.
export JUNIE_OPENAI_API_KEY='...'
junie --model gpt-5 "review the latest changes"
export JUNIE_ANTHROPIC_API_KEY='...'
junie --model sonnet "review the latest changes"
curl -fsSL https://junie.jetbrains.com/install.sh | bash is a classic external-script-fetch pattern that grants immediate shell execution to remote content. Because this skill is specifically intended to steer host agents through installation and configuration, the context makes it more dangerous: an automated agent may execute the command without scrutiny, turning any upstream compromise into arbitrary code execution on the target machine.
## Install
Documented install methods:
- macOS/Linux: `curl -fsSL https://junie.jetbrains.com/install.sh | bash`
- Windows PowerShell: `powershell -NoProfile -ExecutionPolicy Bypass -Command "iex (irm 'https://junie.jetbrains.com/install.ps1')"`
- macOS Homebrew: `brew tap jetbrains/junie && brew update && brew install junie`
- npm: `npm install -g @jetbrains/junie`
The skill instructs the agent to perform shell execution, file reads, and file writes, but it does not declare any explicit tool scope or allowed-tools/permissions boundary. That makes the skill over-privileged by default and increases the chance that a host agent invokes filesystem or shell actions broader than the user intended, especially because the skill includes installation, config mutation, and bootstrap flows.
The skill directs persistent modification of ~/.junie/config.json and project .junie/config.json and bootstraps repo-local Junie state. Persistent changes can outlive the current task, alter future agent behavior, and introduce hidden trust boundaries through skill/model/MCP/rules wiring, making this more dangerous than an ephemeral one-shot command.
---
name: junie
description: Install, update, authenticate, configure, and direct JetBrains Junie CLI in Junie-native ways on macOS or Linux shells. Use when a host agent should steer Junie iteratively toward an overall goal, especially when the host agent has broader context than Junie, Junie should carry out focused implementation/review work, or the task may benefit from Junie-accessible models not available to the host agent. Also use when asked to set up Junie, verify an existing install, create or adjust ~/.junie/config.json or project .junie/config.json, bootstrap a repo’s .junie layout, wire in skills/guidelines/MCP/model locations, prepare Junie for CI headless usage, or decide whether interactive Junie flows truly require headless-terminal-style PTY control. Trigger on limited host-agent command phrases such as /junie help, /junie status, /junie model, /junie usage, /junie bootstrap, and /junie dry-run.
---
# Junie
The skill explicitly enumerates user and project Junie directories and shell environment details. In context this is for diagnostics, but it can still expose sensitive metadata such as installed components, project structure, and potentially secret-bearing config filenames or contents if the pattern is expanded by an agent, which increases information-disclosure risk in shared or untrusted environments.
command -v junie || true junie --version || true printf '%s\n' "$SHELL" ls -la ~/.junie 2>/dev/null || true ls -la ./.junie 2>/dev/null || true ls -la ./.junie/skills 2>/dev/null || true
The usage-summary workflow reads Junie runtime/session data and may encourage retention or reporting of model usage, token counts, and related metadata. While lower risk than config mutation, it still touches persisted session artifacts and could leak operational telemetry or sensitive contextual traces if exposed beyond the user.
- project/user config model or provider, if present in `.junie/config.json` or `~/.junie/config.json`
- Junie’s current launch model from read-only runtime state, usually `~/.junie/settings.json` keys such as `modelForLaunch` and `effortPerModel`
- after a run, confirm from Junie logs when available; log lines containing `AgentParameters(modelParameters=ModelParameters(model=..., effort=...))` are a useful observed source
- after a run, summarize observable usage when available: model(s), estimated cost, input/output tokens, cache read/write tokens, and any notable helper-model usage
Use the bundled helper from the skill directory for a quick best-effort usage summary:
The file recommends install methods that execute code fetched directly from the network, including a PowerShell example that bypasses execution policy, without any warning or verification guidance. In a skill used by an agent to install/configure software, this increases the chance that the agent will blindly run high-risk commands, exposing the host to supply-chain compromise or man-in-the-middle/repository compromise scenarios.
This code creates the .junie directory structure and may overwrite .junie/AGENTS.md when --force-agents is used, but it does not prompt for confirmation or emit any warning before mutating the user's filesystem. Although bootstrapping implies setup actions, the overwrite behavior is safety-relevant and not specifically disclosed at the point of execution.
The script reads any existing config and writes back a merged JSON object to .junie/config.json, which changes user configuration on disk. There is no confirmation prompt, warning, or explicit log explaining that the existing config file will be modified.
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.
print(f" input tokens: {int(grand['inputTokens'])}")
print(f" output tokens: {int(grand['outputTokens'])}")
print(f" cache read tokens: {int(grand['cacheInputTokens'])}")
cache_write = grand["cacheCreateTokens"] + grand["cacheCreateInputTokens"]
print(f" cache write tokens: {int(cache_write)}")
if grand["reasoningTokens"]:
print(f" reasoning tokens: {int(grand['reasoningTokens'])}")
No suspicious patterns detected.