PkgRadar

Methodology

How PkgRadar detects malware

PkgRadar is a static supply-chain malware scanner. We treat every package as hostile data: we unpack it and analyze the code, manifests, and install hooks, but we never install or execute it. This page documents that philosophy, the detector and TTP taxonomy behind every verdict, and how each finding maps to recognized frameworks — MITRE ATT&CK and the OpenSSF Malicious Packages project.

Last updated June 21, 2026

Static-only by design

The core decision behind PkgRadar is that a scanner should never run the thing it is judging. We fetch each release, hash it, unpack the archive, and inspect the bytes. We do not run npm install, pip install, gem install, cargo build, composer install, or any other package code, and we do not stand up a sandbox runtime to watch it execute. Malware in the package never gets a chance to run on our infrastructure.

This is a deliberate trade-off, and it buys three things:

We are honest about the limit: static analysis cannot observe purely dynamic runtime behavior — code that only reveals intent once it executes and reaches out to a live server. That is why PkgRadar is precision-first. We do not chase every theoretical signal; we score concrete static indicators and corroborate them with cross-release campaign correlation and, where available, confirmation against the OSV malicious packages feed. The goal is a verdict an engineer can trust enough to block a build on.

The analysis pipeline

Every release moves through the same path, from registry to verdict:

Running alongside the per-release pipeline, cross-release campaign correlation clusters packages that share payload URLs, file hashes, or publisher bursts. A single suspicious package is a signal; a dozen packages phoning the same host within an hour is a campaign — and the correlation raises confidence on every member of the cluster.

Detector & TTP taxonomy

These are PkgRadar’s finding kinds, grouped by intent. Each is mapped to a MITRE ATT&CK technique and to a category from the OpenSSF Malicious Packages project — the same install-time-vs-runtime, exfiltration, dropper, and obfuscation buckets popularized by the “Backstabber’s Knife Collection” survey of real registry malware. Where a technique has no clean framework mapping, we say so rather than force one.

Credential & secret access

Reads of credential stores, dotfiles, and process environment — the staging step before exfiltration.

Finding kindWhat it detectsMITRE ATT&CKOpenSSF category
credential_pathsCredential file accessT1552 — Unsecured CredentialsData exfiltration (collection)
env_accessEnvironment variable readT1552.001 / T1083 — Credentials in files / File & directory discoveryData exfiltration (collection)

Exfiltration & outbound network

Code that moves data off the host, including covert channels that evade naive HTTP monitoring.

Finding kindWhat it detectsMITRE ATT&CKOpenSSF category
dns_or_oast_exfilDNS / OAST exfiltrationT1048 — Exfiltration Over Alternative ProtocolData exfiltration
network_postOutbound network POSTT1041 / T1071 — Exfiltration Over C2 Channel / Application Layer ProtocolData exfiltration
suspicious_urlSuspicious URL referenceT1071 — Application Layer ProtocolData exfiltration / dropper

Install-time & lifecycle triggers

Code wired to run automatically on install. In the OpenSSF framework these are the install-time trigger that makes a supply-chain package weaponizable without the victim ever importing it.

Finding kindWhat it detectsMITRE ATT&CKOpenSSF category
install_lifecycle_scriptInstall-time lifecycle scriptT1195.002 / T1059 — Compromise Software Supply Chain / Command & Scripting InterpreterInstall-time trigger
diff_added_lifecycle_scriptLifecycle script added vs prior versionT1195.002 — Compromise Software Supply Chain (version-diff signal)Install-time trigger

Payload retrieval & dependency injection

Second-stage delivery: fetching remote code at install or runtime, or pinning a dependency to an attacker-controlled tarball.

Finding kindWhat it detectsMITRE ATT&CKOpenSSF category
remote_payload_fetchRemote payload fetchT1105 — Ingress Tool TransferDropper / second-stage download
manifest_remote_dependencyManifest dependency on remote tarballT1195.001 — Compromise Software Dependencies & Development ToolsDropper / dependency manipulation
diff_added_remote_dependencyRemote dependency added vs prior versionT1195.001 — Compromise Software Dependencies & Development Tools (version-diff signal)Dropper / dependency manipulation

Obfuscation & evasion

Techniques used to hide intent from human reviewers and naive scanners.

Finding kindWhat it detectsMITRE ATT&CKOpenSSF category
obfuscated_codeObfuscated codeT1027 — Obfuscated Files or InformationObfuscation
encoded_payloadEncoded payloadT1027 — Obfuscated Files or InformationObfuscation
base64_decodeBase64 decodeT1027 — Obfuscated Files or InformationObfuscation
eval_callDynamic eval / Function() constructionT1059 / T1027 — Command & Scripting Interpreter / ObfuscationObfuscation / runtime trigger

Execution & host effects

Direct command execution, process creation, and filesystem manipulation on the host.

Finding kindWhat it detectsMITRE ATT&CKOpenSSF category
shell_execShell executionT1059 — Command & Scripting InterpreterRuntime trigger / execution
process_spawnProcess spawnT1059 — Command & Scripting InterpreterRuntime trigger / execution
filesystem_writeFilesystem writeT1105 / T1564 — Ingress Tool Transfer / Hide ArtifactsDropper / persistence

Identity, naming & publisher signals

Account-level and naming signals that surround compromised or impersonating releases.

Finding kindWhat it detectsMITRE ATT&CKOpenSSF category
typosquat_distanceTyposquat distanceT1195.002 / T1036 — Compromise Software Supply Chain / MasqueradingTyposquatting / masquerading
publisher_changePublisher changeT1195.002 — Compromise Software Supply Chain (account compromise)Account compromise
publisher_high_riskPublisher / release-actor burstT1195.002 — Compromise Software Supply Chain (coordinated bursts)Account compromise / coordinated campaign

Emerging: AI-targeted supply chain

A new class of payload that targets the AI coding agent reading the package, not the machine running it.

Finding kindWhat it detectsMITRE ATT&CKOpenSSF category
llm_injection_payloadPrompt-injection-in-packageNo clean ATT&CK technique yet — emerging LLM-targeted supply-chain TTPEmerging (not yet categorized)

Scoring & verdicts

Findings do not block on their own — they accumulate into a score, and the score maps to one of three verdicts:

The scoring is precision-first on purpose: a lone weak indicator lands in review, not block, while corroborated high-severity indicators escalate to block. In CI, the gate enforces a configurable fail_on threshold, so a team can choose to fail builds only on high, or also on review for a stricter posture.

See it in practice

For the real-world record — named campaigns and the specific attacks PkgRadar caught, often before public disclosure — see the attacks we have caught. For our measured precision and recall — and how we handle false positives — see the accuracy page; for detection coverage and lead time against the OSV malicious-packages feed, see the coverage page and the lead-time benchmark.

Start scanning your dependencies