Repository navigation
Commit 590dd2a
authored
fix(security): resolve Python dependency vulnerabilities (#407)
This pull request primarily updates dependencies across several Python
projects to newer versions, switches some dependencies to local
development mode for easier testing and development, and introduces
improved test utilities for deterministic testing. The updates are aimed
at maintaining compatibility, leveraging new features, and ensuring more
reliable and maintainable test environments.
Dependency updates and improvements:
* Updated multiple dependencies to newer versions across
`libs/admin-api-lib`, `libs/extractor-api-lib`, `libs/rag-core-api`,
`libs/rag-core-lib`, `services/document-extractor`,
`services/mcp-server`, and `services/rag-backend`. Notable updates
include `openai`, `starlette`, `python-multipart`, `pytest`,
`langgraph-checkpoint`, `camelot-py`, `docling`, and others.
[[1]](diffhunk://#diff-9c5aeb0db77c2eec077d07ddc3b3810ae1a4a1e50ee7061fba37a46706c513fbL128-R134)
[[2]](diffhunk://#diff-dede389bcfb615c4b45cd1da7ac14cbe9535305f41f19cce09e321c91a8bb323L118-R126)
[[3]](diffhunk://#diff-dede389bcfb615c4b45cd1da7ac14cbe9535305f41f19cce09e321c91a8bb323L135-R143)
[[4]](diffhunk://#diff-9c4162cc1c16dd4c7ec5e95e79df285e8c0882a1db7ff2892c746a0537d26c36L35-R51)
[[5]](diffhunk://#diff-b19ab043535569caf9345971969d115d6515ae951a21b00a278145a28230fba1L32-R34)
[[6]](diffhunk://#diff-a32cd883126f65652f92c8ecc411d949b7bcf95edb2156c36dc2c1b7063ee690L24-R26)
[[7]](diffhunk://#diff-575f4ba32d7ff340b37eb2f875cb9574553092b79335faadd5f3b6be662b6925L19-R19)
[[8]](diffhunk://#diff-bda9860363f25ca7829f0bc0121455b5cfea15f6ecc4e98d168aba411d9653c9L76-R76)
* Changed `rag-core-lib` dependency to use a local development path
instead of a fixed version in several `pyproject.toml` files,
facilitating local development and testing.
[[1]](diffhunk://#diff-9c5aeb0db77c2eec077d07ddc3b3810ae1a4a1e50ee7061fba37a46706c513fbL116-R116)
[[2]](diffhunk://#diff-dede389bcfb615c4b45cd1da7ac14cbe9535305f41f19cce09e321c91a8bb323L96-R97)
[[3]](diffhunk://#diff-9c4162cc1c16dd4c7ec5e95e79df285e8c0882a1db7ff2892c746a0537d26c36L23-R23)
Testing and development enhancements:
* Added a new `MockSparseEmbeddings` class in
`libs/rag-core-api/tests/mocks/mock_sparse_embeddings.py` to provide
deterministic sparse embeddings for tests, and integrated it into the
test setup to improve test reliability.
[[1]](diffhunk://#diff-4d25f80941e8e49128a0bd00f1a9424f75a689245809af4cd54198dbb70c3a53R1-R16)
[[2]](diffhunk://#diff-596a163e3b70fef32bb64c59bf15f33aeab492eaf41c0cc833bbf2e17439c42aR25-R26)
[[3]](diffhunk://#diff-596a163e3b70fef32bb64c59bf15f33aeab492eaf41c0cc833bbf2e17439c42aR73-R74)
* Updated test infrastructure in `rag_api_test.py` to override the
sparse embedder and reranker with mock implementations and to configure
Qdrant collections for sparse vector support.
[[1]](diffhunk://#diff-596a163e3b70fef32bb64c59bf15f33aeab492eaf41c0cc833bbf2e17439c42aR73-R74)
[[2]](diffhunk://#diff-596a163e3b70fef32bb64c59bf15f33aeab492eaf41c0cc833bbf2e17439c42aR97-R99)
Prompt template formatting:
* Improved formatting in prompt template files by adjusting how
multiline strings are defined, enhancing readability and
maintainability.
[[1]](diffhunk://#diff-f45d2e4f21bc9442444429d1a64091e4c50132f371b05b72374956fa02b1d966L30-R34)
[[2]](diffhunk://#diff-e93a1e7be5b80657d6e435a651dab98960b0d1c1e7a8672f4e3927b4cd0c3fe7L21-R25)1 parent 87832ad commit 590dd2a
18 files changed
Lines changed: 2609 additions & 2497 deletions
File tree
- libs
- admin-api-lib
- extractor-api-lib
- rag-core-api
- tests
- mocks
- rag-core-lib
- services
- admin-backend
- document-extractor
- mcp-server
- rag-backend
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
133 | | - | |
134 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
97 | | - | |
| 96 | + | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
| 118 | + | |
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
| 126 | + | |
126 | 127 | | |
127 | 128 | | |
128 | 129 | | |
| |||
132 | 133 | | |
133 | 134 | | |
134 | 135 | | |
135 | | - | |
| 136 | + | |
| 137 | + | |
136 | 138 | | |
137 | 139 | | |
138 | 140 | | |
139 | 141 | | |
140 | | - | |
141 | | - | |
| 142 | + | |
| 143 | + | |
142 | 144 | | |
143 | 145 | | |
144 | 146 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
46 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| |||
68 | 70 | | |
69 | 71 | | |
70 | 72 | | |
| 73 | + | |
| 74 | + | |
71 | 75 | | |
72 | 76 | | |
73 | 77 | | |
| |||
90 | 94 | | |
91 | 95 | | |
92 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
93 | 100 | | |
94 | 101 | | |
95 | 102 | | |
| |||
0 commit comments