Yes, Open Source software can be published. What's required varies depending on the venue.
There are general journals that focus on the software process. The idea is to encourage better software development gets the credit it deserves. Examples of journals with this approach are the Journal of Open Research Software and the Journal of Open Source Software.
Yes. Software can be published as an open source tool with a peer review process. Several tradition-styled academic journals exist. Given the OP's profile, here are some journals that publish R packages, genetics tools, or environmental software:
The R Journal
Journal of Statistical Software
Environmental Modelling and Software
Molecular Ecology Resources
Usual disclaimer: I am not a lawyer and this is not legal advice.
Several things to consider here:
It is the university's responsibility to maintain their computers, including their contents. So if your friends have been using a computer provided by the university with cracked software on them, the vendor of the software will go after the university first. ...
I published a paper on a Python package myself.
Finding a journal
My main recommendation is to start looking for a journal now, even before you start writing.
Unless journals in your particular subfield of choice is very open to software papers, there are likely only a few journals you can choose from and those may have special requirements.
SoftwareX aims to acknowledge the impact of software on today's research practice, and on new scientific discoveries in almost all research domains. SoftwareX also aims to stress the importance of the software developers who are, in part, responsible for this impact.
To this end, SoftwareX aims to support publication of research software ...