The Scottish Qualifications Authority has written to schools about "very serious" incidents of students sharing details of assessments on social media.
Formal exams were cancelled this year because of Covid but students are instead sitting assessments.
Each school has its own arrangements but the SQA has provided question papers which they can use.
It has emerged that pupils who have already sat the "exams" have been sharing information on the Tiktok app.
Following reports of thousands of students discussing the questions on social media, the SQA wrote to schools on Monday to tell them they needed to investigate candidate malpractice and apply the "appropriate penalties".
In a message, titled "Maintaining the confidentiality of secure assessment materials", the SQA's director of qualifications development Dr Gill Stewart said it was taking the matter very seriously.
She said the SQA, which is responsible for Scotland's senior phase qualifications such as Nationals, Highers and Advanced Highers, had provided "optional secure assessment materials" to schools which included question papers and marking instructions.
Dr Stewart said the SQA wrote to all schools and colleges on 20 April about the importance of maintaining the confidentiality of the material.
However, with all schools scheduling the assessments at different times, pupils have been sharing information about what is in them on social media.
The Scottish government and Scottish Qualifications Authority say results should be based on teacher judgement backed up by evidence. This evidence is to be gathered through assessments, although the SQA says there is no requirement to sit prelims or a full formal exam diet.
There are differences in the approaches schools are taking.
Some are staging what looks and feels very much like an exam diet, with study leave and assessments being carried out in games halls, under exam conditions.
Many schools, however, are doing these assessments in class time, with some pupils scheduled to sit up to three assessments in one day, alongside "normal" classes for other subjects. This is the model which most closely reflects the guidance given by the SQA.
One National 5 pupil told us that the usual seven to nine final exams had been replaced by the stresses of more than 20 assessments, or "mini exams".
A parent of a Higher pupil said the goalposts had been moved, and that her son was "stressed out the point of being ill".
The SQA said maintaining security and confidentiality was required for the integrity of the assessments and to ensure fairness for students.
It called for schools to investigate malpractice and apply penalties where it is found, although it did not say what those should be.
Education Secretary John Swinney announced in October that National 5 exams would not go ahead for second year in a row, but the Higher exams were not cancelled until mid-December.
At the time, Mr Swinney said that instead of exams there would be a new model that would "base awards on teacher judgement of evidence of learner attainment".
Following a surge in new cases of Covid-19 in December, schools were closed to most pupils for more than three months.
Most senior phase students did not return to school buildings until after the Easter holidays in the middle of April.
Many complained that despite having to learn remotely since the New Year they were told at short notice there would be a "final assessment" after the Easter holidays on which their grade would be primarily based.
They said the assessments were "exams by another name" but were being sat with much less preparation - and without study leave.
The approach across schools varies with some spreading the tests over several class lesson times but others doing them all in one go, with invigilators on hand to make sure strict exam conditions are met.
A Scottish government spokesperson said: "The SQA is taking action following reports of incidents involving candidates sharing confidential assessment content and is contacting schools and colleges to ensure that posts are removed as soon as possible and to reiterate the importance of security arrangements around assessment materials.
"Unlike with exams, schools have flexibility when setting assessments for this year's qualifications to take account of the disruption to learning that their pupils have experienced as a result of the pandemic."