Skip to content

Commit b4577b5

Browse files
authored
Fix vulnerabilities (#281)
1 parent c727cd8 commit b4577b5

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ RUN if [ -f /custom/custom_opa.tar.gz ]; \
6666
# MAIN IMAGE ----------------------------------------
6767
# Main image setup (optimized)
6868
# ---------------------------------------------------
69-
FROM python:3.10-alpine AS main
69+
FROM python:3.10-alpine3.22 AS main
7070

7171
WORKDIR /app
7272

@@ -79,6 +79,7 @@ RUN mkdir -p /app/backup && chmod -R 777 /app/backup
7979

8080
# Install necessary libraries in a single RUN command
8181
RUN apk update && \
82+
apk upgrade && \
8283
apk add --no-cache bash build-base libffi-dev libressl-dev musl-dev zlib-dev gcompat wget
8384

8485
# Copy OPA binary from the build stage

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
.DEFAULT_GOAL := help
44

5+
VERSION ?= next
6+
57
prepare:
68
ifndef VERSION
79
$(error You must set VERSION variable to build local image)
@@ -23,6 +25,9 @@ build-amd64: prepare
2325
build-arm64: prepare
2426
@docker buildx build --platform linux/arm64 -t permitio/pdp-v2:$(VERSION) . --load
2527

28+
build: prepare
29+
@docker buildx build -t permitio/pdp-v2:$(VERSION) . --load
30+
2631
run: run-prepare
2732
@docker run -it --rm -p 7766:7000 --env PDP_API_KEY=$(API_KEY) --env PDP_DEBUG=true permitio/pdp-v2:$(VERSION)
2833

requirements.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
aiohttp>=3.10.11,<4
2-
fastapi>=0.109.1,<1
1+
aiohttp>=3.12.14,<4
2+
fastapi>=0.115.6,<1
33
Jinja2>=3.1.2,<4
44
pydantic[email]>=1.9.1,<2
5-
requests>=2.31.0,<3
5+
requests>=2.32.4,<3
6+
urllib3>=2.5.0,<3
7+
gunicorn>=23.0.0,<24
68
tenacity>=8.0.1,<9
79
typer>=0.4.1,<1
810
uvicorn[standard]>=0.17.6,<1
@@ -14,5 +16,5 @@ httpx>=0.27.0,<1
1416
# TODO: change to use re2 in the future, currently not supported in alpine due to c++ library issues
1517
# google-re2 # use re2 instead of re for regex matching because it's simiplier and safer for user inputted regexes
1618
protobuf>=3.20.2 # not directly required, pinned by Snyk to avoid a vulnerability
17-
opal-common==0.8.2
18-
opal-client==0.8.2
19+
opal-common==0.8.3
20+
opal-client==0.8.3

0 commit comments

Comments
 (0)