-
Task
-
Resolution: Unresolved
-
Minor
Note
While testing this plugin, evaluate whether the third-party libraries in src/main/webapp/yui are compatible with CSP in restrictive mode. The plugin may need to be upgraded from jQuery 1.x to 3.x to fully function in CSP restrictive mode.
Problem
== Inline Script Block Line: 8 ---- <script type="text/javascript"> var myTabs = new YAHOO.widget.TabView("statistics"); YAHOO.plugin.Dispatcher.delegate (new YAHOO.widget.Tab({ label: '${%Files}', dataSrc: 'files', cacheData: true, active: false }), myTabs); <j:if test="${it.report.moduleCount > 1}"> YAHOO.plugin.Dispatcher.delegate (new YAHOO.widget.Tab({ label: '${%Modules}', dataSrc: 'modules', cacheData: true, active: false }), myTabs); </j:if> <j:if test="${it.report.folderCount > 1}"> YAHOO.plugin.Dispatcher.delegate (new YAHOO.widget.Tab({ label: '${%Folders}', dataSrc: 'folders', cacheData: true, active: false }), myTabs); </j:if> <j:if test="${it.report.languageCount > 1}"> YAHOO.plugin.Dispatcher.delegate (new YAHOO.widget.Tab({ label: '${%Languages}', dataSrc: 'languages', cacheData: true, active: false }), myTabs); </j:if> myTabs.set('activeIndex', 0); </script> ----
Solution
https://www.jenkins.io/doc/developer/security/csp/#inline-javascript-blocks
- links to
[JENKINS-74192] [sloccount] Extract inline script block in tabview/main.jelly
Assignee | Original: npiguet [ npiguet ] |
Description |
Original:
h4. Problems {noformat} == Inline Script Block Line: 8 ---- <script type="text/javascript"> var myTabs = new YAHOO.widget.TabView("statistics"); YAHOO.plugin.Dispatcher.delegate (new YAHOO.widget.Tab({ label: '${%Files}', dataSrc: 'files', cacheData: true, active: false }), myTabs); <j:if test="${it.report.moduleCount > 1}"> YAHOO.plugin.Dispatcher.delegate (new YAHOO.widget.Tab({ label: '${%Modules}', dataSrc: 'modules', cacheData: true, active: false }), myTabs); </j:if> <j:if test="${it.report.folderCount > 1}"> YAHOO.plugin.Dispatcher.delegate (new YAHOO.widget.Tab({ label: '${%Folders}', dataSrc: 'folders', cacheData: true, active: false }), myTabs); </j:if> <j:if test="${it.report.languageCount > 1}"> YAHOO.plugin.Dispatcher.delegate (new YAHOO.widget.Tab({ label: '${%Languages}', dataSrc: 'languages', cacheData: true, active: false }), myTabs); </j:if> myTabs.set('activeIndex', 0); </script> ---- == Inline Script Block Line: 8 ---- <script type="text/javascript"> var myTabs = new YAHOO.widget.TabView("statistics"); YAHOO.plugin.Dispatcher.delegate (new YAHOO.widget.Tab({ label: '${%Files}', dataSrc: 'files', cacheData: true, active: false }), myTabs); <j:if test="${it.report.moduleCount > 1}"> YAHOO.plugin.Dispatcher.delegate (new YAHOO.widget.Tab({ label: '${%Modules}', dataSrc: 'modules', cacheData: true, active: false }), myTabs); </j:if> <j:if test="${it.report.folderCount > 1}"> YAHOO.plugin.Dispatcher.delegate (new YAHOO.widget.Tab({ label: '${%Folders}', dataSrc: 'folders', cacheData: true, active: false }), myTabs); </j:if> <j:if test="${it.report.languageCount > 1}"> YAHOO.plugin.Dispatcher.delegate (new YAHOO.widget.Tab({ label: '${%Languages}', dataSrc: 'languages', cacheData: true, active: false }), myTabs); </j:if> myTabs.set('activeIndex', 0); </script> ---- {noformat} h4. Solution [https://www.jenkins.io/doc/developer/security/csp/#inline-javascript-blocks] |
New:
h4. Problem {noformat} == Inline Script Block Line: 8 ---- <script type="text/javascript"> var myTabs = new YAHOO.widget.TabView("statistics"); YAHOO.plugin.Dispatcher.delegate (new YAHOO.widget.Tab({ label: '${%Files}', dataSrc: 'files', cacheData: true, active: false }), myTabs); <j:if test="${it.report.moduleCount > 1}"> YAHOO.plugin.Dispatcher.delegate (new YAHOO.widget.Tab({ label: '${%Modules}', dataSrc: 'modules', cacheData: true, active: false }), myTabs); </j:if> <j:if test="${it.report.folderCount > 1}"> YAHOO.plugin.Dispatcher.delegate (new YAHOO.widget.Tab({ label: '${%Folders}', dataSrc: 'folders', cacheData: true, active: false }), myTabs); </j:if> <j:if test="${it.report.languageCount > 1}"> YAHOO.plugin.Dispatcher.delegate (new YAHOO.widget.Tab({ label: '${%Languages}', dataSrc: 'languages', cacheData: true, active: false }), myTabs); </j:if> myTabs.set('activeIndex', 0); </script> ---- {noformat} h4. Solution [https://www.jenkins.io/doc/developer/security/csp/#inline-javascript-blocks] |
Summary | Original: [sloccount] Extract inline script blocks in tabview/main.jelly | New: [sloccount] Extract inline script block in tabview/main.jelly |
Description |
Original:
h4. Problem {noformat} == Inline Script Block Line: 8 ---- <script type="text/javascript"> var myTabs = new YAHOO.widget.TabView("statistics"); YAHOO.plugin.Dispatcher.delegate (new YAHOO.widget.Tab({ label: '${%Files}', dataSrc: 'files', cacheData: true, active: false }), myTabs); <j:if test="${it.report.moduleCount > 1}"> YAHOO.plugin.Dispatcher.delegate (new YAHOO.widget.Tab({ label: '${%Modules}', dataSrc: 'modules', cacheData: true, active: false }), myTabs); </j:if> <j:if test="${it.report.folderCount > 1}"> YAHOO.plugin.Dispatcher.delegate (new YAHOO.widget.Tab({ label: '${%Folders}', dataSrc: 'folders', cacheData: true, active: false }), myTabs); </j:if> <j:if test="${it.report.languageCount > 1}"> YAHOO.plugin.Dispatcher.delegate (new YAHOO.widget.Tab({ label: '${%Languages}', dataSrc: 'languages', cacheData: true, active: false }), myTabs); </j:if> myTabs.set('activeIndex', 0); </script> ---- {noformat} h4. Solution [https://www.jenkins.io/doc/developer/security/csp/#inline-javascript-blocks] |
New:
h1. Note
*While testing this plugin, evaluate whether the third-party libraries in {{src/main/webapp/yui}} are compatible with CSP in restrictive mode. The plugin may need to be upgraded from jQuery 1.x to 3.x to fully function in CSP restrictive mode.* h4. Problem {noformat} == Inline Script Block Line: 8 ---- <script type="text/javascript"> var myTabs = new YAHOO.widget.TabView("statistics"); YAHOO.plugin.Dispatcher.delegate (new YAHOO.widget.Tab({ label: '${%Files}', dataSrc: 'files', cacheData: true, active: false }), myTabs); <j:if test="${it.report.moduleCount > 1}"> YAHOO.plugin.Dispatcher.delegate (new YAHOO.widget.Tab({ label: '${%Modules}', dataSrc: 'modules', cacheData: true, active: false }), myTabs); </j:if> <j:if test="${it.report.folderCount > 1}"> YAHOO.plugin.Dispatcher.delegate (new YAHOO.widget.Tab({ label: '${%Folders}', dataSrc: 'folders', cacheData: true, active: false }), myTabs); </j:if> <j:if test="${it.report.languageCount > 1}"> YAHOO.plugin.Dispatcher.delegate (new YAHOO.widget.Tab({ label: '${%Languages}', dataSrc: 'languages', cacheData: true, active: false }), myTabs); </j:if> myTabs.set('activeIndex', 0); </script> ---- {noformat} h4. Solution [https://www.jenkins.io/doc/developer/security/csp/#inline-javascript-blocks] |
Assignee | New: Yaroslav Afenkin [ yafenkin ] |
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Status | Original: In Progress [ 3 ] | New: In Review [ 10005 ] |
Remote Link | New: This issue links to "jenkinsci/sloccount-plugin/pull/107 (Web Link)" [ 30407 ] |