ROGUE TERMINAL v1.0 ESC to close
← Back to blog
May 28, 2026 by Rogue Security Research
agentic-securityai-coding-agentssupply-chainLLMOdependency-securityprompt-injectionOWASPASI04ASI05

PromptMink and package recommendations to coding agents

Coding agents can introduce a dependency while completing an otherwise legitimate task. The PromptMink investigation describes malicious dependencies reaching an AI-assisted coding workflow. They craft packages and documentation that look clean inside a context window, get accepted by an AI coding agent, and use the installed payload to steal data or add an SSH key.

The shift: from human persuasion to agent persuasion

Security teams already know the playbook for package registry abuse: typosquatting, maintainer takeovers, and postinstall malware.

LLM Optimization (LLMO) abuse adds a new stage that traditional controls often miss:

  • The adversary designs artifacts to score well against an agent's heuristics (plausible docs, convincing examples, tidy interfaces, safe looking README language).
  • The dependency can be transitive and delayed. The first layer looks harmless. The second layer carries the payload.
  • The blast radius expands when the agent has permission to edit dependency manifests, run package installs, or invoke tools that have shell and file system access.
What Changes
Your new "user" is the agent

A malicious package does not need to fool a senior engineer in a code review. It needs to look legitimate inside an agent workflow: a short doc snippet, a couple of code examples, and a clean API surface.

Why It Matters
Speed beats intuition

Agents move faster than human suspicion. If the workflow allows the agent to add dependencies, execute installs, or modify tool configs, the detection window shrinks from days to minutes.

PromptMink in one diagram

Dependency selection and payload execution
[DEV]
Engineer asks for feature
Agent gets task context and repo access
->
[AGT]
Agent selects dependency
Optimized docs influence package choice
->
[REG]
Layer 1 package looks clean
Imports Layer 2 payload later
->
[KEY]
Attacker SSH key installed
Enables persistent remote access
->
[EXF]
Secrets and source exfiltration
Workstation + CI runners in scope
->
[SRV]
What you want instead
Review dependencies, credentials, and egress

ReversingLabs describes a dependency added in an AI-assisted commit, credential theft, and later payloads that install SSH keys and steal source trees. The disclosed persistence mechanism is an SSH key; the report does not establish an MCP server implant.

Agent optimized artifacts change your indicators

Control PlaneHuman Oriented SignalAgent Oriented Signal
Dependency intakeOdd README, suspicious maintainer, typo nameDocs tuned for short context, clean examples, "validation" utilities that feel universally useful
Transitive graphDirect dependency looks riskyLayer 1 looks harmless, Layer 2 imports payload after installation or at runtime
Tooling persistenceDeveloper notices new extensionAn installed payload adds an attacker-controlled SSH key for future access
Detection timingCode review catches it laterCompromise can complete during the same agent run if installs and tool calls are allowed

Mapping to OWASP agentic top 10 (2026)

OWASP's Agentic Applications Top 10 (2026) is a useful way to explain this class of incident without arguing over vendor specific details. PromptMink style chains commonly touch:

  • Supply chain and dependency risks (the package and registry layer)
  • Identity and privilege abuse (an attacker adds an SSH key for later access)
  • Sensitive data exposure (secrets, tokens, and sometimes full source directories)

If your program treats agent security as "prompt injection only", you will keep missing the point: the attack path is a supply chain incident that ends as an agent runtime incident.

What to do this quarter: control the agent's change surface

Priority 1Gate dependency writes by any agent

Treat edits to package.json, requirements.txt, go.mod, and lockfiles as privileged actions. Enforce a hard gate: either a human approval step or a policy check that blocks new packages outside an allowlist or trusted namespace set.

Priority 2Inspect SSH keys and startup configuration

Inventory authorized SSH keys across developer workstations and CI images. Investigate unfamiliar keys and their installation timestamps. Require approval for access changes and restrict the permissions of build identities.

Priority 3Watch for exfil patterns in dev and CI

Monitor egress from build agents and dev workstations for unusual destinations and bursty uploads. Treat sudden outbound connections during dependency installs as suspicious, especially when combined with new lockfile changes.

A practical checklist for security leads

  1. Policy. Define what an agent can change without review (code only, not dependencies or config).
  2. Gates. Add automated checks that trigger on new dependencies even if the PR author is an agent.
  3. Telemetry. Log agent tool calls and correlate them with repo diffs and outbound traffic.
  4. Trust. Review changes to SSH keys and other persistent access settings.
  5. Recovery. After confirmed execution of the malicious package, revoke exposed credentials and rebuild affected environments from a trusted image.

Source: ReversingLabs: Claude adds malware to a crypto agent.