Repository navigation
Enforce web CSP, patch runtime packages and rescan security risks - #597
Merged
Merged
Conversation
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.
The deployed web shell enforced only
frame-ancestors; its fuller CSP was report-only. The runtime's digest-pinned Alpine base also retained zlib and musl packages with available fixes. This change enforces CSP with hashes of the exported inline scripts, permits only the configured exact S3 upload origin, adds browser isolation/permissions headers, hides nginx versions and upgrades runtime packages while retaining the base and ffmpeg pins.References #458. This is post-baseline work from 1 November 2026, based on dev
2390589. It overlaps #569 only in the minimal runtimeapk upgradestep; package manifests are unchanged (#593).Validation:
test:fast(133 root, 985 server and 1,674 frontend passed), deployment fixtures, slow/PWA/browser tests, accessibility, frontend/server coverage, format, lint, typecheck, architecture, Python security-policy fixtures and Terraform format passed. New tests check exact inline-script hashes, startup S3-origin/header-injection validation and Terraform policy/logging boundaries. Docker startup negative cases passed.The CSP app journey passed developer registration/sign-in, group creation, chat SSE and photo-file upload with zero CSP violations, then failed to navigate to video. A separate focused check passed real H264/AAC playback from self/blob URLs, manifest loading and activation of the actual exported service worker, also with zero CSP violations. This does not claim a complete private-media/S3/Cognito/device/push journey.
Authenticated local ZAP sent active API attacks but failed to finish/export after two attempts (disk exhaustion, then scanner connection reset). Owner/outsider probes denied group, members, contributions, chat and Archive access; invalid media-token tests do not prove valid-capability authorisation. The optional nginx gateway fixture also hit startup/readiness failures after two attempts. These are recorded gaps, not clean scans. No hosted active scan or new scanner/workflow was added. The default-branch code-scanning export had zero open alerts; branch-specific exports were used after CI reported an alert. Standalone CodeQL was skipped because the CLI download alone was ~984 MB. Existing PR CI did run security-extended (CodeQL 2.27.3): it flagged a High HTML-regex edge case in the new script-hash extractor. The extractor hashes trusted build output rather than sanitising user HTML, so this was not a demonstrated product XSS path; the malformed closing-tag case was fixed with a regression. Final JS/TS, Python and Actions analyses have zero results, and intermediate/final SARIF is retained. The final web rebuild returned the same image ID, so local scan/browser evidence remains bound to identical exported bytes.
Raw commands, versions, timestamps and reports are in the report-final rescan evidence bundle;
research/rescan/triage.md,before-after.mdandloop-log.mdcontain the qualified comparison and limitations. Leave merging and hosted AFTER to the owner/orchestrator.Final head
04a643d2d789811ec026e78508fae31aba445dde: aggregate Quality run, CodeQL, release-security and secret-scan checks are green. CI web/browser checks are skipped by the existing dev-PR policy; local browser limits remain as described. Automated security review COMMENTED on the now-fixed intermediate alert. No human approval or merge is claimed.