Skip to content

Commit df1edce

Browse files
authored
Patch various CVEs (#505)
1 parent fbd487c commit df1edce

File tree

10 files changed

+32
-30
lines changed

10 files changed

+32
-30
lines changed

.github/workflows/docker-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ env:
1010
DOCKER_BUILD_REPOSITORY: quay.io/unstructured-io/build-unstructured-api
1111
PACKAGE: "unstructured-api"
1212
PIPELINE_FAMILY: "general"
13-
PIP_VERSION: "22.2.1"
13+
PIP_VERSION: "25.1.1"
1414
PYTHON_VERSION: "3.10"
1515

1616
jobs:

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.0.85
2+
* Patch various CVEs
3+
* Bump Python version to 3.12, some packages no longer support 3.9
4+
15
## 0.0.84
26
* Patch h11 CVE
37
* bump httpcore version due to h11 dependency

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PIPELINE_FAMILY := general
22
PIPELINE_PACKAGE := general
33
PACKAGE_NAME := prepline_${PIPELINE_PACKAGE}
4-
PIP_VERSION := 23.2.1
4+
PIP_VERSION := 25.1.1
55
ARCH := $(shell uname -m)
66

77
.PHONY: help

prepline_general/api/app.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
from fastapi import FastAPI, Request, status, HTTPException
2-
from fastapi.datastructures import FormData
3-
from fastapi.responses import JSONResponse
4-
from fastapi.security import APIKeyHeader
51
import logging
62
import os
73

4+
from fastapi import FastAPI, HTTPException, Request, status
5+
from fastapi.datastructures import FormData
6+
from fastapi.responses import JSONResponse
7+
88
from .general import router as general_router
99
from .openapi import set_custom_openapi
1010

@@ -13,7 +13,7 @@
1313
app = FastAPI(
1414
title="Unstructured Pipeline API",
1515
summary="Partition documents with the Unstructured library",
16-
version="0.0.84",
16+
version="0.0.85",
1717
docs_url="/general/docs",
1818
openapi_url="/general/openapi.json",
1919
servers=[

prepline_general/api/general.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@
77
import mimetypes
88
import os
99
import secrets
10-
import zipfile
1110
from base64 import b64encode
1211
from concurrent.futures import ThreadPoolExecutor
1312
from functools import partial
14-
from types import TracebackType
1513
from typing import IO, Any, Dict, List, Mapping, Optional, Sequence, Tuple, Union, cast
1614

1715
import backoff
@@ -33,8 +31,8 @@
3331
from starlette.datastructures import Headers
3432
from starlette.types import Send
3533

36-
from prepline_general.api.models.form_params import GeneralFormParams
3734
from prepline_general.api.filetypes import get_validated_mimetype
35+
from prepline_general.api.models.form_params import GeneralFormParams
3836
from unstructured.documents.elements import Element
3937
from unstructured.partition.auto import partition
4038
from unstructured.staging.base import (
@@ -602,7 +600,7 @@ def return_content_type(filename: str):
602600

603601

604602
@router.get("/general/v0/general", include_in_schema=False)
605-
@router.get("/general/v0.0.84/general", include_in_schema=False)
603+
@router.get("/general/v0.0.85/general", include_in_schema=False)
606604
async def handle_invalid_get_request():
607605
raise HTTPException(
608606
status_code=status.HTTP_405_METHOD_NOT_ALLOWED, detail="Only POST requests are supported."
@@ -617,7 +615,7 @@ async def handle_invalid_get_request():
617615
description="Description",
618616
operation_id="partition_parameters",
619617
)
620-
@router.post("/general/v0.0.84/general", include_in_schema=False)
618+
@router.post("/general/v0.0.85/general", include_in_schema=False)
621619
def general_partition(
622620
request: Request,
623621
# cannot use annotated type here because of a bug described here:

preprocessing-pipeline-family.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
name: general
2-
version: 0.0.84
2+
version: 0.0.85

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ line-length = 100
33

44
[tool.pyright]
55
pythonPlatform = "Linux"
6-
pythonVersion = "3.9"
6+
pythonVersion = "3.12"
77
reportUnnecessaryCast = true
88
typeCheckingMode = "strict"
99

requirements/base.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ coloredlogs==15.0.1
4545
# via onnxruntime
4646
contourpy==1.3.1
4747
# via matplotlib
48-
cryptography==44.0.0
48+
cryptography==44.0.1
4949
# via
5050
# pdfminer-six
5151
# unstructured-client
@@ -108,7 +108,7 @@ httpcore==1.0.9
108108
# via httpx
109109
httpx==0.28.1
110110
# via unstructured-client
111-
huggingface-hub==0.28.1
111+
huggingface-hub==0.32.1
112112
# via
113113
# timm
114114
# tokenizers
@@ -121,7 +121,7 @@ idna==3.10
121121
# anyio
122122
# httpx
123123
# requests
124-
jinja2==3.1.5
124+
jinja2==3.1.6
125125
# via torch
126126
joblib==1.4.2
127127
# via nltk
@@ -332,7 +332,7 @@ starlette==0.41.2
332332
# via
333333
# -c requirements/constraints.in
334334
# fastapi
335-
sympy==1.13.1
335+
sympy==1.13.3
336336
# via
337337
# onnxruntime
338338
# torch
@@ -342,13 +342,13 @@ timm==1.0.14
342342
# unstructured-inference
343343
tokenizers==0.21.0
344344
# via transformers
345-
torch==2.6.0
345+
torch==2.7.0
346346
# via
347347
# effdet
348348
# timm
349349
# torchvision
350350
# unstructured-inference
351-
torchvision==0.21.0
351+
torchvision==0.22.0
352352
# via
353353
# effdet
354354
# timm
@@ -358,7 +358,7 @@ tqdm==4.67.1
358358
# nltk
359359
# transformers
360360
# unstructured
361-
transformers==4.48.2
361+
transformers==4.50.0
362362
# via unstructured-inference
363363
typing-extensions==4.12.2
364364
# via

requirements/test.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ contourpy==1.3.1
103103
# matplotlib
104104
coverage[toml]==7.6.10
105105
# via pytest-cov
106-
cryptography==44.0.0
106+
cryptography==44.0.1
107107
# via
108108
# -r requirements/base.txt
109109
# pdfminer-six
@@ -232,7 +232,7 @@ httpx==0.28.1
232232
# -r requirements/test.in
233233
# jupyterlab
234234
# unstructured-client
235-
huggingface-hub==0.28.1
235+
huggingface-hub==0.32.1
236236
# via
237237
# -r requirements/base.txt
238238
# timm
@@ -269,7 +269,7 @@ isoduration==20.11.0
269269
# via jsonschema
270270
jedi==0.19.2
271271
# via ipython
272-
jinja2==3.1.5
272+
jinja2==3.1.6
273273
# via
274274
# -r requirements/base.txt
275275
# jupyter-server
@@ -765,7 +765,7 @@ starlette==0.41.2
765765
# -c requirements/constraints.in
766766
# -r requirements/base.txt
767767
# fastapi
768-
sympy==1.13.1
768+
sympy==1.13.3
769769
# via
770770
# -r requirements/base.txt
771771
# onnxruntime
@@ -785,19 +785,19 @@ tokenizers==0.21.0
785785
# via
786786
# -r requirements/base.txt
787787
# transformers
788-
torch==2.6.0
788+
torch==2.7.0
789789
# via
790790
# -r requirements/base.txt
791791
# effdet
792792
# timm
793793
# torchvision
794794
# unstructured-inference
795-
torchvision==0.21.0
795+
torchvision==0.22.0
796796
# via
797797
# -r requirements/base.txt
798798
# effdet
799799
# timm
800-
tornado==6.4.2
800+
tornado==6.5.0
801801
# via
802802
# ipykernel
803803
# jupyter-client
@@ -828,7 +828,7 @@ traitlets==5.14.3
828828
# nbclient
829829
# nbconvert
830830
# nbformat
831-
transformers==4.48.2
831+
transformers==4.50.0
832832
# via
833833
# -r requirements/base.txt
834834
# unstructured-inference

scripts/docker-build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -euo pipefail
44
DOCKER_REPOSITORY="${DOCKER_REPOSITORY:-quay.io/unstructured-io/unstructured-api}"
55
PIPELINE_PACKAGE=${PIPELINE_PACKAGE:-"general"}
66
PIPELINE_FAMILY=${PIPELINE_FAMILY:-"general"}
7-
PIP_VERSION="${PIP_VERSION:-22.2.1}"
7+
PIP_VERSION="${PIP_VERSION:-25.1.1}"
88
DOCKER_IMAGE="${DOCKER_IMAGE:-pipeline-family-${PIPELINE_FAMILY}-dev}"
99
DOCKER_PLATFORM="${DOCKER_PLATFORM:-}"
1010

0 commit comments

Comments
 (0)