Skip to main content
Legia

Cybersecurity

What is White Box Testing?

Also called clear box testing, glass box testing.

Short definition

White box testing is a security testing approach in which testers get full access to system information, including the source code, configuration, and architecture, to find weaknesses from the inside.

How it works

The tester reads the source code and configuration to look for risky patterns, such as database queries built from user input, missing permission checks, or passwords hardcoded in the code. Code analysis is usually aided by automated tools, and important findings are then confirmed by testing the running application. Architecture diagrams help the tester understand how data flows between components.

Strengths and limitations

Because nothing is hidden, white box testing can find vulnerabilities that are nearly impossible to find from the outside, including in rarely used features. The testing is also more efficient per vulnerability found. The limitations: it takes longer for large applications, the tester must know the programming languages used, and the company needs to be comfortable sharing its source code under a confidentiality agreement.

When to use it

Applications that handle money or sensitive data, custom-built systems that will be used for years, or when a company has just taken over an application from a vendor and wants to know the quality of its security. For a company profile website, black box or grey box testing is generally sufficient. White box testing can also be combined with external testing, so vulnerabilities found in the code are immediately proven against the running application.

Related Legia service Penetration Testing Manual testing that proves how far a vulnerability can be exploited, with the evidence to back it up.

Resources