# How do you choose between black-box, gray-box, and white-box testing in real web security work? — retained record

> Retained reddit record from reddit:cybersecurity.

Canonical: https://highsignal.app/data/records/a882ffd67e6e7a14

[← sources](https://highsignal.app/data)


source: [reddit](https://highsignal.app/data/reddit) (reddit:cybersecurity)  published 2026-09-29 15:26 ingested 2026-09-30 02:38

[original source ↗](https://www.reddit.com/r/cybersecurity/comments/1wtd53s/how_do_you_choose_between_blackbox_graybox_and/)

## retained text



```
Hey guys, I know the basic definitions, but I’m trying to understand how these approaches are actually chosen and combined in real web security work.

My current understanding is:  
**Black-box:** little or no internal knowledge. It makes fewer assumptions about the target, but coverage can be limited.  
**White-box:** access to source code gives much better visibility, but code-level reachability does not always mean attacker reachability. I’ve seen source analysis report things like “if the attacker has role/account X, then Y is possible,” while obtaining X may already be unrealistic.  
**Gray-box:** my understanding is that the tester gets some realistic access, such as user/admin test accounts or API documentation, but not full source code.

What I’m unsure about is how people decide which one to use in practice.

Is it mainly determined by what access you have, or are these approaches deliberately combined because they compensate for each other’s weaknesses?

I’d especially like to hear from people with hands-on experience in web security, vulnerability research, AppSec, bug bounty, or pentesting. How does gray-box testing look in your actual work, and when is it more useful than pure black-box or white-box testing?

Any recommended ways to practice or learn these approaches are also very welcome. Thanks!
```



document fetched 2026-09-30 00:24 · canonical https://reddit.com/r/cybersecurity/comments/1wtd53s/how_do_you_choose_between_blackbox_graybox_and
