You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
qml_app/models.py (save/load, lines ~118, ~124): hyperparameters are stored
with raw pickle.dumps/pickle.loads. If this .pkl file is ever shared or
downloaded from an untrusted source, pickle.loads can execute arbitrary code.
Suggest switching to json for this simple hyperparameter dict.
qml_app/main.py (line 132): torch.load(...) doesn't pass weights_only=True
explicitly. This is safe by default on torch>=2.6 (this repo pins torch==2.9.0),
but being explicit protects against future default changes.
README.md lists Qiskit as part of the tech stack (badge + description), but
there is no import qiskit anywhere in the codebase, and qiskit is not in
requirements.txt. Either add the dependency/usage or update the README.
5 .DS_Store files are committed to the repo (.DS_Store, artifacts/.DS_Store,
artifacts/kernel/.DS_Store, artifacts/vqc/.DS_Store, qml_app/.DS_Store).
Suggest git rm --cached them and add .DS_Store to .gitignore.
.gitignore excludes artifacts/, but artifacts/convert.py, artifacts/script.py,
artifacts/vqc/convert_pt_to_json.py, and the .DS_Store files under artifacts/
are already tracked (added before the ignore rule existed). This is confusing
for contributors — worth clarifying intent (untrack them, or move the helper
scripts outside artifacts/).
Labels: security, chore, documentation
Items
qml_app/models.py (save/load, lines ~118, ~124): hyperparameters are stored
with raw
pickle.dumps/pickle.loads. If this .pkl file is ever shared ordownloaded from an untrusted source, pickle.loads can execute arbitrary code.
Suggest switching to
jsonfor this simple hyperparameter dict.qml_app/main.py (line 132):
torch.load(...)doesn't passweights_only=Trueexplicitly. This is safe by default on torch>=2.6 (this repo pins torch==2.9.0),
but being explicit protects against future default changes.
README.md lists Qiskit as part of the tech stack (badge + description), but
there is no
import qiskitanywhere in the codebase, and qiskit is not inrequirements.txt. Either add the dependency/usage or update the README.
5
.DS_Storefiles are committed to the repo (.DS_Store, artifacts/.DS_Store,artifacts/kernel/.DS_Store, artifacts/vqc/.DS_Store, qml_app/.DS_Store).
Suggest
git rm --cachedthem and add.DS_Storeto .gitignore..gitignore excludes
artifacts/, but artifacts/convert.py, artifacts/script.py,artifacts/vqc/convert_pt_to_json.py, and the .DS_Store files under artifacts/
are already tracked (added before the ignore rule existed). This is confusing
for contributors — worth clarifying intent (untrack them, or move the helper
scripts outside artifacts/).
No automated tests exist in the repo. Even small unit tests around
_align_with_qubits(data.py) and the kernel circuit output shape would havecaught issue [Bug] Best-checkpoint saved during VQC training is not actually the best epoch's weights #2 above much earlier.
Severity
Low-to-medium - none of these block correctness, but #1 is worth prioritizing
if model files are ever distributed publicly.