Files
computer-playbook/roles/web-app-opentalk/meta/csp.yml
kevinveenbirkenbachandClaude Opus 5 596b10c403 test(lint/csp): demand reason for unsafe-* grants
unsafe-inline re-admits the inline execution an XSS needs and unsafe-eval re-admits string-to-code, so a CSP relaxation must be verified against the running app rather than copied from another role. The new lint requires a nocheck marker plus a Reason on the flag's own line, so a marker cannot drift to the neighbouring directive.

The 197 pre-existing grants across 70 roles are checked out with a TODO: they were never verified and still have to be.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 23:28:14 +02:00

21 lines
770 B
YAML

---
flags:
style-src-attr:
unsafe-inline: true # nocheck: csp-unsafe Reason: historical, TODO: re-verify it is really required and does not open attack surface
script-src-elem:
unsafe-inline: true # nocheck: csp-unsafe Reason: historical, TODO: re-verify it is really required and does not open attack surface
script-src-attr:
unsafe-inline: true # nocheck: csp-unsafe Reason: historical, TODO: re-verify it is really required and does not open attack surface
whitelist:
connect-src:
- "{{ lookup('tls', 'web-app-keycloak', 'url.base') }}"
- "{{ lookup('domain', 'web-app-opencloud') }}"
- "wss:"
frame-src:
- "{{ lookup('tls', 'web-app-keycloak', 'url.base') }}"
media-src:
- "blob:"
- "*"
worker-src:
- "blob:"