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

Prevent false positives for SQL keywords #164

Merged
merged 10 commits into from
Apr 17, 2024
Merged

Prevent false positives for SQL keywords #164

merged 10 commits into from
Apr 17, 2024

Conversation

hansott
Copy link
Member

@hansott hansott commented Apr 16, 2024

No description provided.

hansott added 6 commits April 16, 2024 15:34
SELECT * FROM users WHERE id = 1;

if "SELECT" occurs somewhere in the body, query parameters, ... the
    query will be flagged as SQL injection

If the user input is exactly an SQL keyword, we can ignore it.

It's only when keywords are combined with other things...
Copy link

codecov bot commented Apr 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

SQL_STRING_CHARS,
} from "./config";

t.test("SQL_KEYWORDS are valid", async () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is meant by valid here?

This comment was marked as outdated.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the test names 👍

@willem-delbare willem-delbare merged commit 933d2b3 into main Apr 17, 2024
10 checks passed
@willem-delbare willem-delbare deleted the patch-select branch April 17, 2024 08:07
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.

2 participants