-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Minor
-
Component/s: sofy-ai-plugin
Problem
== Inline Script Block
Line: 10
----
<script>
let id = '${it.webTestRun.webTestRunID}';
let token = '${it.apiToken}';
fetch("https://api.sofy.ai/v1/websites/testresults/summary?testrunid=" + id, {
headers: {
"SubscriptionKey": token
}
}).then(res => res.json()
)
.
then(data => data[0] || data
)
.
then((summary) => {
document.getElementById('performance_td').innerHTML = summary.Audit_Performance_Score + "%";
document.getElementById('bestpractice_td').innerHTML = summary.Audit_BestPractices_Score + "%";
document.getElementById('progressive_td').innerHTML = summary.Audit_Progressive_Score + "%";
document.getElementById('seo_td').innerHTML = summary.Audit_SEO_Score + "%";
document.getElementById('accessibility_td').innerHTML = summary.Audit_Accessibility_Score + "%";
})
.
catch(e => console.log(e)
)
;
</script>
----
Solution
https://www.jenkins.io/doc/developer/security/csp/#inline-javascript-blocks