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

Update SQLIController.cs #1

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Update SQLIController.cs #1

wants to merge 5 commits into from

Conversation

octocolby
Copy link
Owner

No description provided.

SQLiteCommand cmd2 = new SQLiteCommand(conn2);
string whereClause = "where " + string.Join(" OR ", list);

cmd2.CommandText = "select * from Employee " + whereClause;

Check failure

Code scanning / CodeQL

SQL query built from user-controlled sources

Query might include code from [this ASP.NET Core MVC action method parameter](1).
@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability E 1 Vulnerability
Security Hotspot E 1 Security Hotspot
Code Smell A 2 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

SQLiteCommand cmd2 = new SQLiteCommand(conn2);
string whereClause = "where " + string.Join(" OR ", list);

cmd2.CommandText = "select * from Employee " + whereClause;

Check failure

Code scanning / SonarCloud

Database queries should not be vulnerable to injection attacks High

Change this code to not construct SQL queries directly from user-controlled data. See more on SonarCloud
Copy link

sonarqubecloud bot commented Aug 5, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot
E Security Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

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