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 code scanning alert no. 10: Database query built from user-controlled sources #587

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

adubovikov
Copy link
Member

Fixes https://github.com/sipcapture/homer-app/security/code-scanning/10

To fix the problem, we should ensure that user-provided data is safely embedded into the SQL query using parameterized queries or prepared statements. This can be achieved by modifying the Where clause to use placeholders and passing the user-provided values as parameters. This approach prevents SQL injection by ensuring that the user input is treated as data rather than executable code.

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

…lled sources

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@adubovikov adubovikov marked this pull request as ready for review January 7, 2025 11:43
@adubovikov adubovikov merged commit 3103633 into master Jan 7, 2025
4 of 5 checks passed
@adubovikov adubovikov deleted the alert-autofix-10 branch January 7, 2025 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant