fix(security): harden audit remediations#213
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
58fdaa3 to
413da47
Compare
Deploying markdownviewer with
|
| Latest commit: |
413da47
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://aa018b09.markdownviewer.pages.dev |
| Branch Preview URL: | https://codex-security-remediation-h.markdownviewer.pages.dev |
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.
Summary
This PR remediates the security audit findings for Markdown Viewer while preserving the existing web, sharing, renderer, export, and desktop workflows.
Changes include:
_headersand_redirectsfor HTTP security headers, CSP, clickjacking protection, and sensitive-path 404s.base-uri,form-action,object-src,script-src-attr,frame-ancestors, exact Live Share WebSocket origin, and inline script hashes where needed.os.execCommandexposure and gate local desktop diagram commands behind explicit advanced opt-in logic.Why
The previous audit score was 74/100. The largest remaining risks were deployment headers, desktop native API exposure, Live Share authorization, WebSocket Origin validation, Snapshot bearer-link privacy, STL validation, exported HTML hardening, and supply-chain integrity. This PR addresses or mitigates each reported item without intentionally removing supported features.
Validation
Performed locally:
node --check script.jsnode --check preview-worker.jsnode --check workers/live-room-worker.jsnode --check functions/api/share/[[id]].jsnode --check functions/live-room/[[room]].jsy-updateis rejected, bad Origin is rejected.npm run buildpassed indesktop-appwith the hardened Neutralino config and synced resources.Notes
No local or remote
CONTRIBUTING.md,contributing.md,CONTRIBUTION.md,contribution.md, or PR template file was present when preparing this PR, so this uses the standard summary/why/validation format.