From 29e346c225d6aae467b153da2ec615e5fedd3174 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 7 Sep 2021 10:20:32 +0200 Subject: [PATCH 1/4] Update systemd.service --- conf/systemd.service | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/conf/systemd.service b/conf/systemd.service index 2b60a39..1f3c98b 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -17,5 +17,35 @@ SuccessExitStatus=143 TimeoutStopSec=120 Restart=always +# 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 cf44e469222bd58c3f471af9be18a7bf96ae0e66 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 9 Sep 2021 23:47:11 +0200 Subject: [PATCH 2/4] Fix --- manifest.json | 2 +- scripts/restore | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/manifest.json b/manifest.json index 86873ee..f061e57 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Web database management tool", "fr": "Outil web de gestion des bases de données" }, - "version": "0.40.2~ynh1", + "version": "0.40.2~ynh2", "url": "https://www.metabase.com/", "upstream": { "license": "AGPL-3.0-only", diff --git a/scripts/restore b/scripts/restore index f622c9e..05bbb65 100755 --- a/scripts/restore +++ b/scripts/restore @@ -38,8 +38,6 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) #================================================= ynh_script_progression --message="Validating restoration parameters..." --weight=3 -ynh_webpath_available --domain="$domain" --path_url="$path_url" \ - || ynh_die --message="Path not available: ${domain}${path_url}" test ! -d "$final_path" \ || ynh_die --message="There is already a directory: $final_path " From b5425aca9549d6963feea3a85f04bf57ba6f8273 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Thu, 9 Sep 2021 21:47:17 +0000 Subject: [PATCH 3/4] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2cca1ff..22b6980 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Web database management tool -**Shipped version:** 0.40.2~ynh1 +**Shipped version:** 0.40.2~ynh2 diff --git a/README_fr.md b/README_fr.md index 799db9e..d75c444 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Outil web de gestion des bases de données -**Version incluse :** 0.40.2~ynh1 +**Version incluse :** 0.40.2~ynh2 From 50ffe3414f88f8241a4d1f562df0bc125e6d9931 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 21 Sep 2021 23:50:51 +0200 Subject: [PATCH 4/4] Update manifest.json --- manifest.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index f061e57..f044c5d 100644 --- a/manifest.json +++ b/manifest.json @@ -32,8 +32,7 @@ "arguments": { "install": [{ "name": "domain", - "type": "domain", - "example": "metabase.example.com" + "type": "domain" }, { "name": "is_public",