The health secretary says she knew in September a child had died after contracting an infection possibly linked to water at Glasgow's largest hospital, but did not make it public.
Jeane Freeman learned in September that the patient had died after contracting an infection in a cancer ward in 2017.
She told BBC Scotland she acted on the information but chose to maintain patient confidentiality.
Labour MSP Anas Sarwar has described the situation as a "cover-up".
Ms Freeman said she felt for the child's parents.
She said: "I deeply regret not only the death of their child. In any circumstance that has to cause a pain that I can't possibly imagine, but I also deeply regret that they feel they haven't been given the information that they have a perfect right to receive and are entitled to.
"They have my commitment to act to ensure that situation does not happen to parents in the future.
"I don't regret honouring patient confidentiality. But upholding patient confidentiality does not mean I don't act on the information I am given."
Mr Sarwar had raised the issue - which was brought to light by an NHS whistleblower - during First Minister's Questions on Thursday.
The whistleblower raised concerns about the findings of a review into infections in child cancer patients.
The MSP said he had seen information which showed that senior managers were repeatedly alerted to the fact a previous review failed to include cases of infection related to the water supply in 2017. He said the parents of the child had never been told the true cause of their child's death.
Greater Glasgow Health Board say a link between the infection and the hospital cannot be proven because regulations at the time did not require water testing.
Mr Sarwar said: "This is a remarkable confession from the health secretary.
"There are now incredibly serious questions for the government and NHS Greater Glasgow and Clyde to answer, and a huge challenge to rebuild trust."
He added: "This devastating death has been covered up since September. Jeane Freeman says she acted, but the most important act would be to inform the parents.
"At the centre of this scandal is a tragic loss of life, and the priority must be seeking answers for the parents who lost a child."
Last September, two wards at the Royal Hospital for Children were closed and patients moved to the adjoining Queen Elizabeth University Hospital as Health Protection Scotland (HPS) investigated water contamination incidents.
An HPS investigation found 23 cases of blood stream infections with organisms potentially linked to water contamination were identified between 29 January and 26 September, 2018.
The Daily Record reported a clinician-led team at NHSGGC investigated further back than 2018.
The whistleblower who contacted Mr Sarwar claimed this investigation found up to 26 cases of water supply infections in children in the cancer wards in 2017, and that one child with cancer died after contracting an infection.
In March a report found some areas of the hospital could not be cleaned properly because they were awaiting repair work.
The inspection was ordered by Ms Freeman after patients became infected with a fungus linked to pigeon faeces.
Mr Sarwar said he has had difficult information shared with him before but this case "felt different".
He added: "I immediately imagined how I would feel if that was my child, if I was that parent. I would want to know - I would expect answers."
An NHSGGC spokesman said: "When a patient dies in our care, our clinical teams discuss with family members the cause of death and the factors that have contributed to this, where they are known.
"Patients who are very sick are prone to infections and we closely monitor all infections to ensure patients are appropriately cared for. "
He said that two individual cases of Stenotrophomonas were investigated in 2017 which were not linked and those were reported to Health Protection Scotland and the NHSGGC Board.
The cases were reviewed again in July 2019 when the clinical view was taken that no further action was required.
He added: "At the time of the initial investigation into these cases, national guidance did not include a requirement for health boards to test for Stenotrophomonas in the water supply.
"As no tests were carried out at the time, it is not possible to conclude that these infections were connected to the water supply. It is extremely disappointing therefore that a whistleblower has made this claim causing additional distress to families and to other families of cancer patients."