I have an webapp in Angular and on that website there is an iframe that is used to display some reports. Some of those reports are in HTML and have scripts in them in data:
<script src="data:application/javascript;base64,KGZ1bmN0a...Ck7Cgo="></script>
And I need to make them work. But for this to work I would have to change CSP to to allow script-src data:
and this is not a very smart move.
I was hopping to solve that by separating that iframe as much as possible from webapp so
I was trying to use iframe in sandbox mode, yet it will still don't work without script-src data:
due to having null origin.
Is there a way of setting some other origin for iframe or injecting custom CSP into it?
Is there is some other way of running data: scripts in iframe in at least semi secure way ?