-
Type:
Task
-
Resolution: Fixed
-
Priority:
Minor
-
Component/s: pipeline-aggregator-view-plugin
-
119.v4b_ec11953552
Note
While testing this plugin, evaluate whether the third-party libraries in src/main/webapp/lib 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.
Problems
== Inline Script Block
Line: 24
----
<script type="text/javascript">
var url = window.location.href
var refreshInterval = ${it.refreshInterval}
var buildHistorySize = ${it.buildHistorySize};
var useScrollingCommits= ${it.useScrollingCommits};
var onlyLastBuild= ${it.onlyLastBuild};
var showCommitInfo = ${it.showCommitInfo};
var showBuildNumber = ${it.showBuildNumber};
var showBuildTime = ${it.showBuildTime};
var showBuildDuration = ${it.showBuildDuration};
function reload_info (interval) {
reload_jenkins_build_history('#jenkinsBuildHistory', url, buildHistorySize, useScrollingCommits, onlyLastBuild, showCommitInfo, showBuildNumber, showBuildTime, showBuildDuration);
setTimeout(function(){ reload_info(interval); }, interval);
}
</script>
----
== Inline Script Block
Line: 54
----
<script type="text/javascript">
if(showCommitInfo) {
document.write("<th>${%Commits}</th>");
}
if(showCommitInfo) {
document.write("<th>${%Build}</th>");
}
if(showBuildTime) {
document.write("<th>${%Finished}</th>");
}
if(showBuildDuration) {
document.write("<th>${%Duration}</th>");
}
</script>
----
== Inline Script Block
Line: 78
----
<script type="text/javascript">
var $$ = jQuery;
$$(document).ready(function(){
$$.ajaxSetup({ cache: false });
reload_info(refreshInterval);
});
</script>
----
Solution
https://www.jenkins.io/doc/developer/security/csp/#inline-javascript-blocks