-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Sécurité] Ajout en-têtes de sécurité manquantes dont la CSP #2098
Conversation
|
||
# Traitement des images sans le paramètre uuid dans l'URL pour un usager |
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.
J'ai remarqué que les photos coté usager ne s'affichait plus (404 retourné par nginx)
|
TESTS OK
TEST KO ?
|
@hmeneuvrier |
J'ai refait toute la procédure de la PR : toujours le pb |
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.
Tests et relecture OK
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.
Relecture et tests ok
Ticket
#1952
Description
En-têtes de sécurité manquantes https://dashlord.incubateur.net/url/histologe-beta-gouv-fr/securite/
Présentation des différentes directives utilisés de CSP (Content Security Policy)
default-src
script-src
style-src
img-src
font-src
connect-src
Changements apportés
Pré-requis
Exécuter
docker compose build histologe_nginx
Executer
make down && make run
Executer
make tools-run
et activer matomoMATOMO_ENABLE=1
Copier cette ligne dans
.env.local
(en local matomo est remplacé par l'url du container matomolocalhost:8083
SECURITY_CSP_HEADER_VALUE="default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' http://localhost:8083 https://unpkg.com; style-src 'self' 'unsafe-inline' https://unpkg.com; img-src 'self' data: blob: https://voxusagers.numerique.gouv.fr https://*.tile.openstreetmap.org https://unpkg.com https://jedonnemonavis.numerique.gouv.fr; connect-src 'self' https://api-adresse.data.gouv.fr http://localhost:8083 https://koumoul.com; font-src 'self';"
make down && make run
(dans le doute) https://mattermost.incubateur.net/betagouv/pl/ptghnjyr37gc8d3ad35aa337arTests
Vérifier que la politique de sécurité n’empêche pas le bon fonctionnement du site (avec l'inspecteur ouvert)
Vérifier à l'aide d'une requête CURL la présence des 3 en-têtes manquantes
Exemple d'erreur :

Documentation