From ba81a44ca6e1cdbb0aa0717679ac5511d1d3086c Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 7 Sep 2021 10:13:51 +0200 Subject: [PATCH 1/3] Update systemd.service --- conf/systemd.service | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index b4a69ae..b4c0368 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -12,11 +12,36 @@ Environment=NODE_ENV=production ExecStart=__YNH_NPM__ start Restart=always -PrivateDevices=true -ProtectControlGroups=true -ProtectHome=true -ProtectKernelTunables=true +# Sandboxing options to harden security +# Depending on specificities of your service/app, you may need to tweak these +# .. but this should be a good baseline +# Details for these options: https://www.freedesktop.org/software/systemd/man/systemd.exec.html +NoNewPrivileges=yes +PrivateTmp=yes +PrivateDevices=yes +RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 +RestrictNamespaces=yes +RestrictRealtime=yes +DevicePolicy=closed ProtectSystem=full +ProtectControlGroups=yes +ProtectKernelModules=yes +ProtectKernelTunables=yes +LockPersonality=yes +SystemCallFilter=~@clock @debug @module @mount @obsolete @reboot @setuid @swap + +# Denying access to capabilities that should not be relevant for webapps +# Doc: https://man7.org/linux/man-pages/man7/capabilities.7.html +CapabilityBoundingSet=~CAP_RAWIO CAP_MKNOD +CapabilityBoundingSet=~CAP_AUDIT_CONTROL CAP_AUDIT_READ CAP_AUDIT_WRITE +CapabilityBoundingSet=~CAP_SYS_BOOT CAP_SYS_TIME CAP_SYS_MODULE CAP_SYS_PACCT +CapabilityBoundingSet=~CAP_LEASE CAP_LINUX_IMMUTABLE CAP_IPC_LOCK +CapabilityBoundingSet=~CAP_BLOCK_SUSPEND CAP_WAKE_ALARM +CapabilityBoundingSet=~CAP_SYS_TTY_CONFIG +CapabilityBoundingSet=~CAP_MAC_ADMIN CAP_MAC_OVERRIDE +CapabilityBoundingSet=~CAP_NET_ADMIN CAP_NET_BROADCAST CAP_NET_RAW +CapabilityBoundingSet=~CAP_SYS_ADMIN CAP_SYS_PTRACE CAP_SYSLOG + [Install] WantedBy=multi-user.target From f2963790cfa520376c3d108b0b4ad14be136d36a Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 8 Sep 2021 07:49:05 +0200 Subject: [PATCH 2/3] Update manifest.json --- manifest.json | 1 - 1 file changed, 1 deletion(-) diff --git a/manifest.json b/manifest.json index fd4a02f..bddfa68 100644 --- a/manifest.json +++ b/manifest.json @@ -13,7 +13,6 @@ "website": "https://cryptpad.fr/", "demo": "https://cryptpad.fr/", "admindoc": "https://docs.cryptpad.fr/en/", - "userdoc": "https://yunohost.org/apps", "code": "https://github.com/xwiki-labs/cryptpad" }, "license": "AGPL-3.0-only", From 6186f76bd6c1e44d18826f73698d23e90808a82f Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Wed, 8 Sep 2021 05:49:10 +0000 Subject: [PATCH 3/3] Auto-update README --- README.md | 1 - README_fr.md | 1 - 2 files changed, 2 deletions(-) diff --git a/README.md b/README.md index 3706268..357623b 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,6 @@ CryptPad is a collaboration suite that is end-to-end-encrypted and open-source. ## Documentation and resources * Official app website: https://cryptpad.fr/ -* Official user documentation: https://yunohost.org/apps * Official admin documentation: https://docs.cryptpad.fr/en/ * Upstream app code repository: https://github.com/xwiki-labs/cryptpad * YunoHost documentation for this app: https://yunohost.org/app_cryptpad diff --git a/README_fr.md b/README_fr.md index faa89e3..c89496d 100644 --- a/README_fr.md +++ b/README_fr.md @@ -30,7 +30,6 @@ Comment configurer cette application : via le panneau d'administration ainsi que ## Documentations et ressources * Site officiel de l'app : https://cryptpad.fr/ -* Documentation officielle utilisateur : https://yunohost.org/apps * Documentation officielle de l'admin : https://docs.cryptpad.fr/en/ * Dépôt de code officiel de l'app : https://github.com/xwiki-labs/cryptpad * Documentation YunoHost pour cette app : https://yunohost.org/app_cryptpad