🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
fix(ci): handle invalid security-severity in Snyk SARIF output (#13163)
Tobias Wochingeraa76b348e876
diff --git a/.github/workflows/snyk-web.yml b/.github/workflows/snyk-web.ymlindex 27d2617cf1..8be1ff37b8 100644--- a/.github/workflows/snyk-web.yml+++ b/.github/workflows/snyk-web.yml@@ -32,24 +32,20 @@ jobs:if: always()run: |if [ -f snyk.sarif ]; then- # Fix undefined security severity values in SARIF file+ # Snyk emits invalid security-severity values ("undefined", "null").+ # codeql-action/upload-sarif requires a numeric string.+ # See: https://github.com/github/codeql-action/issues/2187#issuecomment-3708019503sed -i 's/"security-severity": "undefined"/"security-severity": "0"/g' snyk.sarif+ sed -i 's/"security-severity": "null"/"security-severity": "0"/g' snyk.sarifecho "SARIF file fixed"elseecho "No SARIF file found"fi- - name: Echo SARIF file for debugging- if: always()- run: |- if [ -f snyk.sarif ]; then- echo "=== SARIF File Contents ==="- cat snyk.sarif- echo "=== End of SARIF File ==="- else- echo "No SARIF file found to display"- fi- name: Upload result to GitHub Code Scanninguses: github/codeql-action/upload-sarif@c10b8064de6f491fea524254123dbe5e09572f13 # v4if: always()with:sarif_file: snyk.sarif+ - name: Echo SARIF file for debugging+ if: failure()+ run: cat snyk.sarifdiff --git a/.github/workflows/snyk-worker.yml b/.github/workflows/snyk-worker.ymlindex 83677cde2d..5721e5e41f 100644--- a/.github/workflows/snyk-worker.yml+++ b/.github/workflows/snyk-worker.yml@@ -32,24 +32,20 @@ jobs:if: always()run: |if [ -f snyk.sarif ]; then- # Fix undefined security severity values in SARIF file+ # Snyk emits invalid security-severity values ("undefined", "null").+ # codeql-action/upload-sarif requires a numeric string.+ # See: https://github.com/github/codeql-action/issues/2187#issuecomment-3708019503sed -i 's/"security-severity": "undefined"/"security-severity": "0"/g' snyk.sarif+ sed -i 's/"security-severity": "null"/"security-severity": "0"/g' snyk.sarifecho "SARIF file fixed"elseecho "No SARIF file found"fi- - name: Echo SARIF file for debugging- if: always()- run: |- if [ -f snyk.sarif ]; then- echo "=== SARIF File Contents ==="- cat snyk.sarif- echo "=== End of SARIF File ==="- else- echo "No SARIF file found to display"- fi- name: Upload result to GitHub Code Scanninguses: github/codeql-action/upload-sarif@c10b8064de6f491fea524254123dbe5e09572f13 # v4if: always()with:sarif_file: snyk.sarif+ - name: Echo SARIF file for debugging+ if: failure()+ run: cat snyk.sarif