Why We Ask for Your Source Code

When we scope a web application or API pen test, we ask for access to source code as well as credentials, and every so often a customer pushes back with a reasonable objection. An attacker won’t have our source code or admin credentials, so why should the testers? Surely the most realistic test starts from the same position as an adversary?

It’s a fair question, but it doesn’t address where the attacker’s real advantage lies. Whilst it is true that some elements of testing do start from the same ‘black box’ position as a real adversary, attackers have something far more valuable than source code, which is unlimited time. They can come back to your target repeatedly, whereas a commercial pen test runs to a fixed timeframe; and in some respects source code is how a pen tester makes up for the imbalance.

The assumption that attackers don’t have source code access is also shifting. Client-side JavaScript has always been sent to every visitor’s browser, mobile apps can be downloaded and decompiled, and the open source dependencies under your product are public by definition. What has changed is how little effort it now takes. In October, REA (an open source tool that connects AI coding agents such as Claude Code and Codex to reverse engineering tools like Ghidra, Hopper and IDA) went from relative obscurity to one of the most talked-about projects on GitHub within days. Developers have already used it to reverse engineer game logic for unofficial ports. Its rise also coincided with a developer releasing open source alternatives to seven of Adobe’s main applications, and the two stories quickly merged into a wider conversation about whether any proprietary software can keep its inner workings to itself. Reading compiled code used to be specialist work, and it is quickly becoming something anyone can hand to an agent.

Credentials follow the same logic. Credential abuse still sits behind the majority of the significant incidents of recent years. If you are paying for a budgeted number of testing days, and two or three of those are spent phishing for a login, that’s not a good use of tester time, and not a good use of your budget.

Manual source code review is also a real skill, and in the hands of an experienced tester it is one of the most efficient tools in the engagement. A tester who finds a flawed authorisation check in the code can trace every place that pattern appears across the application, instead of stumbling on a single instance through the front end and leaving the rest for someone else to find. You get more findings, characterised more accurately, with proofs of concept your developers can reproduce, all within the same budget.

Source code access isn’t just our preference either. The OWASP ASVS testing standard makes clear that meaningful verification requires access to internal artefacts, and that black-box testing alone is insufficient. MASVS is particularly relevant here, because a mobile app is shipped as a build that anyone can pull apart, and the testing guide behind it treats static analysis of that build as a core part of the methodology. That is the same analysis an attacker can now automate.

We understand that your source code is your most valuable IP, and we treat it that way. But the underlying logic is understandable once explained. Attackers are going to go looking for the weak points in your application, and it is far better that the first people to find them are the testers who are working with you (with your source code to hand), not those who might be against you.

Scroll to Top