Automating the Correctness Assessment of AI-generated Code for Security Contexts