Close what the security review found
A session alone could change the password, switch the second factor on or off, send the key of the language model to another address and remove the rules that stop purchases. Each now needs the password and the code, with one limit on wrong attempts that a restart of the services does not clear, and the other sessions end when the password or the factor changes. Requests to the brokers pass a list of allowed calls, never follow a redirect with a key and are signed by one client only. Pages are closed by default, nothing is cached, requests are limited to 1 MB, secrets are masked in logs and notifications, exported tables cannot run as formulas, archives carry no sessions and the container refuses to run as root. refs #68 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4897594b87
commit
4d92a39fef
35 files changed
+907
-118
No files matched your search
@@ -4,6 +4,9 @@
|
||||
# The process is the guard (SPEC 9.3, ADR 0012): it starts the engine, watches it and passes the stop on to it.
|
||||
set -eu
|
||||
|
||||
# What the application writes (database, backups, logs) is readable only by its own user.
|
||||
umask 077
|
||||
|
||||
app="/app/Anubis.Guard.dll"
|
||||
|
||||
# A command ("docker run <immagine> db import ...") runs once and ends: without the guard, which would start it again.
|
||||
@@ -26,6 +29,14 @@ case "$uid$gid" in
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$uid" in
|
||||
*[!0]*) ;;
|
||||
*)
|
||||
echo "PUID=0 farebbe girare Anubis come amministratore: usa un utente normale (99 su Unraid)." >&2
|
||||
exit 64
|
||||
;;
|
||||
esac
|
||||
|
||||
mkdir -p /data
|
||||
for folder in db models research import backups logs web-keys guard; do
|
||||
mkdir -p "/data/$folder"
|
||||
@@ -35,4 +46,4 @@ find /data -xdev \( ! -user "$uid" -o ! -group "$gid" \) -exec chown -h "$uid:$g
|
||||
chmod 700 /data
|
||||
|
||||
export HOME=/tmp
|
||||
exec setpriv --reuid="$uid" --regid="$gid" --clear-groups -- dotnet "$app" "$@"
|
||||
exec setpriv --reuid="$uid" --regid="$gid" --clear-groups --no-new-privs -- dotnet "$app" "$@"
|
||||
@@ -39,7 +39,7 @@
|
||||
<Config Name="Soldi veri consentiti" Target="ANUBIS_ALLOW_LIVE" Default="0|1" Mode="" Description="0: il bot non può collegarsi a conti reali, qualunque cosa si faccia dall'interfaccia. 1: la procedura di conferma per i soldi veri diventa disponibile." Type="Variable" Display="advanced" Required="false" Mask="false">0</Config>
|
||||
<Config Name="Telegram: token del bot" Target="TELEGRAM_BOT_TOKEN" Default="" Mode="" Description="Facoltativo: si può inserire anche dall'interfaccia. Se lo compili qui, l'interfaccia lo mostra in sola lettura." Type="Variable" Display="advanced" Required="false" Mask="true"></Config>
|
||||
<Config Name="Telegram: chat autorizzata" Target="TELEGRAM_CHAT_ID" Default="" Mode="" Description="Facoltativo: identificativo della chat che riceve gli avvisi e può dare comandi." Type="Variable" Display="advanced" Required="false" Mask="false"></Config>
|
||||
<Config Name="Segnale di vita" Target="ANUBIS_HEARTBEAT_URL" Default="" Mode="" Description="Facoltativo: indirizzo di un servizio esterno da chiamare ogni minuto, che avvisa quando il bot smette di rispondere." Type="Variable" Display="advanced" Required="false" Mask="false"></Config>
|
||||
<Config Name="Segnale di vita" Target="ANUBIS_HEARTBEAT_URL" Default="" Mode="" Description="Facoltativo: indirizzo di un servizio esterno da chiamare ogni minuto, che avvisa quando il bot smette di rispondere." Type="Variable" Display="advanced" Required="false" Mask="true"></Config>
|
||||
<Config Name="Utente (PUID)" Target="PUID" Default="99" Mode="" Description="Utente a cui va la cartella dei dati e con cui gira l'applicazione. 99 è il valore normale su Unraid." Type="Variable" Display="advanced" Required="false" Mask="false">99</Config>
|
||||
<Config Name="Gruppo (PGID)" Target="PGID" Default="100" Mode="" Description="Gruppo a cui va la cartella dei dati. 100 è il valore normale su Unraid." Type="Variable" Display="advanced" Required="false" Mask="false">100</Config>
|
||||
<Config Name="Database: indirizzo completo" Target="ANUBIS_DB_URL" Default="" Mode="" Description="Facoltativo, per casi particolari: sostituisce i campi PostgreSQL separati." Type="Variable" Display="advanced" Required="false" Mask="true"></Config>
|
||||
|
||||
Reference in new issue
Block a user