So, my company uses a Bitbucket Cloud for SCM, and I use ScourceTree on my laptop workstation. I am working on a code project that was originally written mostly by someone else and currently the software that I'm working on uses a plain-text config file to pass in username and password information to the program to use to connect to the services it needs.
Now, I'm no stranger to the fact that this is a very bad thing, but I have yet to get around to fixing this as a solo developer. (Although it is definitely a high priority).
I wanted to commit changes to the config file today, but I was hesitant, as I was working on an unsecured network at a cafe. This got me wondering: How secure are most of these cloud-based code services (ie. Bitbucket/Github) and how dangerous is it to commit code like this on a public network?
I have the awesome ability to work remotely and do not wish to risk my job by exposing my company to unnecessary risk.
Since I know that plain text passwords tend to be a bad idea, I was also wondering how I should go about fixing this issue. The app I'm working on uses java, and the passwords are in a properties file. Is there a java library or utility I should know about (still a bit new to java).
I was hoping that this could be a general answering point for beginners concerned with how to deal with passwords securely in code (of any language). I work in C++ and PHP alot also, so I would really appreciate advise on how to handle such things in those languages as well. Don't need extreme specifics, just keywords to search. Are they libraries, or utilities built into the languages?
Edit: I am aware that this SO question explains a good method of handling my situation in Java, but a) the question about network security between Bitbucket/Github and SourceTree is different and b) I was asking for more information about general best practices across languages, rather that JUST specifics about java (although the link provided was quite helpful at addressing the Java-specific case).