GFlisch / Arc4u.Guidance.Doc

Other
5 stars 1 forks source link

Rethink the Content Security Policty implementation #100

Open janschmidmaier50 opened 1 year ago

janschmidmaier50 commented 1 year ago

Following some concerns about the csp implemenation.

When generating the CSP rules, different hash codes are being generated, for example

.WithHash256("c5o8WnfLAUwx9Cfl/JgwrKsLPSZmgAj3Gujjp00yJuc=")
.WithHash256("mvh00ICjr8vT7eqgfC3oP7+ei01u7qsWXH+GltiWn4k=")

For which resources are those HashCodes ? --> This should be documented There is no report uri set. This way violations, would not be visible except for the browser console.

What is this picture source for ? This is an external host, which might not be safe or even reachable .From("https://avatars3.githubusercontent.com/u/25212406");

As I remember, we decided that a default set of rules (not only csp) should have been implemented within the Arc4u framework and not being generated each time. For project related extensions of the rules, there should have been methods within the Arc4u.