Detecting And Mitigating Software Security Vulnerabilities Through Secure Environment Programming