While reviewing the codebase for my GSoC 2026 Module B proposal, I found a crash bug and several code quality issues:
🔴 Crash Bug — get_by_tags() in db.py (line 984-1001): The loop variable node is shadowed by the return value of self.get_nodes(). When get_nodes() returns [] (empty list), the error handler tries to access node.name on the empty list, causing AttributeError. Fix: use a separate variable name for the query result.
Code quality fixes:
Unreachable return None after raise ValueError in add_node() (db.py:1585)
Duplicate import from application.utils import oscal_utils, redis in web_main.py (lines 15 and 20)
Misspelled variable pentalty in gap_analysis.py (lines 44-46)
Misspelled variable pending_stadards in cre_main.py (line 280)
I'll submit a PR with separate commits for each fix. All existing tests pass after changes.
While reviewing the codebase for my GSoC 2026 Module B proposal, I found a crash bug and several code quality issues:
🔴 Crash Bug — get_by_tags() in db.py (line 984-1001): The loop variable node is shadowed by the return value of self.get_nodes(). When get_nodes() returns [] (empty list), the error handler tries to access node.name on the empty list, causing AttributeError. Fix: use a separate variable name for the query result.
Code quality fixes:
Unreachable return None after raise ValueError in add_node() (db.py:1585)
Duplicate import from application.utils import oscal_utils, redis in web_main.py (lines 15 and 20)
Misspelled variable pentalty in gap_analysis.py (lines 44-46)
Misspelled variable pending_stadards in cre_main.py (line 280)
I'll submit a PR with separate commits for each fix. All existing tests pass after changes.