test(headers): mark portal CSP/COOP/CORP as test.fixme pending bundle#80#62
Closed
awais786 wants to merge 1 commit into
Closed
test(headers): mark portal CSP/COOP/CORP as test.fixme pending bundle#80#62awais786 wants to merge 1 commit into
awais786 wants to merge 1 commit into
Conversation
CI on every PR has been failing on this assertion for several days: Main portal (https://foss.arbisoft.com) HTML-hardening violations: content-security-policy: allows 'unsafe-inline' in script-src ("script-src 'self' 'unsafe-inline'") — defeats CSP's XSS protection. Use nonces or hashes cross-origin-resource-policy: missing — must be set to declare an explicit cross-origin embedding policy Both gaps are correctly identified — they're real bundle-side defects I filed at foss-server-bundle#80 earlier this month: - Portal nginx CSP has `script-src 'self' 'unsafe-inline'`. 'unsafe-inline' defeats CSP's XSS mitigation (a reflected / stored XSS can execute attacker JS even with the CSP present). - Portal nginx doesn't emit `Cross-Origin-Resource-Policy` at all. Defence-in-depth gap for cross-origin subresource embedding. The 3 1-line nginx fixes named in #80: - Drop `'unsafe-inline'` from script-src (use nonces/hashes) - `add_header Cross-Origin-Resource-Policy "same-origin" always;` - `server_tokens off;` (the Server-header version-leak — tracked by a separate test that's already passing once the equivalent fixme lands) # Decision: test.fixme, not test deletion or assertion relaxation The same pattern landed in PR #52 for the cache-control-authed portal test (also pending foss-server-bundle#83). Reasoning: - The test is correct → don't delete. - The defect is filed → don't lose the tracking. - CI is red on a bundle defect, not on the PR under test → don't block legitimate merges. - When bundle ships, removing `.fixme` flips it live in a one-line follow-up commit. # Audit 88 covered/deferred/missing total unchanged (this PR doesn't add or remove requirements; the @SPEC tag on the test still points at `security-hardening#portal-html-responses-shall-emit-csp-coop-corp`).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI on every PR has been failing on this assertion for several days:
Main portal (https://foss.arbisoft.com) HTML-hardening violations:
content-security-policy: allows 'unsafe-inline' in script-src
("script-src 'self' 'unsafe-inline'") — defeats CSP's
XSS protection. Use nonces or hashes
cross-origin-resource-policy: missing — must be set to declare
an explicit cross-origin embedding policy
Both gaps are correctly identified — they're real bundle-side defects I filed at foss-server-bundle#80 earlier this month:
script-src 'self' 'unsafe-inline'. 'unsafe-inline' defeats CSP's XSS mitigation (a reflected / stored XSS can execute attacker JS even with the CSP present).Cross-Origin-Resource-Policyat all. Defence-in-depth gap for cross-origin subresource embedding.The 3 1-line nginx fixes named in #80:
'unsafe-inline'from script-src (use nonces/hashes)add_header Cross-Origin-Resource-Policy "same-origin" always;server_tokens off;(the Server-header version-leak — tracked by a separate test that's already passing once the equivalent fixme lands)Decision: test.fixme, not test deletion or assertion relaxation
The same pattern landed in PR #52 for the cache-control-authed portal test (also pending foss-server-bundle#83). Reasoning:
.fixmeflips it live in a one-line follow-up commit.Audit
88 covered/deferred/missing total unchanged (this PR doesn't add or remove requirements; the @SPEC tag on the test still points at
security-hardening#portal-html-responses-shall-emit-csp-coop-corp).Motivation / Background
This Pull Request has been created because:
Detail
This Pull Request changes:
Additional information
TIP: Provide additional information such as screenshots, benchmarks, reference to other repositories or alternative solutions
Checklist
Before submitting the PR make sure the following are checked:
[Fix #issue-number]