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
scripts/citation.py (setting and checking the release in CITATION.cff) has a few weak spots, found by Sourcery in the copy of proTES (elixir-cloud-aai/protes#244) and shared by this repository's copy:
set writes through a fixed temporary file (.CITATION.cff.tmp) next to the file. A file or symbolic link planted under that name is written to, concurrent runs share it, and the new file gets the default permissions instead of those of the old one.
check does not check that the version is a release version (X.Y.Z, X.Y.ZaN, X.Y.ZbN, X.Y.ZrcN) if the file has the same, invalid one.
set --date accepts dates after today (UTC), which check then rejects.
The docstrings do not describe these limits.
Port the fix of proTES, with tests, so that the copies stay consistent:
Write through a temporary file with a new, unpredictable name (tempfile.mkstemp) in the same directory, keeping the file's permissions.
Check the version in check, also if the file has the same one.
Activity
uniqueg commentedon Oct 23, 2026
Done in #431.