Hi Ben, If you are worried about sharing classified information about your project with a freelancer. I would suggest that you ask him to sign an NDA [Non-Disclosure Agreement] for you.
I hope this helps.
Upwork freelancers want to earn money helping you implement your idea.
They are not interested in running away with your idea and working on it for free.
If you want to talk to intellectual property management experts and code repository experts, you can hire such right here on Upwork.