mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-26 01:12:21 +00:00
* test(autoroute): wait for a valid fuzzy selection index and cancel the prompt on driver failure Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * test(autoroute): read the fuzzy selection through the public InquirerPy property Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * test(proxy): inject the HIBP client into change_password so the breached-password test never touches the network Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * test(mcp): only use the 200ms read timeout in the silent mode of the transport completion test Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * test(proxy): record HIBP requests so the ordering test asserts no lookup happened Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * ci(codeql): filter the weak-sensitive-data-hashing false positive on the HIBP k-anonymity lookup Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
89 lines
3.4 KiB
YAML
89 lines
3.4 KiB
YAML
name: "CodeQL"
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
schedule:
|
|
# Run daily at 04:00 UTC
|
|
- cron: "0 4 * * *"
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
jobs:
|
|
analyze:
|
|
if: github.event_name != 'schedule' || github.repository == 'BerriAI/litellm'
|
|
name: Analyze (${{ matrix.language }})
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
permissions:
|
|
security-events: write
|
|
packages: read
|
|
actions: read
|
|
contents: read
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- language: actions
|
|
build-mode: none
|
|
- language: javascript-typescript
|
|
build-mode: none
|
|
- language: python
|
|
build-mode: none
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Initialize CodeQL
|
|
uses: github/codeql-action/init@ebcb5b36ded6beda4ceefea6a8bc4cc885255bb3 # v3.34.1
|
|
with:
|
|
languages: ${{ matrix.language }}
|
|
build-mode: ${{ matrix.build-mode }}
|
|
config-file: ./.github/codeql/codeql-config.yml
|
|
|
|
- name: Perform CodeQL Analysis
|
|
uses: github/codeql-action/analyze@ebcb5b36ded6beda4ceefea6a8bc4cc885255bb3 # v3.34.1
|
|
with:
|
|
category: "/language:${{ matrix.language }}"
|
|
output: sarif-results
|
|
upload: failure-only
|
|
|
|
# py/weak-sensitive-data-hashing (CWE-328) fires on the OCI signing call at
|
|
# litellm/llms/oci/common_utils.py, which hashes the HTTP request body to
|
|
# produce the x-content-sha256 header required by the OCI HTTP signing spec —
|
|
# a content-integrity hash, not a password or secret hash. SHA-256 is mandated
|
|
# by Oracle for this header; see
|
|
# https://docs.oracle.com/en-us/iaas/Content/API/Concepts/signingrequests.htm
|
|
# The `usedforsecurity=False` flag on the hashlib.sha256 call already declares
|
|
# non-security intent, but CodeQL's taint flow still re-fires when callers
|
|
# further up the stack are modified. The suppression is scoped to this one
|
|
# file/rule pair via SARIF post-filtering so every other callsite of
|
|
# py/weak-sensitive-data-hashing in the repository continues to be analyzed.
|
|
# The same query fires on the HIBP k-anonymity lookup in
|
|
# litellm/proxy/auth/password_policy.py, where the password's SHA-1 is only
|
|
# a lookup key into the haveibeenpwned range API (the protocol mandates
|
|
# SHA-1) and the digest itself never leaves the proxy beyond its first 5
|
|
# characters.
|
|
- name: Filter SARIF (OCI sha256, HIBP sha1)
|
|
if: matrix.language == 'python'
|
|
uses: advanced-security/filter-sarif@2da736ff05ef065cb2894ac6892e47b5eac2c3c0 # v1.1
|
|
with:
|
|
patterns: |
|
|
-litellm/llms/oci/common_utils.py:py/weak-sensitive-data-hashing
|
|
-litellm/proxy/auth/password_policy.py:py/weak-sensitive-data-hashing
|
|
input: sarif-results/python.sarif
|
|
output: sarif-results/python.sarif
|
|
|
|
- name: Upload SARIF
|
|
uses: github/codeql-action/upload-sarif@ebcb5b36ded6beda4ceefea6a8bc4cc885255bb3 # v3.34.1
|
|
with:
|
|
sarif_file: sarif-results
|
|
category: "/language:${{ matrix.language }}"
|