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

PR that raises vulnerabilities #2

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

Conversation

christophe-havard-sonarsource

No description provided.

@christophe-havard-sonarsource christophe-havard-sonarsource changed the title Create sqlquery.php PR that raises vulnerabilities Feb 22, 2022
@sonarcloud
Copy link

sonarcloud bot commented Mar 31, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

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

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@sonarcloudsquad1
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

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

No Coverage information No Coverage information
0.0% 0.0% Duplication

{
$userId = $request->get('name');
$sql = "SELECT username FROM user WHERE id='$userId'";
$statement = $this->connection->prepare($sql);

Check failure

Code scanning / SonarCloudsquad-1

Database queries should not be vulnerable to injection attacks

<!--SONAR_ISSUE_KEY:AYGqXA5_KW4f87dK4H5--->Change this code to not construct SQL queries directly from user-controlled data.
{
$userId = $request->get('id');
$sql = "SELECT email FROM user WHERE id='$userId'";
$statement = $this->connection->prepare($sql);

Check failure

Code scanning / SonarCloudsquad-1

Database queries should not be vulnerable to injection attacks

<!--SONAR_ISSUE_KEY:AYGqXA5_KW4f87dK4H5_-->Change this code to not construct SQL queries directly from user-controlled data.
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