Skip to content

Commit 27b0286

Browse files
committed
Patch various CVEs
1 parent fbd487c commit 27b0286

9 files changed

Lines changed: 24 additions & 21 deletions

File tree

.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: "23.3.0"
1414
PYTHON_VERSION: "3.10"
1515

1616
jobs:

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 0.0.85
2+
* Patch various CVEs
3+
14
## 0.0.84
25
* Patch h11 CVE
36
* 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 := 23.3.0
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: 6 additions & 6 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 (
@@ -53,7 +51,9 @@ def is_compatible_response_type(media_type: str, response_type: type) -> bool:
5351
return (
5452
False
5553
if media_type == "application/json" and response_type not in [dict, list]
56-
else False if media_type == "text/csv" and response_type != str else True
54+
else False
55+
if media_type == "text/csv" and response_type != str
56+
else True
5757
)
5858

5959

@@ -602,7 +602,7 @@ def return_content_type(filename: str):
602602

603603

604604
@router.get("/general/v0/general", include_in_schema=False)
605-
@router.get("/general/v0.0.84/general", include_in_schema=False)
605+
@router.get("/general/v0.0.85/general", include_in_schema=False)
606606
async def handle_invalid_get_request():
607607
raise HTTPException(
608608
status_code=status.HTTP_405_METHOD_NOT_ALLOWED, detail="Only POST requests are supported."
@@ -617,7 +617,7 @@ async def handle_invalid_get_request():
617617
description="Description",
618618
operation_id="partition_parameters",
619619
)
620-
@router.post("/general/v0.0.84/general", include_in_schema=False)
620+
@router.post("/general/v0.0.85/general", include_in_schema=False)
621621
def general_partition(
622622
request: Request,
623623
# 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

requirements/base.txt

Lines changed: 3 additions & 3 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
@@ -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
@@ -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: 3 additions & 3 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
@@ -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
@@ -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:-23.3.0}"
88
DOCKER_IMAGE="${DOCKER_IMAGE:-pipeline-family-${PIPELINE_FAMILY}-dev}"
99
DOCKER_PLATFORM="${DOCKER_PLATFORM:-}"
1010

0 commit comments

Comments
 (0)