fix: sanitize artifact names to handle special characters in matrix vars
What changed, and why it matters
This commit fixes a GitHub Actions workflow bug where test artifact names contained invalid characters like parentheses and slashes. It replaces those characters with hyphens so artifact uploads succeed. It is a routine CI reliability fix, not a security issue.
No security action required. This is a CI maintenance fix; merge as normal.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change modifies .github/workflows/ci.yaml to sanitize the name parameter passed to actions/upload-artifact@v4. It applies three nested replace() calls to the matrix variable matrix.NAME, converting /, (, and ) to hyphens or removing them. This prevents artifact upload failures caused by invalid filename characters in matrix job names such as ‘Valgrind (01/10)’ and ‘ASan/UBSan (01/12)’.
Changed components
.github/workflows/ci.yamlInspect captured patch +2 / −2
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 7ccc7361..64ac88d7 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -519,7 +519,7 @@ jobs:
if: always()
uses: actions/upload-artifact@v4
with:
- name: pytest-results-integration-valgrind-${{ matrix.NAME }}
+ name: pytest-results-integration-valgrind-${{ replace(replace(replace(matrix.NAME, '/', '-'), '(', '-'), ')', '') }}
path: report.xml
if-no-files-found: ignore
@@ -596,7 +596,7 @@ jobs:
if: always()
uses: actions/upload-artifact@v4
with:
- name: pytest-results-integration-sanitizers-${{ matrix.NAME }}
+ name: pytest-results-integration-sanitizers-${{ replace(replace(replace(matrix.NAME, '/', '-'), '(', '-'), ')', '') }}
path: report.xml
if-no-files-found: ignore
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.