Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-74382

[netsparker-cloud-scan] Extract inline script blocks in com/netsparker/cloud/plugin/NCScanResultAction/index.jelly

XMLWordPrintable

      Problems

      == Inline Script Block
      Line: 7
      ----
      <script>var Q = jQuery.noConflict()</script>
      ----
      
      == Inline Script Block
      Line: 17
      ----
      <script type="text/javascript">
                          Q(document).ready(function () {
                              var isReportGenerated =<j:out value="${it.reportGenerated}"/>;
                              <j:if test="${!it.reportGenerated}">
                                  var warningMessage="<j:out value="${it.content}"/>";
                              </j:if>
      
                              var warning = Q('#netsparkerScanResultWarning');
                              var iframe = document.getElementById('netsparkerScanResult');
      
                              if (isReportGenerated) {
                                  Q(iframe).show();
                                  warning.hide();
                              } else {
                                  warning.html(warningMessage);
                                  Q(iframe).hide();
                              }
                          });
                      </script>
      ----
      

      Solution

      https://www.jenkins.io/doc/developer/security/csp/#inline-javascript-blocks

            Unassigned Unassigned
            basil Basil Crow
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: