Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on pourrait pas enlever unsafe-eval aussi ?
J'ai pas trouvé de
eval
dans le code.Ya d'autres fonctions que ca pourrait bloquer, que j'ai pas cherché : https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src#unsafe_eval_expressions
Après, ca serait ptet un peu tricky à repérer si ca casse des trucs...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ça serait top d'enlever les unsafe eval mais je ne sais pas l'impact, on peut tester à la rigueur
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Si on l'enlève, ça casse au moins le run de dev parce que webpack fait un eval pour se lancer. En revanche, c'est ptet pas un problème pour la prod. Mais je pense que c'est suffisant pour le moment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
il y a des CSP qui impact le webpack ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Si je l'enlève, j'ai un message de violation de CSP sur le eval(...contenuAvecDuWebpackDedans...) dans bundle.js et l'appli ne se charge pas avec yarn start. C'est aussi possible de contourner ça en mettant en inline les scripts et utiliser le CSP d'inline mais je sais pas c'est quoi les implications niveau chargement après (package/chargement initial plus gros) (valable pour le CSS aussi)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible que ça soit lié à une lib que l'on utilise et qui se retrouve dans les fichiers compilés et qui respecte pas le CSP (vu sur le net), mais je sais pas comment trouver le coupable.