-
Notifications
You must be signed in to change notification settings - Fork 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
re add bugs #5
base: master
Are you sure you want to change the base?
re add bugs #5
Conversation
PavelLinearB
commented
May 9, 2023
•
edited
Loading
edited
- used genAi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Jit has detected 1 important finding in this PR that you should review.
The finding is detailed below as a comment.
It’s highly recommended that you fix this security issue before merge.
@@ -210,6 +210,11 @@ | |||
# @authentication_decorator | |||
@csrf_exempt | |||
def mitre_lab_25_api(request): | |||
if request.method == "POST": | |||
expression = request.POST.get('expression') | |||
result = eval(expression) |
Check failure
Code scanning / SonarCloud
Dynamic code execution should not be vulnerable to injection attacks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
review comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
review finished
@@ -21,6 +21,9 @@ COPY requirements.txt requirements.txt | |||
RUN pip install --no-cache-dir -r requirements.txt | |||
|
|||
|
|||
# copy project | |||
COPY . /app/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line comment #1 - review started
@@ -210,6 +210,11 @@ def csrf_transfer_monei_api(request,recipent,amount): | |||
# @authentication_decorator | |||
@csrf_exempt | |||
def mitre_lab_25_api(request): | |||
if request.method == "POST": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line comment 2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Jit has detected 1 important finding in this PR that you should review.
The finding is detailed as a comment.
It’s highly recommended that you fix this security issue before merge.
Until now, you ignored/fixed 1 finding.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Jit has detected 2 important findings in this PR that you should review.
The findings are detailed as separate comments.
It’s highly recommended that you fix these security issues before merge.
Until now, you ignored/fixed 1 finding.
@@ -156,7 +156,8 @@ | |||
print(sql_query) | |||
try: | |||
print("\nin try\n") | |||
val="" | |||
val=login.objects.raw(sql_query) | |||
val=login.objects.raw(sql_query) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Security control: Static Code Analysis Python Semgrep
Type: Gitlab.Bandit.B611
Description: You should be very careful whenever you write raw SQL. Consider using Django ORM before raw SQL. See https://docs.djangoproject.com/en/3.0/topics/db/sql/#passing-parameters-into-raw
Severity: HIGH
Jit Bot commands and options (e.g., ignore issue)
You can trigger Jit actions by commenting on this PR review:
#jit_ignore_fp
Ignore and mark this specific single instance of finding as “False Positive”#jit_ignore_accept
Ignore and mark this specific single instance of finding as “Accept Risk”#jit_undo_ignore
Undo ignore command
val="" | ||
val=login.objects.raw(sql_query) | ||
val=login.objects.raw(sql_query) | ||
val=login.objects.raw(sql_query) |
Check failure
Code scanning / SonarCloud
Database queries should not be vulnerable to injection attacks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Orca Security Scan Summary
Status | Check | Issues by priority |
---|---|---|
Passed | Infrastructure as Code | 0 0 0 0 |
Passed | Vulnerabilities | 0 0 0 0 |
Passed | Secrets | 0 0 0 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Jit has detected 3 important findings in this PR that you should review.
The findings are detailed as separate comments.
It’s highly recommended that you fix these security issues before merge.
Until now, you ignored/fixed 7 findings.
@@ -156,7 +156,9 @@ def sql_lab(request): | |||
print(sql_query) | |||
try: | |||
print("\nin try\n") | |||
val="" | |||
val=login.objects.raw(sql_query) | |||
val=login.objects.raw(sql_query) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Security control: Static Code Analysis Python Semgrep
Type: Gitlab.Bandit.B611
Description: You should be very careful whenever you write raw SQL. Consider using Django ORM before raw SQL. See https://docs.djangoproject.com/en/3.0/topics/db/sql/#passing-parameters-into-raw
Severity: HIGH
Jit Bot commands and options (e.g., ignore issue)
You can trigger Jit actions by commenting on this PR review:
#jit_ignore_fp
Ignore and mark this specific single instance of finding as “False Positive”#jit_ignore_accept
Ignore and mark this specific single instance of finding as “Accept Risk”#jit_undo_ignore
Undo ignore command
val="" | ||
val=login.objects.raw(sql_query) | ||
val=login.objects.raw(sql_query) | ||
val=login.objects.raw(sql_query) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Security control: Static Code Analysis Python Semgrep
Type: Gitlab.Bandit.B611
Description: You should be very careful whenever you write raw SQL. Consider using Django ORM before raw SQL. See https://docs.djangoproject.com/en/3.0/topics/db/sql/#passing-parameters-into-raw
Severity: HIGH
Jit Bot commands and options (e.g., ignore issue)
You can trigger Jit actions by commenting on this PR review:
#jit_ignore_fp
Ignore and mark this specific single instance of finding as “False Positive”#jit_ignore_accept
Ignore and mark this specific single instance of finding as “Accept Risk”#jit_undo_ignore
Undo ignore command
@@ -156,7 +156,9 @@ def sql_lab(request): | |||
print(sql_query) | |||
try: | |||
print("\nin try\n") | |||
val="" | |||
val=login.objects.raw(sql_query) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Security control: Static Code Analysis Python Semgrep
Type: Gitlab.Bandit.B611
Description: You should be very careful whenever you write raw SQL. Consider using Django ORM before raw SQL. See https://docs.djangoproject.com/en/3.0/topics/db/sql/#passing-parameters-into-raw
Severity: HIGH
Jit Bot commands and options (e.g., ignore issue)
You can trigger Jit actions by commenting on this PR review:
#jit_ignore_fp
Ignore and mark this specific single instance of finding as “False Positive”#jit_ignore_accept
Ignore and mark this specific single instance of finding as “Accept Risk”#jit_undo_ignore
Undo ignore command
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Jit has detected 3 important findings in this PR that you should review.
The findings are detailed as separate comments.
It’s highly recommended that you fix these security issues before merge.
Until now, you ignored/fixed 10 findings.
@@ -156,7 +156,9 @@ def sql_lab(request): | |||
print(sql_query) | |||
try: | |||
print("\nin try\n") | |||
val="" | |||
val=login.objects.raw(sql_query) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Security control: Static Code Analysis Python Semgrep
Type: Gitlab.Bandit.B611
Description: You should be very careful whenever you write raw SQL. Consider using Django ORM before raw SQL. See https://docs.djangoproject.com/en/3.0/topics/db/sql/#passing-parameters-into-raw
Severity: HIGH
Jit Bot commands and options (e.g., ignore issue)
You can trigger Jit actions by commenting on this PR review:
#jit_ignore_fp
Ignore and mark this specific single instance of finding as “False Positive”#jit_ignore_accept
Ignore and mark this specific single instance of finding as “Accept Risk”#jit_undo_ignore
Undo ignore command
@@ -156,7 +156,9 @@ | |||
print(sql_query) | |||
try: | |||
print("\nin try\n") | |||
val="" | |||
val=login.objects.raw(sql_query) | |||
val=login.objects.raw(sql_query) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Security control: Static Code Analysis Python Semgrep
Type: Gitlab.Bandit.B611
Description: You should be very careful whenever you write raw SQL. Consider using Django ORM before raw SQL. See https://docs.djangoproject.com/en/3.0/topics/db/sql/#passing-parameters-into-raw
Severity: HIGH
Jit Bot commands and options (e.g., ignore issue)
You can trigger Jit actions by commenting on this PR review:
#jit_ignore_fp
Ignore and mark this specific single instance of finding as “False Positive”#jit_ignore_accept
Ignore and mark this specific single instance of finding as “Accept Risk”#jit_undo_ignore
Undo ignore command
val="" | ||
val=login.objects.raw(sql_query) | ||
val=login.objects.raw(sql_query) | ||
val=login.objects.raw(sql_query) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Security control: Static Code Analysis Python Semgrep
Type: Gitlab.Bandit.B611
Description: You should be very careful whenever you write raw SQL. Consider using Django ORM before raw SQL. See https://docs.djangoproject.com/en/3.0/topics/db/sql/#passing-parameters-into-raw
Severity: HIGH
Jit Bot commands and options (e.g., ignore issue)
You can trigger Jit actions by commenting on this PR review:
#jit_ignore_fp
Ignore and mark this specific single instance of finding as “False Positive”#jit_ignore_accept
Ignore and mark this specific single instance of finding as “Accept Risk”#jit_undo_ignore
Undo ignore command
comments: [{"commenter":"sonarcloud","content":"SonarCloud Quality Gate failed. \n\n 6 Bugs \n 4 Vulnerabilities \n 1 Security Hotspot \n 3 Code Smells\n\n No Coverage information \n 0.0% Duplication\n\n","created_at":"2023-06-06T12:17:52Z","id":1578655379}] |
SonarCloud Quality Gate failed. 6 Bugs No Coverage information |