Skip to content

Add awesome new feature #1

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add awesome new feature #1

wants to merge 1 commit into from

Conversation

Marti2203
Copy link

No description provided.

Copy link

Quality Gate Failed Quality Gate failed

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

See analysis details on SonarQube Cloud

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


class ConnectionWrapper:
"""A simple connection wrapper class"""

def __init__(self, db_path):
self.__conn = sqlite3.connect(db_path)

def get_single_pokemon(self, pokemon_id):
statement = f"SELECT * FROM POKEDEX WHERE id = '{pokemon_id}'"
return self.__conn.execute(statement).fetchone()

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 SonarQube Cloud
{% block content %}
<div class="full-page d-flex flex-wrap justify-content-center align-items-center">
<div class="container d-flex flex-column flex-wrap justify-content-start align-items-center text-center py-5 m-auto margin-mobile">
<h1>{{ name }} # {% autoescape false %} {{ pokemon_id }} {% endautoescape %}</h1>

Check failure

Code scanning / SonarCloud

Endpoints should not be vulnerable to reflected cross-site scripting (XSS) attacks High

Change this code to not reflect user-controlled data. See more on SonarQube Cloud
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