You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From a mail response to a question on 13th of January 2023:
Het staat wat onduidelijk in de “NOREA Handreiking ICT-beveiligingsassessment DigiD 3.0”. Ze bedoelen waarschijnlijk het volgende:
“Sta geen onveilige configuratie toe door het gebruik van 'unsafe-eval' of 'unsafe-inline' (in plaats van deze laatste kan gebruik worden gemaakt van een nonce of hash indien inline scripts of styles noodzakelijk zijn).”
Dit staat ook in de CSP-specificatie:
“In either case, developers SHOULD NOT include either 'unsafe-inline', […] When considering 'unsafe-inline', authors are encouraged to consider nonces (or hashes) instead.”
Bij de implementatie van de CSP-subtest in Internet.nl liepen de ontwikkelaars ook aan tegen de onduidelijkheid in het NOREA document en volgden de CSP-specificatie: #325 (comment)
Een en ander blijkt overigens ook uit “FAQ DigiD assessment, 1.4 d.d. 8 november 2021” waarin het volgende staat:
“De CSP directives 'unsafe-eval' en/of 'unsafe-inline' zijn onveilig. Met 'unsafe-eval' kan arbitraire code
worden uitgevoerd. Met 'unsafe-inline' kunnen scripts uitgevoerd worden die potentieel uit
onbetrouwbare bronnen komen. Beide directives zouden daarom niet gebruikt moeten worden.
Om toch gebruik te kunnen maken van inline scripts en stylesheets, moet de 'nonce' directive
gebruikt worden. Met een nonce kunnen specifieke inline script en stylesheet elementen
gewhitelist worden om te voorkomen dat inline scripts of stylesheets buiten eigen beheer
uitgevoerd kunnen worden. Gebruik een sterke random hash als nonce-waarde en zorg er voor dat
deze bij iedere request uniek is.”
Op MDN Web Docs (Mozilla) staat nog het volgende over nonces en hashes:
“Note: Only use nonce for cases where you have no way around using unsafe inline script or style contents.
If you don't need nonce, don't use it. If your script is static, you could also use a CSP hash instead. (See usage notes on unsafe inline script.)
Always try to take full advantage of CSP protections and avoid nonces or unsafe inline scripts whenever possible.”
The text was updated successfully, but these errors were encountered:
For orginal implementation details: #325
From a mail response to a question on 13th of January 2023:
The text was updated successfully, but these errors were encountered: