1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

Potential clickjacking on legacy browsers issue while running checkmarx on angular 16 project

Discussão em 'Angular' iniciado por h.z., Julho 16, 2025.

  1. h.z.

    h.z. Guest

    Potential clickjacking issue is reported while running checkmarx report on angular 16 project. The issue is reported for all component.html in my project even if I try fixing this issue using frame busting scripts in index.html file. Any suggestions to fix this issue?

    Approach: Framebusting script added to index.html and added to all component.html in my project

    <script>
    if (window.self === window.top) {}
    else {
    var emptyDiv = document.createElement('div');
    emptyDiv.innerHTML = "";
    document.body.append(emptyDiv);
    }
    </script>


    Result: I still get this issue

    Approach: adding frame ancestors to meta tag along with CSP tags inside index.html

    <head>
    <meta http-equiv="X-Frame-Options" content="DENY">
    <meta http-equiv="Content-Security-Policy" content="frame-ancestors 'none';">
    </head>


    Result: I still get this Issue

    I added in my server too, Although the checkmarx checks the Angular project separately from the server but still get this issue

    How to solve the problem?

    Continue reading...

Compartilhe esta Página