In this video, we explore the risks of using System.getenv() in Java applications and learn how to validate and secure the data it retrieves. We'll dive into:
Different ways to invoke System.getenv().
Modern Java syntax to filter results using streams and lambdas.
Techniques for validating data, including checking for null values, using regex patterns, and comparing against fixed sets of acceptable values.
Creating an inline sanitizer method to clean up untrusted data.
By the end of the video, you'll have the tools and knowledge to make your applications safer and delight any AppSec analyst or static analysis tool! Don't miss it, and let's begin secure!
#Java #AppSec #SystemGetenv #SecureCoding #CyberSecurity #Developer #DataValidation #JavaSecurity #Programming #softwaredevelopment
🕒⏰ T I M E S T A M P S ⌚️🕰️
00:00 So what's the fix
00:33 Forms of System.getenv
01:53 Use lambdas and streams to search getenv
03:27 Validating results from System.getenv
06:32 Sanitizing input data