added security headers inside production/proxy-nginx.conf to avoid cl…#31
Closed
atharv2-git wants to merge 1 commit intodoubtfire-lms:9.xfrom
Closed
added security headers inside production/proxy-nginx.conf to avoid cl…#31atharv2-git wants to merge 1 commit intodoubtfire-lms:9.xfrom
atharv2-git wants to merge 1 commit intodoubtfire-lms:9.xfrom
Conversation
…ickjacking and xss attacks
4 tasks
This was referenced Jun 20, 2025
Member
|
This change on its own won't be compatible with the new LTI features, as we need OnTrack to be embedded in sites like Moodle, which is done using an iframe. We could potentially whitelist permitted domains using this... add_header Content-Security-Policy "default-src 'self'; frame-ancestors 'self' https://moodle.example.edu;" always; |
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.
Base Branch: 9.x
Note: This PR is made to
doubtfire-lms/doubtfire-deployas an upstream contribution after peer review, AppAttack security verification, and mentor approval.Description
This PR adds security headers to the production reverse proxy configuration (
proxy-nginx.conf) to mitigate Clickjacking and potential XSS vulnerabilities across all Doubtfire services.doubtfire-web.The corresponding inner doubtfire-web service PR is available at:
🔗 doubtfire-lms/doubtfire-web#946
Headers Added
X-Frame-Options: DENYContent-Security-Policy: default-src 'self', and frame-ancestors 'none'Both headers prevent the application from being embedded in
<iframe>tags, effectively blocking clickjacking attempts.What was changed
production/shared-files/proxy-nginx.confFixes: Clickjacking vulnerability reported by AppAttack using
<iframe>injection methods.Reference PRs
Testing Summary
X-Frame-Options: DENYContent-Security-Policy: default-src 'self', and frame-ancestors 'none'Checklist
proxy-nginx.conf(no unrelated changes)9.xbranch