Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

fix: fix snyk sarif file upload due to undefined severity (#12112)

Max Deichmannca034aa29f27
diff --git a/.github/workflows/snyk-web.yml b/.github/workflows/snyk-web.yml
index 99228b7140..ffd1baa8ec 100644
--- a/.github/workflows/snyk-web.yml
+++ b/.github/workflows/snyk-web.yml
@@ -21,7 +21,28 @@ jobs:
with:
image: langfuse/langfuse
args: --sarif-file-output=snyk.sarif
+ - name: Fix SARIF file
+ if: always()
+ run: |
+ if [ -f snyk.sarif ]; then
+ # Fix undefined security severity values in SARIF file
+ sed -i 's/"security-severity": "undefined"/"security-severity": "0"/g' snyk.sarif
+ echo "SARIF file fixed"
+ else
+ echo "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 Scanning
uses: github/codeql-action/upload-sarif@v4
+ if: always()
with:
sarif_file: snyk.sarif
diff --git a/.github/workflows/snyk-worker.yml b/.github/workflows/snyk-worker.yml
index 44fce9cf7f..caaec134e4 100644
--- a/.github/workflows/snyk-worker.yml
+++ b/.github/workflows/snyk-worker.yml
@@ -21,7 +21,28 @@ jobs:
with:
image: langfuse/langfuse-worker
args: --sarif-file-output=snyk.sarif
+ - name: Fix SARIF file
+ if: always()
+ run: |
+ if [ -f snyk.sarif ]; then
+ # Fix undefined security severity values in SARIF file
+ sed -i 's/"security-severity": "undefined"/"security-severity": "0"/g' snyk.sarif
+ echo "SARIF file fixed"
+ else
+ echo "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 Scanning
uses: github/codeql-action/upload-sarif@v4
+ if: always()
with:
sarif_file: snyk.sarif