@scalio-cloud/ui 0.35.0 → 0.36.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 CHANGED
@@ -38,6 +38,21 @@ module.exports = {
38
38
  Then remove the app's own `:root { --... }` / `.dark { --... }` blocks and the Google Fonts `@import` / `<link>`.
39
39
  Classes like `bg-primary`, `rounded-sm`, `font-display` keep working unchanged.
40
40
 
41
+ ## Security headers for nginx (from 0.36.0)
42
+
43
+ `nginx/security-headers.conf` holds the security headers of every Scalio app (security review M6): `nosniff`,
44
+ framing only by the own origin, no plugins, `Referrer-Policy`, no camera/microphone/location. No script policy.
45
+ Copy it in the nginx stage of the frontend Dockerfile and include it in the server block and in every `location`
46
+ that has its own `add_header` (nginx drops the server-level lines there):
47
+
48
+ ```dockerfile
49
+ COPY --from=build /app/node_modules/@scalio-cloud/ui/nginx/security-headers.conf /etc/nginx/snippets/
50
+ ```
51
+
52
+ ```nginx
53
+ include /etc/nginx/snippets/security-headers.conf;
54
+ ```
55
+
41
56
  ## App header (React)
42
57
 
43
58
  Every app shows the same header on the right, always in this order: (app actions), status, language, theme,
@@ -0,0 +1,9 @@
1
+ # Security headers for every Scalio app (security review M6). Shipped in @scalio-cloud/ui, copied by each app's
2
+ # Dockerfile to /etc/nginx/snippets/. Include it in the server block AND in every location that has its own
3
+ # add_header: nginx drops the server-level add_header lines in such a location.
4
+ # No script policy here (an app could break); framing only by the own origin (Nexus frames its own pages).
5
+ add_header X-Content-Type-Options "nosniff" always;
6
+ add_header X-Frame-Options "SAMEORIGIN" always;
7
+ add_header Content-Security-Policy "frame-ancestors 'self'; object-src 'none'; base-uri 'self'" always;
8
+ add_header Referrer-Policy "strict-origin-when-cross-origin" always;
9
+ 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.35.0",
3
+ "version": "0.36.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,
@@ -22,7 +22,8 @@
22
22
  "./react": "./react/index.js",
23
23
  "./shell.css": "./shell.css",
24
24
  "./auth.css": "./auth.css",
25
- "./nav.css": "./nav.css"
25
+ "./nav.css": "./nav.css",
26
+ "./nginx/*": "./nginx/*"
26
27
  },
27
28
  "files": [
28
29
  "tokens.js",
@@ -35,6 +36,7 @@
35
36
  "auth.css",
36
37
  "nav.css",
37
38
  "react/",
39
+ "nginx/",
38
40
  "licenses/",
39
41
  "fonts/",
40
42
  "README.md",