fix(ci): validate yaml workflow failing#27391
Conversation
Code Review ✅ ApprovedUpdates YAML workflow validation to resolve recent CI failures. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
There was a problem hiding this comment.
Pull request overview
Updates the default Content Security Policy (CSP) configuration in conf/openmetadata.yaml by removing the previously hard-coded default CSP string and defaulting the policy value to an empty string, so deployments can more easily provide their own CSP via environment variables/config overrides.
Changes:
- Replaced the default
web.csp.policyvalue from a restrictive CSP string to an empty string (""). - Added the previous CSP value as an inline comment for reference.
| # default-src 'self'; base-uri 'self'; script-src 'self' 'nonce-__CSP_NONCE__' https://www.googletagmanager.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com data:; img-src * 'self' blob: data:; media-src * 'self' blob:; worker-src 'self' blob:; frame-src 'self' https://www.youtube.com; object-src 'none'; connect-src 'self'; | ||
| policy: ${WEB_CONF_XSS_CSP_POLICY:-""} |
There was a problem hiding this comment.
The PR title indicates this is a CI/YAML-validation fix, but the actual change modifies the default CSP behavior. Please align the PR title/description with the change (or explain how this change addresses the CI failure) so reviewers understand the motivation and potential security impact.
| enabled: ${WEB_CONF_XSS_CSP_ENABLED:-false} | ||
| policy: ${WEB_CONF_XSS_CSP_POLICY:-"default-src 'self'; base-uri 'self'; script-src 'self' 'nonce-__CSP_NONCE__' https://www.googletagmanager.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com data:; img-src * 'self' blob: data:; media-src * 'self' blob:; worker-src 'self' blob:; frame-src 'self' https://www.youtube.com; object-src 'none'; connect-src 'self';"} | ||
| # default-src 'self'; base-uri 'self'; script-src 'self' 'nonce-__CSP_NONCE__' https://www.googletagmanager.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com data:; img-src * 'self' blob: data:; media-src * 'self' blob:; worker-src 'self' blob:; frame-src 'self' https://www.youtube.com; object-src 'none'; connect-src 'self'; | ||
| policy: ${WEB_CONF_XSS_CSP_POLICY:-""} |
There was a problem hiding this comment.
Changing the default web.csp.policy to an empty string means that if someone sets web.csp.enabled: true but forgets to also set WEB_CONF_XSS_CSP_POLICY, no CSP header will be sent (CspHeaderFactory omits empty policies). If the intent is to keep a secure-by-default behavior when CSP is enabled, consider keeping a minimal default policy (e.g., default-src 'self') and documenting how to override it, or add configuration validation to fail fast when enabled is true but policy is empty.
| policy: ${WEB_CONF_XSS_CSP_POLICY:-""} | |
| # Use a minimal secure default when CSP is enabled and no explicit policy is provided. | |
| policy: ${WEB_CONF_XSS_CSP_POLICY:-"default-src 'self'"} |
🟡 Playwright Results — all passed (32 flaky)✅ 3624 passed · ❌ 0 failed · 🟡 32 flaky · ⏭️ 84 skipped
🟡 32 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
This pull request updates the Content Security Policy (CSP) configuration in the
openmetadata.yamlfile. The default CSP policy is now set to an empty string, rather than a restrictive default, making it easier for deployments to define their own policies as needed.Configuration changes:
policyfield underweb.cspinopenmetadata.yamlfrom a restrictive policy string to an empty string, allowing for more flexible CSP configuration.Describe your changes:
Fixes
I worked on ... because ...
Type of change:
Checklist:
Fixes <issue-number>: <short explanation>