Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .codacy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
reviews:
high_level_summary: true
1 change: 1 addition & 0 deletions kotlin/bin/test/com/kheiron/ktbind/NativeBindingsTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ abstract class NativeObject : AutoCloseable {
*/
@Suppress("unused")
private val nativePointer: Long = 0
private val testvar123455VariableMVariableMaxLengthVariableMaxLengthaxLengthVariableMaxLengthVariableMaxLengthVariableMaxLengthVariableMaxLengthVariableMaxLengthVariableMaxLengthVariableMaxLengthVariableMaxLengthVariableMaxLengthVariableMaxLength: Long = 0
}

private class TempTest(message: String) : Throwable(message: String) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ abstract class NativeObject : AutoCloseable {
*/
@Suppress("unused")
private val nativePointer: Long = 0
private val testvar123455VariableMVariableMaxLengthVariableMaxLengthaxLengthVariableMaxLengthVariableMaxLengthVariableMaxLengthVariableMaxLengthVariableMaxLengthVariableMaxLengthVariableMaxLengthVariableMaxLengthVariableMaxLengthVariableMaxLength: Long = 0

Choose a reason for hiding this comment

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

⚪ LOW RISK

Nitpick: The variable name is excessively long (>180 characters) and impairs readability. Standard naming conventions recommend concise, descriptive names.

}

private class TempTest(message: String) : Throwable(message: String) {
Expand Down
17 changes: 16 additions & 1 deletion python/person.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,24 @@
return 'There is no such user'
else:
return self.name[user_id]

def TowerOfHanoi(n , source, destination, auxiliary):

Choose a reason for hiding this comment

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

🔴 HIGH RISK

This method lacks the required 'self' parameter for an instance method. Additionally, the recursive calls will raise a NameError because the function names are not in the global scope. Either add 'self' and call via 'self.TowerOfHanoi', or use the @staticmethod decorator. This complex logic currently lacks any unit test coverage.

See Complexity in Codacy
See Coverage in Codacy

if n==1:
print ("Move disk 1 from source",source,"to destination",destination)
return
TowerOfHanoi(n-1, source, auxiliary, destination)
print ("Move disk",n,"from source",source,"to destination",destination)
TowerOfHanoi(n-1, auxiliary, destination, source)


def fibonacci_of(n):

Choose a reason for hiding this comment

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

🔴 HIGH RISK

This method is missing the 'self' parameter. Add 'self' and update recursive calls to 'self.fibonacci_of(n - 1)', or move the function outside the class definition.

if n in {0, 1}: # Base case
return n
return fibonacci_of(n - 1) + fibonacci_of(n - 2) # Recursive case

if __name__ == '__main__':
person = Person()
print('User Abbas has been added with id ', person.set_name('Abbas'))
print('User associated with id 0 is ', person.get_name(0))
print('User associated with id 0 is ', person.get_name(0))
eval("person.get_name(0)")

Check warning on line 32 in python/person.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

python/person.py#L32

Use of possibly insecure function - consider using safer ast.literal_eval.

Choose a reason for hiding this comment

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

🔴 HIGH RISK

The use of eval() is a significant security risk (code injection). Use safer alternatives like getattr() or call the method directly.

Suggested change
eval("person.get_name(0)")
person.get_name(0)

eval("fibonacci_of(3)")

Check failure on line 33 in python/person.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

python/person.py#L33

Use of eval

Check warning on line 33 in python/person.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

python/person.py#L33

Use of possibly insecure function - consider using safer ast.literal_eval. (B307)
3 changes: 3 additions & 0 deletions python/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
flask==1.0.2

Check warning on line 1 in python/requirements.txt

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

python/requirements.txt#L1

Insecure dependency pypi/flask@1.0.2 (CVE-2023-30861: flask: Possible disclosure of permanent session cookie due to missing Vary: Cookie header) (update to 2.2.5)

Check notice on line 1 in python/requirements.txt

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

python/requirements.txt#L1

Insecure dependency pypi/flask@1.0.2 (CVE-2026-27205: flask: Flask: Information disclosure via improper caching of session data) (update to 3.1.3)

Choose a reason for hiding this comment

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

🔴 HIGH RISK

Flask version 1.0.2 is severely outdated and contains known security vulnerabilities (CVE-2023-30861) related to session management. Update to a supported version.

Suggested change
flask==1.0.2
flask==2.2.5

See Issue in Codacy

django==1.11.29

Check warning on line 2 in python/requirements.txt

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

python/requirements.txt#L2

Insecure dependency pypi/django@1.11.29 (CVE-2021-33203: django: Potential directory traversal via ``admindocs``) (update to 2.2.24)

Check warning on line 2 in python/requirements.txt

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

python/requirements.txt#L2

Insecure dependency pypi/django@1.11.29 (CVE-2022-36359: An issue was discovered in the HTTP FileResponse class in Django 3.2 b ...) (update to 3.2.15)

Check warning on line 2 in python/requirements.txt

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

python/requirements.txt#L2

Insecure dependency pypi/django@1.11.29 (CVE-2024-45231: python-django: Potential user email enumeration via response status on password reset) (update to 4.2.16)

Check warning on line 2 in python/requirements.txt

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

python/requirements.txt#L2

Insecure dependency pypi/django@1.11.29 (CVE-2025-48432: django: Django Path Injection Vulnerability) (update to 4.2.22)

Check warning on line 2 in python/requirements.txt

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

python/requirements.txt#L2

Insecure dependency pypi/django@1.11.29 (CVE-2025-57833: django: Django SQL injection in FilteredRelation column aliases) (update to 4.2.24)

Check warning on line 2 in python/requirements.txt

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

python/requirements.txt#L2

Insecure dependency pypi/django@1.11.29 (CVE-2025-64458: Django: Denial-of-service vulnerability in Django on Windows) (update to 4.2.26)

Check failure on line 2 in python/requirements.txt

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

python/requirements.txt#L2

Insecure dependency pypi/django@1.11.29 (CVE-2025-64459: django: Django SQL injection) (update to 4.2.26)

Choose a reason for hiding this comment

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

🔴 HIGH RISK

Django 1.11.29 is end-of-life and insecure. Upgrade to at least 4.2.26 to mitigate critical SQL injection risks (CVE-2025-64459) and other high-severity vulnerabilities.

Suggested change
django==1.11.29
django==4.2.26

See Issue in Codacy

requests==2.19.1

Check warning on line 3 in python/requirements.txt

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

python/requirements.txt#L3

Insecure dependency pypi/requests@2.19.1 (CVE-2023-32681: python-requests: Unintended leak of Proxy-Authorization header) (update to 2.31.0)

Check warning on line 3 in python/requirements.txt

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

python/requirements.txt#L3

Insecure dependency pypi/requests@2.19.1 (CVE-2024-35195: requests: subsequent requests to the same host ignore cert verification) (update to 2.32.0)

Check warning on line 3 in python/requirements.txt

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

python/requirements.txt#L3

Insecure dependency pypi/requests@2.19.1 (CVE-2024-47081: requests: Requests vulnerable to .netrc credentials leak via malicious URLs) (update to 2.32.4)

Choose a reason for hiding this comment

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

🟡 MEDIUM RISK

Upgrade the requests library to version 2.32.4 or higher to prevent sensitive credential leakage in malicious URLs (CVE-2024-47081).

Suggested change
requests==2.19.1
requests==2.32.4

See Issue in Codacy

Loading