Fixes go into the latest 2.x release.
Please do not open a public issue. Use GitHub's private reporting: the Security tab of the repository, then Report a vulnerability (https://github.com/EDF-Lab/GEARS/security/advisories/new). Say which version you use, what you did, and what happened. A maintainer will answer there.
GEARS saves a fitted model with joblib, which is pickle: opening such a file can run arbitrary code.
The pre-trained models are different: each is an .npz file of plain arrays, read without pickle.
load_pretrained(model_id)downloads a published model and checks its SHA-256 against the value ingears/pretrained.pybefore opening it, then reads it withnumpy.load(allow_pickle=False). The same check applies when you passpath=. The checksum of each model is also inMODELS.mdand inSHA256SUMSon the release page.EVSessionModel.load(path)andGEARSModel.load(path)open the file you give them without any check. Open only files you saved yourself or got from a source you trust, and compare theirsha256sumwith the published one.import gearsdoes not touch the network or the disk. The only download isload_pretrained, andGEARS_OFFLINE=1forbids it.
GEARS ships no data.