Is this safe?
I wouldn't make a cannon this way, but I have a machine shop in my garage. It sounds like the chamber is the drilled hole and the bore is the threaded end of the second coupling. I think there is some risk of premature ignition with the powder fouling in the outer threads but the charge must be pretty small so overall I don't think there is much risk.
However, the risk is in the hands of the operator. He is what controls how much powder is in the equation.