Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

339
Views
How to resolve the "Verify the message's origin in this cross-origin communication" vulnerability in sonarqube.?

My project runs the sonarqube scan for each build.

In the line self.addEventListener, I have the "Verify the message's origin in this cross-origin communication." vulnerability in scan results.

My application is getting loaded in an iframe.

The code snippet is as follows:-

self.addEventListener("message", function(e) {
    switch (e.data.cmd) {
        case "init":
            _initializeTimer(e.data.timeIntervalInSec);
            break;
        case "resetTimer":
            clearTimeout(self.sessionTimer);
            _initializeTimer(e.data.timeIntervalInSec);
            break;
        default:
            self.postMessage({
                status: "error",
                info: "please send a valid command"
            });
            break;
    }

What is the potential cause of this vulnerability ?

How can I resolve this ?

about 4 years ago · Santiago Gelvez
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!