[2026 errata] zenodo_release.py interpolates raw HTML and javascript: URLs into the public deposit
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 20/100
Direzione di ricerca
Start in .github/scripts/zenodo_release.py: build_metadata() builds the HTML description and related_identifiers, and collect_files() resolves include paths and writes them with ZipFile. Check linked PR #171 first, since it is already open against this issue. Done means the description is HTML-escaped, only https URLs with a host are accepted, and symlinks or paths outside the repo are refused with an explicit error, with regression tests added.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Affected section
Other
Where does the issue appear?
GitHub source
What is incorrect?
.github/scripts/zenodo_release.py build_metadata() copies CITATION.cff abstract and url into the Zenodo HTML description and into related_identifiers with no escaping and no scheme check.
Reproduction against the script on origin/main:
meta = build_metadata({
"title": "T",
"authors": [{"family-names": "Doe", "given-names": "Ada"}],
"abstract": "Safe text </p><script>alert(1)</script><p>",
"url": "javascript:alert(document.domain)",
"license": "CC-BY-SA-4.0",
}, {"metadata": {}}, "2026", None)
Observed description:
<p>Safe text </p><script>alert(1)</script><p></p><p>Project site: <a href="javascript:alert(document.domain)">javascript:alert(document.domain)</a></p>
related_identifiers contains that javascript: URL.
The same publisher also selects an include path that resolves outside the repository (REPO_ROOT / absolute_path replaces the root on this platform, and Path.is_file() is true). collect_files() then dies with an uncaught ValueError from Path.relative_to instead of a confinement error. A symlink inside an include directory still passes relative_to (the link path is inside the repo) while ZipFile.write stores the link target's bytes. A release checkout with a symlink, or a config include that escapes the repo, can therefore publish non-repository bytes or abort the release without a clear refusal. This is not the token-transport bug in #138 or the UTF-8 / DSGAI07 fix in #152.
Proposed correction
HTML-escape the description, accept only https URLs that have a host, and refuse symlinks and any path that resolves outside the repository. Fail closed with an explicit error. Add regression tests.
Supporting evidence
Local run of build_metadata() on the origin/main script, quoted above. Zenodo deposit descriptions are HTML: https://developers.zenodo.org/
Acknowledgments
- I checked the published release and the canonical GitHub source for an existing correction.
- I agree to follow the OWASP Code of Conduct.
- Lingua principale
- JavaScript
- Stelle
- 177
- Fork
- 57
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di GenAI-Security-Project/GenAI-LLM-Top10
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
GenAI-Security-Project/GenAI-LLM-Top10#176 · 1 commento · 1 reazione ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 66/100
GenAI-Security-Project/GenAI-LLM-Top10#131 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 28/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
-
[Release feedback] Make Zenodo source bundles reproducible across checkoutsForse già presa @drk-ram l’ha presa 20 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 32/100
Tutte le issue di GenAI-Security-Project/GenAI-LLM-Top10
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
test(ci): flake in external-api-stream-auth.test.js waitForRun abort test (hardcoded 20ms sleep)Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
Fei2411/DeepSeek-Bot#2978 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
Stars-and-Stripes-Honor-Flight/sshf-ui#352 ·
I maintainer di solito rispondono entro 1 giorno
-
[NEW TOOL] Clipping AIAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ArshdeepGrover/ai-tools-manager#284 ·
I maintainer di solito rispondono entro 6 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
career-ops-hq/career-ops#8333 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno