Open
Conversation
- genes/panel_app.py: URL-encode gene symbol before appending to PanelApp outbound URL to prevent path/query manipulation - genes/panel_app.py: Log internal PanelApp URL server-side on 404 rather than returning it in the error response - genes/views/views_rest.py: Log gene list import errors server-side only; return a generic message to the client instead of a full traceback - genes/views/views_rest.py: Cache PanelAppGeneListView responses for 1 hour to reduce repeated outbound proxy requests - genes/templates/genes/hotspot_graph.html: Replace eval() with window[] function dispatch to eliminate the eval code path in hotspot graph clicks
f3ce003 to
b4bea9d
Compare
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.
Fixes security findings from SACGF/variantgrid_private#3826 (private issue — low/medium severity, no immediately exploitable vulnerabilities).
Changes
genes/panel_app.py— URL-encode gene symbol before appending to outbound PanelApp API URL (urllib.parse.quote) to prevent path/query manipulation in the external requestgenes/panel_app.py— On PanelApp 404, log the internal request URL server-side only; remove it from the user-facing error response to avoid leaking configured server URLsgenes/views/views_rest.py— InCreateGeneListView, log gene list import errors server-side (log.exception) and return a generic message to the client instead of a full Python traceback (which could expose server filesystem paths)genes/views/views_rest.py— Add 1-hourcache_pagetoPanelAppGeneListViewto throttle repeated outbound proxy requestsgenes/templates/genes/hotspot_graph.html— Replaceeval()in hotspot graph click handler withwindow[fn]function dispatch (defence-in-depth against DOM-based XSS)Exploitability notes
None of these findings are immediately exploitable by an authenticated attacker:
eval()uses a hardcoded function name set in trusted server-side templatesAll changes are safe to include in a public PR.