BDD is mostly open source to begin with, given that it relies on windows script files and XML to carry a majority of the task sequencing workload. There is some compiled code such as the C sharp that goes in to making the MMC console, etc. That remaining compiled code has been released under the Microsoft Permissive License. The open source code can be downloaded at the link below.
Link to Download details: BDD 2007 Source