It is now possible to restrict access to an app or website based on genetic traits such as sex, ancestry or disease susceptibility, enabling the creation of websites that only provide access if you are of a specific ethnicity or gender.

This is possible due to the development of a codebase posted on GitHub this week that utilises the API for genetic testing kit providers 23andMe, although 23andMe themselves are in no way involved in its development.

According to its creator, GitHub user ‘offensive-computing’, it could allow the development of websites offering a safe digital space to frequently trolled groups such as women; enable genetically specific sects such as Hasidic Jewish groups to restrict access based on certain genes and create dating sites that would screen users to avoid people with the same recessive genes from producing offspring with congenital diseases.

Other proposed uses include for groups that are defined by ethnic background – ‘offensive-computing’ gives Black Panthers or NAACP members as an example – and for online pharmacies to check for a genetic predisposition to negative drug interactions.

Dubbed Genetic Access Control, the codebase allows websites to use the data gained through a user’s 23andMe profile, which is created after users make use of the company’s genetic testing service.

Working in a similar way to how third party sites utilise Facebook data, the user is shown a dialogue box that asks them to approve the sharing of certain genetic data, the specifics of which would depend on the app or website.

Given that a user is required to pay £125 ($99 / €169) for the genetic testing kit from 23andMe, which gives them data on everything from their inherited conditions and risk factors to their ancestry makeup, only a small percentage of potential users will have a profile to be verified.

However, for certain uses visitors may be willing to sign up for the process simply to gain access to the site or app in question, enabling truly restrictive communities to thrive online.

There are undoubtedly potential ethical issues with the codebase, most notably whether it is right to restrict what people can and can’t access based on their genetic makeup.

The creator also described the solution as having “unresolved ethical issues regarding trans-*-identifying persons such as transgender and transethnic users” because of the difference between their gender identify and genetic sex.

However, the creator has proposed some genuinely useful and reasonably ethically sound uses too, in the form of the pharmacy and dating site examples, so it is possible that websites could make use of this codebase without moral outcry.