Developers are trying to make advanced AI models useful for coding while reducing the risk that they enable cyberattacks. The challenge is especially difficult when model weights are widely shared.