Add support for CWE

Add support for CWE references as added by @rcvalle on #2110. 

We are doing a new pull request for this change because we encourage changing libs and core code outside from pull request for adding new modules. So here is.