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

[ecs-publisher] Extract inline script block and event handlers in de/eacg/ecs/publisher/PublisherBreakOptions/config.jelly

XMLWordPrintable

      Problems

      == Inline Script Block
      Line: 6
      ----
      <script>
              if(!document.getElementById('breakBuild')){
                  var head  = document.getElementsByTagName('head')[0];
                  var link  = document.createElement('link');
                  link.id   = 'breakBuild';
                  link.rel  = 'stylesheet';
                  link.type = 'text/css';
                  link.href = '${resURL}/plugin/ecs-publisher/css/breakBuild.css';
                  link.media = 'all';
                  head.appendChild(link);
              }
          </script>
      ----
      
      == Inline Event Handler
      Line: 20
      ----
      <f:checkbox field="allowBreakBuild" title="${%allowBreakBuild}" checked="${instance.isAllowBreakBuild()}" onclick="javascript:allowBreakBuild(this)"/>
      ----
      
      == Inline Event Handler
      Line: 33
      ----
      <f:checkbox field="breakOnVulnerabilities" title="${%breakOnVulnerabilities}" checked="${instance.isBreakOnVulnerabilities()}" onclick="javascript:allowBreakBuildField(this)"/>
      ----
      
      == Inline Event Handler
      Line: 48
      ----
      <f:checkbox field="breakOnLegalIssues" title="${%breakOnLegalIssues}" checked="${instance.isBreakOnLegalIssues()}" onclick="javascript:allowBreakBuildField(this)"/>
      ----
      
      == Inline Event Handler
      Line: 63
      ----
      <f:checkbox field="breakOnViabilityIssues" title="${%breakOnViabilityIssues}" checked="${instance.isBreakOnViabilityIssues()}" onclick="javascript:allowBreakBuildField(this)"/>
      ----
      

      Solutions

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

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

              Created:
              Updated: