TL;DR: In mixture-of-experts language models, the prompt “Is this code malicious?” routes through a morality-associated path more than through vulnerability or legality paths, and forcing another question’s routing can change the answer, according to Manifold Security research. That means judgment in these models is not just a coding task but a routed framing problem.
Editorial analysis by NHI Mgmt Group, based on content published by Manifold Security: “Ask a Model If Code Is Malicious and It Reaches for Its Morals”.
Key questions
Q: How should security teams test whether an LLM’s code judgments are prompt-framing sensitive?
A: Use paired evaluations with the same code and multiple prompts that vary only in framing, such as malicious, vulnerable, legal, and neutral wording.
Q: Why can a model judge malicious code differently from a pure vulnerability check?
A: Because the model may not treat the task as a narrow defect scan.
Q: What should teams do when routing changes the model’s security answer?
A: Treat that as an assurance failure, not a curiosity.
Practitioner guidance
- Test prompt-framing sensitivity in security classifiers Run the same malicious-code samples under security, legality, morality, and neutral prompts, then compare output drift and route distance to see whether framing changes the decision boundary.
- Evaluate routing stability under expert-path perturbation Measure whether a model’s security judgement changes when routing is transplanted from another prompt, because that reveals whether the internal path is part of the classification mechanism.
- Validate code-review models against intent and defect separately Separate tests for malicious intent, unsafe behaviour, and ordinary vulnerability detection so that one task does not silently inherit assumptions from another.
Bottom line: Mixture-of-experts models can route the same malicious-code prompt through a morality-associated path rather than a pure vulnerability path.
Explore further
View Full Forum → | NHI Foundation Course → | Our Services → | Read the full analysis →