MSPs are to vote on a new law to control the storage of biometric data.
How police deal with personal information including DNA, fingerprints and facial images will be covered in the Scottish Biometrics Commissioner Bill.
The law gets its third reading at the Scottish parliament on Tuesday.
The bill recommends an independent commissioner is appointed to ensure police investigations are lawful and ethical.
The bill was introduced by Justice Secretary Humza Yousaf following a report on the need to balance public safety with individual rights.
DNA samples are the ultimate detail in personal data, but until now there has been no code of practice for police and justice agencies, who rely on the information it contains to help them fight crime.
The bill aims to give greater oversight of how the police take, store, use and dispose of data such as DNA samples, fingerprints and facial recognition images.
Mr Yousaf said technological advances in biometrics had brought huge benefits to police and other justice agencies in detecting, preventing and prosecuting crime.
But it is accepted there needs to be more robust rules around its storage.
Mr Yousaf said: “We are hopefully going to appoint an independent biometrics commissioner if the bill passes and that commissioner will create a code of practice.
“That could change how biometric data is retained, collected and ultimately disposed of by the police.
“What we want to do is to give the public reassurance that although the police will continue to use the latest technology to investigate crime, the ethical considerations will also be in the forefront of our minds.”
The Scottish government’s aim is that police will at least keep up with criminals when it comes to technology. And when it comes to biometrics, they want them to be able to give maximum reassurance to the public that data will not be misused.
Layers of accountability will include the commissioner, the independent code of practice and an advisory group which would liaise with stakeholders including Police Scotland and the Scottish government.
Currently, fingerprints and DNA evidence are gathered by police and analysed by scientists at the Scottish Police Authority (SPA) laboratories for the Crown Office, which prosecutes all crime in Scotland.
Scotland is seen as leading the field in biometric data storage after a £6m investment in forensic capability in 2015.
Scotland was the first country to introduce a new analytical standard where scientists look at 24 areas of each DNA sample, compared with the European norm of 17.
The new biometrics commissioner would be appointed by Holyrood and would be accountable to MSPs.
They would be able to make recommendations if they believe an organisation is not adhering to the code of practice, which could lead to the relevant body being called to account to parliament.