What license is it open sourced under? I think AGPL (or one of the GPLs) would be the only one that could sorta force that issue.
The community would have to enforce the rules of the license. It wouldn't stop them from attempting to commercialize but the code would all have to be 100% free and public. All of it. Free to review, change, copy, etc.