Commit Graph

120 Commits

Author SHA1 Message Date
Ishaan Jaffer e8461b5b97 style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
Yuneng Jiang 006d481025 [Fix] Remove neon CLI dependency and pin all JS dependencies
Remove @neondatabase/api-client and neonctl to address CVE-2026-25639
(axios supply chain vulnerability). Pin all JS dependencies to exact
versions across all package.json files to prevent future supply chain
attacks via semver range resolution.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 16:15:32 -07:00
stuxf 7066c895f6 chore: harden npm supply chain — pin overrides, enforce npm ci, add ignore-scripts (#24838)
* chore: harden npm supply chain — pin overrides, enforce npm ci, add ignore-scripts

Replace open-ended >= version overrides with exact pins matching lockfile
versions across all 6 package.json files. Remove dead overrides for packages
not present in lockfiles. Switch CI and devcontainer from npm install to
npm ci for deterministic lockfile-based installs.

Add .npmrc to all 7 JS project directories with ignore-scripts=true (blocks
postinstall RAT vectors like the axios@1.14.1 supply chain attack) and
min-release-age=3d (refuses packages published <3 days ago, requires npm
>=11.10). Remove Yarn-only resolutions field from docs/my-website.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: bump sharp to 0.33.5 in docs, add docs .npmrc

sharp 0.32.x uses postinstall to download native binaries, which breaks
with ignore-scripts=true. sharp 0.33+ distributes via optionalDependencies
instead, making it compatible with the new .npmrc hardening.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: remove docs .npmrc to fix Vercel deploy

Vercel's build for docs/my-website uses npm install which needs
sharp 0.32.6's postinstall script. Since we don't control Vercel's
build process, remove the .npmrc from docs rather than fight it.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: Dockerfile npm ci + nvm checksum verification

- Replace npm install with npm ci in Dockerfile.non_root,
  Dockerfile.custom_ui, and spend-logs/Dockerfile for deterministic
  lockfile-based installs
- Replace curl-pipe-bash nvm install with download-then-verify pattern
  in build_admin_ui.sh, build_ui.sh, and build_ui_custom_path.sh
- Update nvm from v0.38.0 (2021) to v0.40.4 (Jan 2026) with SHA256
  checksum verification before execution

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: macOS sha256sum compat + clarify min-release-age scope

- Use shasum -a 256 fallback on macOS where sha256sum is unavailable
- Clarify in .npmrc comments that min-release-age only protects local
  npm install, not npm ci (used in CI)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 13:41:37 -07:00
Ishaan Jaffer f636c3b3b7 pin axios 2026-03-30 20:20:23 -07:00
Krish Dholakia e7714f0ce6 Fix CVEs: bump tar/minimatch/pypdf + harden Docker SBOM patching (#23082)
* fix(docker): bump tar/minimatch/pypdf for CVE fixes + harden SBOM patching

- Bump tar 7.5.8→7.5.10, minimatch 10.2.1→10.2.4, pypdf 6.6.2→6.7.3
- Add sed-based SBOM metadata patching with properly indented find/sed
- Add npm package manager cleanup (apk del / apt-get purge) to remove
  stale SBOM entries from image scanners
- Scope || true to only apk del via brace grouping { ... || true; }
- Guard npm root -g with non-empty assertion to prevent silent failures
- Scope minimatch sed regex to ^10.x to avoid matching other major versions

Addresses: CVE-2026-27903, CVE-2026-27904, GHSA-qffp-2rhf-9h96, CVE-2026-27888

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(docker): scope find to /usr/local/lib /usr/lib, drop autoremove

- Replace `find /` with `find /usr/local/lib /usr/lib` to avoid
  traversing /proc, /sys, /dev during SBOM metadata patching
- Remove `apt-get autoremove -y` from Debian-based Dockerfiles to
  prevent nodejs from being removed as an auto-installed dependency

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 18:31:27 -08:00
Harshit28j 3e6c10a071 security: fix critical/high CVEs in OS-level libs and NPM transitive 2026-02-24 19:40:09 +05:30
Julio Quinteros Pro 1dc3f1e530 fix(tests): skip remaining real prisma DB tests in CI and related test suites
Add @pytest.mark.skip to all test functions that use the real `prisma_client`
fixture (requiring an external PostgreSQL connection) across 7 test files.

Files updated:
- tests/proxy_unit_tests/test_proxy_server.py (5 tests)
- tests/proxy_admin_ui_tests/test_key_management.py (11 tests)
- tests/proxy_admin_ui_tests/test_role_based_access.py (5 tests)
- tests/proxy_admin_ui_tests/test_usage_endpoints.py (3 tests)
- tests/local_testing/test_blocked_user_list.py (2 tests)
- tests/local_testing/test_add_update_models.py (1 test)
- tests/local_testing/test_update_spend.py (1 test)

Total: 28 new skip markers added.

Note: tests using mock_prisma_client (properly mocked) are unaffected.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-20 13:25:42 -03:00
yuneng-jiang adc2859f0a sorting spend logs in ui 2026-02-13 11:33:41 -08:00
Harshit Jain 3b043ee8bf fix critical CVE vulnerabliltes (#20683) 2026-02-07 22:23:01 -08:00
Alexsander Hamir c0d6998384 Make test_get_users_key_count deterministic by creating dedicated test user (#19795)
- Create a test user with auto_create_key=False to ensure known starting state
- Filter get_users by user_ids to target only the test user
- Verify initial key count is 0 before creating a key
- Clean up test user after test completes
- This ensures consistent behavior across CI and local environments
2026-01-26 10:13:15 -08:00
yuneng-jiang 809b4cb310 Revert "Revert "[Feature] Deleted Keys and Deleted Teams Table"" 2026-01-16 14:25:23 -08:00
YutaSaito 034e3a6d44 Revert "[Feature] Deleted Keys and Deleted Teams Table" 2026-01-17 06:46:41 +09:00
yuneng-jiang bd4a893daf fixing tests 2026-01-16 12:42:35 -08:00
yuneng-jiang 30eaa1c099 Merge remote-tracking branch 'origin' into litellm_new_user_collision_handling 2025-12-06 19:58:35 -08:00
yuneng-jiang a2bf6e169c fixing tests 2025-12-05 16:07:51 -08:00
yuneng-jiang e21bf1982c Fixing e2e 2025-12-05 12:40:58 -08:00
yuneng-jiang 37bfe65bdd Adding screenshot to debug 2025-12-04 23:05:00 -08:00
yuneng-jiang 50283a00a3 e2e fix 2025-12-04 22:51:52 -08:00
yuneng-jiang 59b32c28a8 Change selector in test 2025-12-03 23:37:15 -08:00
yuneng-jiang 0483336c53 change test to follow other logins 2025-12-03 23:21:09 -08:00
yuneng-jiang 19dc5d750c Adding waits 2025-12-03 23:10:32 -08:00
yuneng-jiang 45a9723467 view_user_info debugging 2025-12-03 22:20:04 -08:00
yuneng-jiang c634c08818 Find inputs by placeholder 2025-12-03 21:51:45 -08:00
yuneng-jiang 636f26d8a1 e2e changes 2025-12-03 21:21:27 -08:00
yuneng-jiang a4341ccf83 ci/cd changes for debugging 2025-12-03 21:00:49 -08:00
yuneng-jiang 3de84b3f8b e2e tests 2025-12-03 20:34:41 -08:00
yuneng-jiang d215576477 Add auto redirect to SSO to new login page 2025-12-03 17:07:12 -08:00
yuneng-jiang de4b79851f Change e2e test to look for Virtual Keys instead of API Keys 2025-12-03 15:26:25 -08:00
yuneng-jiang a33a2cb5b5 Adding timeout to flaky test 2025-11-27 17:53:09 -08:00
yuneng-jiang f0e5921bbd Add emoji for exact text match 2025-11-26 17:09:07 -08:00
yuneng-jiang 67f9c6cc08 Adjusting e2e tests for new loading state 2025-11-26 16:47:37 -08:00
Ishaan Jaffer 1fc3baf864 e2e ui testing fixes 2025-11-22 14:30:00 -08:00
Ishaan Jaffer dd325191e7 ui testing fixes 2025-11-22 13:44:58 -08:00
Ishaan Jaffer dc08e2d057 fix pkg lock 2025-11-22 11:52:57 -08:00
Ishaan Jaffer 5b23b0913e async def test_auth_callback_new_user(mock_google_sso, mock_env_vars, prisma_client): 2025-11-22 10:02:15 -08:00
yuneng-jiang 4b25398afe [Infra] CI/CD Fixes (#16937)
* Attempt CI/CD Fix

* Adding test for coverage

* Adding max depth to copilot and vertex

* Fixing mypy lint and docker database

* Fixing UI build issues

* Update playwright test
2025-11-21 13:58:19 -08:00
yuneng-jiang fe05e33723 Fix e2e ui playwright test (#16799) 2025-11-18 17:56:40 -08:00
dependabot[bot] 97bb899f52 Bump js-yaml in /tests/proxy_admin_ui_tests/ui_unit_tests (#16755)
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 3.14.1 to 3.14.2.
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/3.14.1...3.14.2)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 3.14.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-18 11:38:54 -08:00
Ishaan Jaffer 94c2c28f3d claude-sonnet-4-5-20250929 fix 2025-10-31 18:20:52 -07:00
Alexsander Hamir eaa04cd8ce fix: use fastuuid helper (#14903)
* fix: use fastuuid helper across the codebase

First batch of changes, simple drop in replacement.

* second batch of changes

* fixed: script mistake on helper file
2025-09-25 15:47:01 -07:00
Sashanken c6626559a2 Fixed Log Tab Key Alias filtering inaccurately for failed logs 2025-09-11 13:05:48 -07:00
tanjiro 9f9534b537 Fix e2e test (#12549)
* user header removed

* fix test
2025-07-12 10:42:57 -07:00
tanjiro b4fbdeeaaa user header removed (#12544) 2025-07-12 08:51:49 -07:00
Ishaan Jaff 4b4e2dfde4 test base email 2025-07-01 20:33:21 -07:00
Jugal Bhatt fefc5fc33a add warning message for non premium users 2025-07-01 16:27:31 -07:00
Jugal Bhatt b63d64dcf5 add subject and signature tests 2025-07-01 15:15:40 -07:00
Ishaan Jaff 0c19414b36 [️ Python SDK import] - reduce python sdk import time by .3s (#12140)
* use 1 file for KeyManagementSystem

* move key management settings

* fix import locs

* test_proxy_types_not_imported

* test the import loc

* fix import item

* fix imports

* fix import loc

* fix imports
2025-06-28 14:57:10 -07:00
Ishaan Jaff e3c9318bd4 [Fix] MCP - Ensure internal users can access /mcp and /mcp/ routes (#12106)
* fixes for MCP route checks

* test is is_llm_api_route for MCP
2025-06-27 09:05:38 -07:00
Krrish Dholakia b21efd435a test(test_sso_sign_in.py): update test 2025-06-03 21:46:34 -07:00
Ishaan Jaff 702b5fec22 [Feat] Add /image/edits on LiteLLM (#11123)
* feat: add image edits on litellm router

* feat: add image edits endpoint

* fix: use pure async for image edits

* fix: base_process_llm_request

* fix: get_image_content_type

* feat: add image edits endpoint

* add image edits on UI

* test: image edits support

* fix: linting errors

* fix: linting errors

* test fix img gen
2025-05-24 10:18:01 -07:00