KOSASIH / SilkRoad

Audit required: Use of pickle module BAN-B301
Security
Major
5 months ago5 months old
Pickle and modules that wrap it can be unsafe when used to deserialize untrusted data, possible security issue.
 77def load_recommendation_model():
 78    """Loads the trained recommendation model."""
 79    # Load the recommendation model from a file
 80    recommendation_model = pickle.load(open("recommendation_model.pkl", "rb")) 81
 82    # Return the loaded recommendation model
 83    return recommendation_model