Trust-based code injection system optimized for serverless environments - with AI analysis and in-memory execution