Why would it matter if the model is trained with malicious intent? It's a pure function. The harness controls security policies.
One way you could probably do it is by identifying a commonly used library that can be misused in a way that would allow some kind of time-of-check to time-of-use (TOCTOU) exploit. Then you train the LLM to use the library incorrectly in this way.