Skip to content
Closed
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

Suggestion: This variable name is excessively long and hinders readability. Use a concise, descriptive name.

Suggested change
private val testvar123455VariableMVariableMaxLengthVariableMaxLengthaxLengthVariableMaxLengthVariableMaxLengthVariableMaxLengthVariableMaxLengthVariableMaxLengthVariableMaxLengthVariableMaxLengthVariableMaxLengthVariableMaxLengthVariableMaxLength: Long = 0
private val testValue: Long = 0

}

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

The 'TowerOfHanoi' method is missing the 'self' parameter, which will cause a 'TypeError' when called. Additionally, recursive calls will fail because the function is defined within the class scope, not the global namespace. This logic currently has 0% test coverage.

Suggestion: Move 'TowerOfHanoi' outside of the 'Person' class to the module level and remove 'self', or add 'self' and update recursive calls to 'self.TowerOfHanoi'.

See Coverage in Codacy
See Complexity 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

The 'fibonacci_of' method lacks the 'self' parameter and recursive calls will fail as it is not in the global namespace. Move this function outside of the 'Person' class to the module level to use it as a utility function.

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.
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)
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)
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)
Loading