fix(security): close open scanner alerts

Dependabot/CodeQL #33 — postcss XSS GHSA-qx2v-qp2m-jg93:
  npm audit fix in graph-ui (8.5.8 -> 8.5.14, above the <8.5.10 vuln range)

CodeQL #39 — TOCTOU race in artifact.c ensure_gitattributes():
  Replace stat() + fopen() with open(O_WRONLY|O_CREAT|O_EXCL).
  Atomic create-only-if-absent closes the check-vs-write window.
  Falls through to merge driver setup if file already exists.

CodeQL #55 — pip install not pinned in release.yml:
  Pin build==1.3.0 and twine==6.2.0. Comment explains why
  --require-hashes is not used (transitive-deps overhead).

Dismissed (won't-fix):
  - #56 contents: write — required for 'gh release edit --draft=false';
    no narrower permission exists.
  - #54-51 Crystal grammar warnings — vendored upstream code.
  - #50-40 Agda grammar warnings — vendored upstream code.
This commit is contained in:
Martin Vogel
2026-05-05 00:51:52 +02:00
parent 562c3d995a
commit 4fdcdd4239
3 changed files with 30 additions and 16 deletions
+4 -1
View File
@@ -289,7 +289,10 @@ jobs:
- name: Build PyPI distribution
working-directory: pkg/pypi
run: |
python -m pip install --upgrade build twine
# Pin to specific versions (typosquatting / supply-chain mitigation).
# OSSF scorecard prefers --require-hashes, but that needs full
# transitive deps; version pinning is the practical compromise.
python -m pip install --upgrade 'build==1.3.0' 'twine==6.2.0'
python -m build
- name: Publish to PyPI