@scalio-cloud/ui 0.103.0 → 0.104.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/nginx/security-headers.conf +22 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -42,7 +42,11 @@ Classes like `bg-primary`, `rounded-sm`, `font-display` keep working unchanged.
|
|
|
42
42
|
## Security headers for nginx (from 0.36.0)
|
|
43
43
|
|
|
44
44
|
`nginx/security-headers.conf` holds the security headers of every Scalio app (security review M6): `nosniff`,
|
|
45
|
-
framing only by the own origin, no plugins, `Referrer-Policy`, no camera/microphone/location.
|
|
45
|
+
framing only by the own origin, no plugins, `Referrer-Policy`, no camera/microphone/location. From 0.104.0 also HSTS
|
|
46
|
+
(one year, `includeSubDomains`) and a Content-Security-Policy (BL-1080): scripts only from the own origin (no inline
|
|
47
|
+
script, no `eval`), inline styles allowed, images also `data:`, `blob:` and HTTPS, fonts `data:`, connections to
|
|
48
|
+
HTTPS/WSS. The file explains every exception. An app that needs more (another script host, `eval`) must say so
|
|
49
|
+
before it upgrades; test the upgrade on dev with the browser console open (CSP errors show there).
|
|
46
50
|
Copy it in the nginx stage of the frontend Dockerfile and include it in the server block and in every `location`
|
|
47
51
|
that has its own `add_header` (nginx drops the server-level lines there):
|
|
48
52
|
|
|
@@ -1,9 +1,27 @@
|
|
|
1
|
-
# Security headers for every Scalio app (security review M6). Shipped in @scalio-cloud/ui, copied by each
|
|
2
|
-
# Dockerfile to /etc/nginx/snippets/. Include it in the server block AND in every location that has its own
|
|
1
|
+
# Security headers for every Scalio app (security review M6, BL-1080). Shipped in @scalio-cloud/ui, copied by each
|
|
2
|
+
# app's Dockerfile to /etc/nginx/snippets/. Include it in the server block AND in every location that has its own
|
|
3
3
|
# add_header: nginx drops the server-level add_header lines in such a location.
|
|
4
|
-
#
|
|
4
|
+
#
|
|
5
|
+
# HSTS: one year, subdomains included, no preload (preload cannot be undone quickly). Browsers ignore it over plain
|
|
6
|
+
# HTTP, so an instance without TLS keeps working.
|
|
7
|
+
#
|
|
8
|
+
# Content-Security-Policy, what each part allows and why:
|
|
9
|
+
# default-src 'self' everything else only from the own origin
|
|
10
|
+
# script-src 'self' only the app's own bundles: no inline script, no eval (index.html has none)
|
|
11
|
+
# style-src 'self' 'unsafe-inline' sonner, Radix, Recharts, Quill and the access page set inline styles
|
|
12
|
+
# img-src 'self' data: blob: https: icons as data: URIs (Vite inlines small files), previews from blob: URLs,
|
|
13
|
+
# images in user content (Folio pages, Nexus) may come from any HTTPS address
|
|
14
|
+
# font-src 'self' data: self-hosted fonts (fonts.css), small fonts inlined by the build
|
|
15
|
+
# connect-src 'self' https: wss: API and the Folio live room (same origin); https:/wss: until every app is
|
|
16
|
+
# checked for browser calls to other hosts (Nexus, Kontor), then tighten to 'self'
|
|
17
|
+
# frame-src 'self' blob: Nexus frames its own pages; previews of a downloaded file
|
|
18
|
+
# worker-src 'self' blob: workers of editor libraries
|
|
19
|
+
# frame-ancestors 'self' framing only by the own origin (same as X-Frame-Options)
|
|
20
|
+
# object-src 'none'; base-uri 'self' no plugins, no <base> from injected markup
|
|
21
|
+
# No form-action: the Microsoft sign-in leaves by redirect, and Chrome checks form-action on redirects as well.
|
|
22
|
+
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
|
5
23
|
add_header X-Content-Type-Options "nosniff" always;
|
|
6
24
|
add_header X-Frame-Options "SAMEORIGIN" always;
|
|
7
|
-
add_header Content-Security-Policy "frame-ancestors 'self'; object-src 'none'; base-uri 'self'" always;
|
|
25
|
+
add_header Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob: https:; font-src 'self' data:; connect-src 'self' https: wss:; frame-src 'self' blob:; worker-src 'self' blob:; frame-ancestors 'self'; object-src 'none'; base-uri 'self'" always;
|
|
8
26
|
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
|
9
27
|
add_header Permissions-Policy "camera=(), microphone=(), geolocation=(), payment=()" always;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scalio-cloud/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.104.0",
|
|
4
4
|
"description": "Scalio Control Room design tokens, Tailwind preset, self-hosted fonts, the shared app header, sign-in layout, sidebar and page blocks",
|
|
5
5
|
"license": "SEE LICENSE IN README.md",
|
|
6
6
|
"private": false,
|