OTWO-7696 remediate high severity SAST findings in openHub ui codebase - #1924
Open
Niharika1117 wants to merge 4 commits into
Open
OTWO-7696 remediate high severity SAST findings in openHub ui codebase#1924Niharika1117 wants to merge 4 commits into
Niharika1117 wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Remediates high-severity SAST findings across the OpenHub UI by tightening server-side sort parameter handling, reducing unsafe DOM insertion patterns in legacy JavaScript, and hardening container runtime capabilities.
Changes:
- Whitelist allowable sort scopes/methods in multiple controllers to prevent sort-term injection.
- Replace several
.html()DOM sinks with safer alternatives (.text()/$.parseHTML(...)) and adjust AJAX HTML insertion flows. - Drop the
NET_RAWLinux capability from docker-compose services to reduce container privileges.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test/helpers/edits_helper_test.rb | Fixes a datetime formatting assertion to compare against a string year. |
| public/timeline/scripts/sources.js | Alters AJAX description rendering to parse/insert returned HTML. |
| docker-compose.yml | Drops NET_RAW capability for the main service. |
| docker-compose-utility.yml | Drops NET_RAW capability for the utility service. |
| app/controllers/people_controller.rb | Restricts sort method selection to an allowlist. |
| app/controllers/languages_controller.rb | Restricts sort scope selection to an allowlist. |
| app/controllers/concerns/enlistment_filters.rb | Restricts sort scope selection to an allowlist. |
| app/controllers/api_keys_controller.rb | Restricts sort scope selection to an allowlist. |
| app/assets/javascripts/orgs.js | Changes Org claim AJAX replace flow to use parsed HTML. |
| app/assets/javascripts/org_infographic.js | Changes infographic subview updates to use parsed HTML. |
| app/assets/javascripts/ohloh_suggests.js | Adjusts recommendations insertion and uses .text() for counts. |
| app/assets/javascripts/jquery.rest_in_place.js | Uses .text() instead of .html() for inline-edit results. |
| app/assets/javascripts/account_edit.js | Uses .text() instead of .html() for mirrored location output. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.