Why would they not allow it? They've published the source to numerous old products (including MS-DOS[1]), and they own GitHub...
[1]: https://github.com/microsoft/MS-DOS