fix(routers+imports): fix missing DetectionRule import and correct -> list return type annotations that actually return paginated dicts
Aegis CI / lint-and-test (push) Has been cancelled
Aegis CI / lint-and-test (push) Has been cancelled
This commit is contained in:
@@ -80,7 +80,7 @@ def list_detection_rules(
|
||||
db: Session = Depends(get_db),
|
||||
# Entry: current_user
|
||||
current_user: User = Depends(get_current_user),
|
||||
) -> list:
|
||||
) -> dict:
|
||||
"""List detection rules with optional filters and pagination."""
|
||||
# Return list_rules(
|
||||
return list_rules(
|
||||
@@ -112,7 +112,7 @@ def get_detection_rules_for_template(
|
||||
db: Session = Depends(get_db),
|
||||
# Entry: current_user
|
||||
current_user: User = Depends(get_current_user),
|
||||
) -> list:
|
||||
) -> dict:
|
||||
"""Get detection rules associated with a test template."""
|
||||
# Return get_rules_for_template(db, template_id)
|
||||
return get_rules_for_template(db, template_id)
|
||||
@@ -151,7 +151,7 @@ def get_detection_rules_for_test(
|
||||
db: Session = Depends(get_db),
|
||||
# Entry: current_user
|
||||
current_user: User = Depends(get_current_user),
|
||||
) -> list:
|
||||
) -> dict:
|
||||
"""Get detection rules relevant to a test, along with their evaluation results.
|
||||
|
||||
Finds rules by matching the test's technique_id to detection rules,
|
||||
|
||||
Reference in New Issue
Block a user