Close the security gaps found by the application audit
Imported toolboxes could run scripts on the site origin through image data URLs, so only bitmap images are now accepted at import, display and opening. The Cards game and its fake admin login no longer turn on when NODE_ENV is missing, and the Node server now sends a CSP and the other security headers. The deployment script no longer runs files owned by the service account as root, the services cannot gain privileges through sudo, and the deployment key stays in a single workflow step with actions pinned by commit. The script and systemd units must still be reinstalled on the server after delivery. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
1adccb4e04
commit
7046515d20
20 changed files with 233 additions and 36 deletions
|
|
@ -1,4 +1,11 @@
|
|||
// Rôle : fournit les primitives communes de normalisation et d'identifiants du stockage toolbox.
|
||||
// Formats bitmap uniquement : un SVG ou un document HTML exécuterait ses scripts sur l'origine du site une fois ouvert.
|
||||
const SAFE_IMAGE_DATA_URL = /^data:image\/(?:jpeg|jpg|png|webp|gif|avif);base64,[a-z0-9+/]+=*$/i;
|
||||
|
||||
export function isSafeImageDataUrl(value) {
|
||||
return typeof value === "string" && SAFE_IMAGE_DATA_URL.test(value);
|
||||
}
|
||||
|
||||
export const ID_PREFIXES = {
|
||||
tbx: "t",
|
||||
space: "sp",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue