Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Database query built from user-controlled sources #896

Merged
merged 5 commits into from
Feb 21, 2025

Conversation

JamieSlome
Copy link
Member

Potential fix for https://github.com/finos/git-proxy/security/code-scanning/83

To fix the problem, we need to ensure that the user-provided id is treated as a literal value in the MongoDB query. This can be achieved by using the $eq operator, which ensures that the value is interpreted as a literal and not as a query object. Additionally, we should validate that the id is a string before using it in the query.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…om user-controlled sources

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Copy link

github-actions bot commented Feb 4, 2025

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Files

Copy link

netlify bot commented Feb 4, 2025

Deploy Preview for endearing-brigadeiros-63f9d0 canceled.

Name Link
🔨 Latest commit 791c5e5
🔍 Latest deploy log https://app.netlify.com/sites/endearing-brigadeiros-63f9d0/deploys/67b853028a017a0008fb7784

@JamieSlome JamieSlome changed the title Potential fix for code scanning alert no. 83: Database query built from user-controlled sources fix: Database query built from user-controlled sources Feb 4, 2025
@JamieSlome JamieSlome marked this pull request as ready for review February 4, 2025 21:57
@github-actions github-actions bot added the fix label Feb 4, 2025
JamieSlome and others added 2 commits February 4, 2025 22:00
…om user-controlled sources

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@JamieSlome JamieSlome enabled auto-merge February 4, 2025 22:21
Copy link

codecov bot commented Feb 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.20%. Comparing base (ed2cdff) to head (791c5e5).
Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #896   +/-   ##
=======================================
  Coverage   63.20%   63.20%           
=======================================
  Files          47       47           
  Lines        1685     1685           
=======================================
  Hits         1065     1065           
  Misses        620      620           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JamieSlome JamieSlome merged commit c0ce6af into main Feb 21, 2025
14 checks passed
@JamieSlome JamieSlome deleted the alert-autofix-83 branch February 21, 2025 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant