Skip to content

[BUG/DATA-INTEGRITY] record_keeper.py's "is_malware" SQLite column is always False -- real key is "is_ml_threat" #366

Closed

Description

@squid-protocol

🛑 Problem Statement

Found by the dead key auditor (#325). gitgalaxy/recorders/record_keeper.py:477:

is_malware = 1 if file_data.get("is_malware", False) else 0

No producer anywhere writes file_data["is_malware"]. The actual ML threat classifier, gitgalaxy/security/security_auditor.py:187,191, writes:

artifact["is_ml_threat"] = True   # or False

A near-miss rename. The is_malware INTEGER column in the SQLite export is always 0, regardless of what the ML classifier actually determined.

Related: #366/#367/#368 (has_credentials, binary_anomaly, glassworm_flag -- the same table's other security flag columns, filed separately since each has a distinct/unclear root cause).

🎯 Objective

The SQLite is_malware column should reflect the real ML threat classification.

🛠️ Proposed Implementation

Rename file_data.get("is_malware", False) to file_data.get("is_ml_threat", False) in record_keeper.py, or thread is_ml_threat into a file_data["is_malware"] alias earlier in the pipeline if is_malware is meant to be a distinct, broader concept.

✅ Acceptance Criteria

  • A file the ML classifier flags as a threat produces is_malware = 1 in the SQLite output, proven by a real test.

Activity

  1. added
    bug
    data-integrity
    schema
    priority: high
    on Jul 24, 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

    bugdata-integritypriority: highschema

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions