Skip to content

rerecord

9dcf565
Select commit
Loading
Failed to load commit list.
Merged

Finding Groups: Respect minimum severity and active/verified rules when pushing to JIRA #12475

rerecord
9dcf565
Select commit
Loading
Failed to load commit list.
DryRunSecurity / Mass Assignment succeeded Jun 22, 2025 in 1s

DryRun Security

Details

Mass Assignment Analyzer Findings: 1 detected

⚠️ Potential Mass Assignment Vulnerability unittests/dojo_test_case.py (click for details)
Type Potential Mass Assignment Vulnerability
Description The code is potentially vulnerable to Mass Assignment because it uses objects.update(**{field: value}) which allows setting multiple attributes dynamically without explicit validation
Filename unittests/dojo_test_case.py
CodeLink
return decorator
def with_system_setting(field, value):
"""Decorator to temporarily set a value in System Settings."""
def decorator(test_func):
@wraps(test_func)
def wrapper(*args, **kwargs):
old_value = getattr(System_Settings.objects.get(), field)
# Set the flag to the specified value
System_Settings.objects.update(**{field: value})
try:
return test_func(*args, **kwargs)
finally:
# Reset the flag to its original state after the test
System_Settings.objects.update(**{field: old_value})
return wrapper
return decorator
class DojoTestUtilsMixin:
def get_test_admin(self, *args, **kwargs):