Maintaining proper external links into the vast amount of code available in Software Heritage is a real technical and organisational challenge. While we do provide intrinsic identifiers that will be resilient to changes in the metadata infrastructure, it is important to connect with initiatives that work on code citation.
Indeed, when browsing code, one would like to go beyond classical full text search, for example via regular expression search or AST search.
This is a recent initiative featured in an article on Nature that tries to provide automatic citation of code by minind scientific articles, and analyses code dependencies to compute a sort of pagerank score for software contributors, which could be more meaningful than the usual lame commit count see too often around the world. Website on Depsy.org.
This is an initiative to provide DOI based citations to all scientific data. See their website for more information.
Force 11 working group on Software Citation
This working group pusblished an article on software citation principles in 2016.