Skip to content

Remove logic_bomb and algorithmic_dos metrics #1015

Closed

Description

@squid-protocol

Remove logic_bomb and algorithmic_dos metrics

Description

The logic_bomb and algorithmic_dos metrics in the GitGalaxy SAST engine (gitgalaxy/metrics/signal_processor.py) generate systematic false positives by criminalizing standard programming patterns. We need to completely remove these metrics from the schema and calculation pipeline.

Why they are broken

1. logic_bomb

This metric calculates a "sabotage mass" by multiplying branching logic (e.g., if statements) by defensive payloads (panics_and_aborts and cleanup). This means that completely safe, defensive functions that validate input and raise an Exception on failure are mathematically scored as a Logic Bomb.

Furthermore, detecting a true logic bomb requires an Abstract Syntax Tree (AST) to directly link a conditional trigger to a specific malicious payload. Because the AST-less engine only tracks keyword counts per file, it blindly flags legitimate scripts (like Log Rotators or Garbage Collectors) simply because they happen to contain both time-based logic and file-deletion logic somewhere in the same file.

2. algorithmic_dos

This metric relies heavily on the big_o_depth structural heuristic, which derives algorithmic time complexity purely from whitespace indentation. Because it combines this flawed metric with standard io and api signals, any deeply indented server configuration or web server loop (like runserver.py) is misclassified as an intentional Algorithmic Denial of Service attack.

Action Items

  • Remove _calc_logic_bomb and _calc_algorithmic_dos logic from gitgalaxy/metrics/signal_processor.py.
  • Remove logic_bomb and algorithmic_dos from the RISK_SCHEMA array in analysis_lens.py and other schema mappings.
  • Clean up any downstream references in the reporting tools or AI threat auditors.

Activity

  1. added 2 commits that reference this issue on Aug 4, 2026
    0ed2903
    92f1eaf
  2. added
    scope:frontier
    on Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope:frontier

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions