What's up, GraphQL Galaxy? I'm Scott Grillock, CSO and co-founder at StackHawk. Thanks for taking time to check out StackHawk and I hope you're learning a ton of new things at GraphQL Galaxy 2022. Hopefully, I can teach you one more.
At StackHawk, we do application security testing. Specifically, dynamic application security testing, or DAST. Let's talk about the benefits of DAST. DAST can help you prioritize your time on what to fix in application security issues because it helps identify what's discoverable and likely exploitable, because it's testing the running GraphQL API. This is the superpower of DAST, where should I focus my time fixing API security issues?
You might be thinking to yourself, but frameworks have basically prevented any of the common AppSec problems from happening, and yes, many frameworks have done a good job of preventing issues like SQL injection and cross-site scripting. Almost all of them have an unsafe version of all of those protection mechanisms to help you do complicated things and unfortunately make mistakes, not to mention things like tenancy filtering and function authorization can be hard to get right. Some people don't know about DAST, and those that do may have run into problems with DAST. Let's look at an example.
So here we are back in the good old days of legacy DAST and when we built server-side applications that ran the data and presentation layers, everything was fine and dandy. The legacy DAST scanner could scan and test the legacy application without many problems. You get good results and identify some serious AppSec bugs, and then something changed. Then we started building javascript frontends. And the javascript frontend really trolled that legacy DAST scanner. When I say trolled the legacy DAST scanner, I meant really troll it. Like, when does the page scroll end? It never does. Where are all the forms? Well it hasn't rendered yet, because your mouse isn't in this exact pixel. Legacy DAST was running along its happy way, totally assuming it was getting all the info it needed to test these new applications. Faults were terrible, scans took forever, false positive for days, etc. And the worst part is, it never realized that there was someone else in that backseat as well. Our backing APIs are in there, controlling all the data, talking to datastore backends, helping to render elements on the page, and the legacy DAST scanner thinks the frontend is passing all these requests to the backend. Do we end up even testing the API here? Are we covering all of it? Are we even making simple requests to the API at all? Well, because of JavaScript frontends, it sort of depends. It depends on the browser and the browser emulator that your legacy DAST tool is using and how well it's driving that browser. You can think of this like Selenium scripts, but instead of a specific set of functions, you're executing it to find all the possible user input paths by itself and hoping it's going to do a really good job. Even Google doesn't do this well. So how can we get back to better application security, API security testing? Better results, faster, more accurate scans, better coverage, especially around this data layer where all the assets that we're protecting are being stored. By driving this API directly using industry standards like GraphQL introspection, you can have direct access to the API, understand what it does and the data it's controlling to get fast, thorough, accurate API security testing results. Not to mention, now you can test microservices as you're building them and find these application API security bugs before they ever get shipped to production.
Comments