We've published internally developed projects on github after removing anything sensitive and initializing a new repo from the latest version of the code base.
You lose your development history, but you ensure you won't get bitten by stuff like this.
You lose your development history, but you ensure you won't get bitten by stuff like this.