Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge branch 'staging' into branch 'rc' #1891

Merged
merged 18 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
454adaf
Update push doc workflow to edit the version after deploying it
TheophileDiot Jan 10, 2025
800f7a3
Refactor documentation deployment workflow to separate hidden and vis…
TheophileDiot Jan 10, 2025
27ac978
Add retrieval of database metadata in download-pro-plugins.py
TheophileDiot Jan 10, 2025
527fa9d
deps/gha: bump docker/build-push-action from 6.10.0 to 6.11.0
dependabot[bot] Jan 10, 2025
5b53c72
deps/gha: bump actions/upload-artifact from 4.5.0 to 4.6.0
dependabot[bot] Jan 10, 2025
5599cc8
Refactor bw_ui_users table migration to conditionally drop columns an…
TheophileDiot Jan 10, 2025
30a0efb
Refactor database connection string validation to improve readability…
TheophileDiot Jan 10, 2025
43b905f
Update Dockerfiles to use new base images and remove CVE references
TheophileDiot Jan 10, 2025
4a59ba5
Refactor database version check and configuration update in scheduler…
TheophileDiot Jan 10, 2025
eb7b9aa
Remove PostgreSQL 17 warning from documentation regarding Docker inte…
TheophileDiot Jan 10, 2025
3fd3046
Update Dockerfiles to use new image digests for Debian and Red Hat
TheophileDiot Jan 10, 2025
ca4e45a
Update setuptools and sqlalchemy versions in requirements files
TheophileDiot Jan 10, 2025
8df30f0
Update PostgreSQL and MySQL images to latest versions in configuratio…
TheophileDiot Jan 10, 2025
9ab4da4
Remove CVE-2023-6129 from Trivy ignore list
TheophileDiot Jan 10, 2025
8ffc7b7
Merge pull request #1884 from bunkerity/dependabot/github_actions/dev…
TheophileDiot Jan 10, 2025
9a96780
Merge pull request #1885 from bunkerity/dependabot/github_actions/dev…
TheophileDiot Jan 10, 2025
f25ba38
Refactor database path handling to use Path object for improved compa…
TheophileDiot Jan 10, 2025
e96cc67
Merge pull request #1890 from bunkerity/dev
TheophileDiot Jan 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/container-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
# Build cached image
- name: Build image
if: inputs.CACHE == true
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0
uses: docker/build-push-action@b32b51a8eda65d6793cd0494a773d4f6bcef32dc # v6.11.0
with:
context: .
file: ${{ inputs.DOCKERFILE }}
Expand All @@ -108,7 +108,7 @@ jobs:
# Build non-cached image
- name: Build image
if: inputs.CACHE != true
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0
uses: docker/build-push-action@b32b51a8eda65d6793cd0494a773d4f6bcef32dc # v6.11.0
with:
context: .
file: ${{ inputs.DOCKERFILE }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/doc-to-pdf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
run: mkdocs serve & sleep 10
- name: Run pdf script
run: node docs/misc/pdf.js http://localhost:8000/print_page/ BunkerWeb_documentation_v${{ inputs.VERSION }}.pdf 'BunkerWeb documentation v${{ inputs.VERSION }}'
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
- uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: BunkerWeb_documentation_v${{ inputs.VERSION }}.pdf
path: BunkerWeb_documentation_v${{ inputs.VERSION }}.pdf
8 changes: 4 additions & 4 deletions .github/workflows/linux-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
# Build testing package image
- name: Build package image
if: inputs.RELEASE == 'testing' || inputs.RELEASE == 'dev' || inputs.RELEASE == 'ui' || inputs.RELEASE == '1.5'
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0
uses: docker/build-push-action@b32b51a8eda65d6793cd0494a773d4f6bcef32dc # v6.11.0
with:
context: .
load: true
Expand All @@ -109,7 +109,7 @@ jobs:
# Build non-testing package image
- name: Build package image
if: inputs.RELEASE != 'testing' && inputs.RELEASE != 'dev' && inputs.RELEASE != 'ui' && inputs.RELEASE != '1.5'
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0
uses: docker/build-push-action@b32b51a8eda65d6793cd0494a773d4f6bcef32dc # v6.11.0
with:
context: .
load: true
Expand All @@ -132,7 +132,7 @@ jobs:
scp -r root@arm:/root/package-${{ inputs.LINUX }} ./package-${{ inputs.LINUX }}
env:
LARCH: ${{ env.LARCH }}
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
- uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: package-${{ inputs.LINUX }}-${{ env.LARCH }}
path: package-${{ inputs.LINUX }}/*.${{ inputs.PACKAGE }}
Expand All @@ -145,7 +145,7 @@ jobs:
images: ghcr.io/bunkerity/${{ inputs.LINUX }}-tests:${{ inputs.RELEASE }}
- name: Build test image
if: inputs.TEST == true
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0
uses: docker/build-push-action@b32b51a8eda65d6793cd0494a773d4f6bcef32dc # v6.11.0
with:
context: .
file: tests/linux/Dockerfile-${{ inputs.LINUX }}
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/push-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,14 @@ jobs:
python-version: "3.10"
- name: Install doc dependencies
run: pip install --no-cache-dir --require-hashes -r docs/requirements.txt && sudo apt install -y libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev
- name: Hide doc
- name: Deploy documentation (hidden)
if: inputs.HIDDEN == true
run: mike props ${{ inputs.VERSION }} --set hidden=true
- name: Push doc
run: |
mike deploy --update-aliases --alias-type=copy ${{ inputs.VERSION }} ${{ inputs.ALIAS }}
mike set-hidden ${{ inputs.VERSION }} true
mike push
- name: Deploy documentation
if: inputs.HIDDEN == false
run: mike deploy --update-aliases --push --alias-type=copy ${{ inputs.VERSION }} ${{ inputs.ALIAS }}
- name: Set default doc
if: inputs.ALIAS == 'latest'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
images: bunkerity/${{ inputs.IMAGE }}
# Build and push
- name: Build and push
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0
uses: docker/build-push-action@b32b51a8eda65d6793cd0494a773d4f6bcef32dc # v6.11.0
with:
context: .
file: ${{ inputs.DOCKERFILE }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/staging-create-infra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
if: always()
env:
SECRET_KEY: ${{ secrets.SECRET_KEY }}
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
- uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
if: always()
with:
name: tf-${{ inputs.TYPE }}
Expand Down
1 change: 0 additions & 1 deletion .trivyignore
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
CVE-2023-6129
5 changes: 0 additions & 5 deletions docs/concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,6 @@ By leveraging custom configurations, you unlock a world of possibilities to tail

## Database

!!! warning "PostgreSQL 17"
As of now, **PostgreSQL 17** is not supported in the **Docker integration**. If you want to use PostgreSQL 17, you will have to use the Linux integration.

This is due to the fact that the `postgresql-client` package only has the 14, 15 and 16 versions available in the alpine repositories.

BunkerWeb securely stores its current configuration in a backend database, which contains essential data for smooth operation. The following information is stored in the database:

- **Settings for all services**: The database holds the defined settings for all the services provided by BunkerWeb. This ensures that your configurations and preferences are preserved and readily accessible.
Expand Down
6 changes: 3 additions & 3 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -655,9 +655,9 @@ requests==2.32.3 \
# importlib-resources

# The following packages are considered to be unsafe in a requirements file:
setuptools==75.7.0 \
--hash=sha256:84fb203f278ebcf5cd08f97d3fb96d3fbed4b629d500b29ad60d11e00769b183 \
--hash=sha256:886ff7b16cd342f1d1defc16fc98c9ce3fde69e087a4e1983d7ab634e5f41f4f
setuptools==75.8.0 \
--hash=sha256:c5afc8f407c626b8313a86e10311dd3f661c6cd9c09d4bf8c15c0e11f9f2b0e6 \
--hash=sha256:e3982f444617239225d675215d51f6ba05f845d4eec313da4418fdbb56fb27e3
# via mkdocs-material
six==1.17.0 \
--hash=sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274 \
Expand Down
2 changes: 1 addition & 1 deletion examples/authentik/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ services:

# AUTHENTIK SERVICES
postgresql:
image: docker.io/library/postgres:16-alpine
image: docker.io/library/postgres:17-alpine
restart: unless-stopped
healthcheck:
test: [ "CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}" ]
Expand Down
2 changes: 1 addition & 1 deletion examples/redmine/autoconf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ services:
- bunkerweb.REVERSE_PROXY_HOST=http://myredmine:3000

mydb:
image: postgres:16-alpine
image: postgres:17-alpine
volumes:
- db-data:/var/lib/postgresql/data
environment:
Expand Down
2 changes: 1 addition & 1 deletion examples/redmine/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ services:
- bw-services

mydb:
image: postgres:16-alpine
image: postgres:17-alpine
volumes:
- db-data:/var/lib/postgresql/data
environment:
Expand Down
2 changes: 1 addition & 1 deletion examples/redmine/swarm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ services:
- bunkerweb.REVERSE_PROXY_HOST=http://myredmine:3000

mydb:
image: postgres:16-alpine
image: postgres:17-alpine
volumes:
- db-data:/var/lib/postgresql/data
environment:
Expand Down
2 changes: 1 addition & 1 deletion misc/integrations/autoconf.mysql.ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ services:
- "bunkerweb.ALLOWED_METHODS=GET|POST|PUT|DELETE"

bw-db:
image: mysql:8
image: mysql:9
environment:
MYSQL_RANDOM_ROOT_PASSWORD: "yes"
MYSQL_DATABASE: "db"
Expand Down
2 changes: 1 addition & 1 deletion misc/integrations/autoconf.mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ services:
- bw-db

bw-db:
image: mysql:8
image: mysql:9
environment:
MYSQL_RANDOM_ROOT_PASSWORD: "yes"
MYSQL_DATABASE: "db"
Expand Down
2 changes: 1 addition & 1 deletion misc/integrations/autoconf.postgres.ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ services:
- "bunkerweb.ALLOWED_METHODS=GET|POST|PUT|DELETE"

bw-db:
image: postgres:16-alpine
image: postgres:17-alpine
environment:
POSTGRES_USER: "bunkerweb"
POSTGRES_PASSWORD: "changeme" # Remember to set a stronger password for the database
Expand Down
2 changes: 1 addition & 1 deletion misc/integrations/autoconf.postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ services:
- bw-db

bw-db:
image: postgres:16-alpine
image: postgres:17-alpine
environment:
POSTGRES_USER: "bunkerweb"
POSTGRES_PASSWORD: "changeme" # Remember to set a stronger password for the database
Expand Down
2 changes: 1 addition & 1 deletion misc/integrations/docker.mysql.ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ services:
- bw-db

bw-db:
image: mysql:8
image: mysql:9
environment:
MYSQL_RANDOM_ROOT_PASSWORD: "yes"
MYSQL_DATABASE: "db"
Expand Down
2 changes: 1 addition & 1 deletion misc/integrations/docker.mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ services:
- bw-db

bw-db:
image: mysql:8
image: mysql:9
environment:
MYSQL_RANDOM_ROOT_PASSWORD: "yes"
MYSQL_DATABASE: "db"
Expand Down
2 changes: 1 addition & 1 deletion misc/integrations/docker.postgres.ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ services:
- bw-db

bw-db:
image: postgres:16-alpine
image: postgres:17-alpine
environment:
POSTGRES_USER: "bunkerweb"
POSTGRES_PASSWORD: "changeme" # Remember to set a stronger password for the database
Expand Down
2 changes: 1 addition & 1 deletion misc/integrations/docker.postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ services:
- bw-db

bw-db:
image: postgres:16-alpine
image: postgres:17-alpine
environment:
POSTGRES_USER: "bunkerweb"
POSTGRES_PASSWORD: "changeme" # Remember to set a stronger password for the database
Expand Down
2 changes: 1 addition & 1 deletion misc/integrations/k8s.mysql.ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ spec:
spec:
containers:
- name: bunkerweb-db
image: mysql:8
image: mysql:9
imagePullPolicy: Always
env:
- name: MYSQL_RANDOM_ROOT_PASSWORD
Expand Down
2 changes: 1 addition & 1 deletion misc/integrations/k8s.mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ spec:
spec:
containers:
- name: bunkerweb-db
image: mysql:8
image: mysql:9
imagePullPolicy: Always
env:
- name: MYSQL_RANDOM_ROOT_PASSWORD
Expand Down
2 changes: 1 addition & 1 deletion misc/integrations/k8s.postgres.ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ spec:
spec:
containers:
- name: bunkerweb-db
image: postgres:16-alpine
image: postgres:17-alpine
imagePullPolicy: Always
env:
- name: POSTGRES_DB
Expand Down
2 changes: 1 addition & 1 deletion misc/integrations/k8s.postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ spec:
spec:
containers:
- name: bunkerweb-db
image: postgres:16-alpine
image: postgres:17-alpine
imagePullPolicy: Always
env:
- name: POSTGRES_DB
Expand Down
2 changes: 1 addition & 1 deletion misc/integrations/swarm.mysql.ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ services:
- "bunkerweb.ALLOWED_METHODS=GET|POST|PUT|DELETE"

bw-db:
image: mysql:8
image: mysql:9
environment:
MYSQL_RANDOM_ROOT_PASSWORD: "yes"
MYSQL_DATABASE: "db"
Expand Down
2 changes: 1 addition & 1 deletion misc/integrations/swarm.mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ services:
- "node.role == worker"

bw-db:
image: mysql:8
image: mysql:9
environment:
MYSQL_RANDOM_ROOT_PASSWORD: "yes"
MYSQL_DATABASE: "db"
Expand Down
2 changes: 1 addition & 1 deletion misc/integrations/swarm.postgres.ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ services:
- "bunkerweb.ALLOWED_METHODS=GET|POST|PUT|DELETE"

bw-db:
image: postgres:16-alpine
image: postgres:17-alpine
environment:
POSTGRES_USER: "bunkerweb"
POSTGRES_PASSWORD: "changeme" # Remember to set a stronger password for the database
Expand Down
2 changes: 1 addition & 1 deletion misc/integrations/swarm.postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ services:
- "node.role == worker"

bw-db:
image: postgres:16-alpine
image: postgres:17-alpine
environment:
POSTGRES_USER: "bunkerweb"
POSTGRES_PASSWORD: "changeme" # Remember to set a stronger password for the database
Expand Down
2 changes: 1 addition & 1 deletion misc/migration/mysql.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
bw-db:
image: mysql:8
image: mysql:9
environment:
MYSQL_RANDOM_ROOT_PASSWORD: "yes"
MYSQL_DATABASE: "db"
Expand Down
2 changes: 1 addition & 1 deletion misc/migration/postgresql.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
bw-db:
image: postgres:16-alpine
image: postgres:17-alpine
environment:
POSTGRES_USER: "bunkerweb"
POSTGRES_PASSWORD: "secret"
Expand Down
6 changes: 3 additions & 3 deletions src/autoconf/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.13-alpine@sha256:657dbdb20479a6523b46c06114c8fec7db448232f956a429d3cc0606d30c1b59 AS builder
FROM python:3.13-alpine@sha256:b6f01a01e34091438a29b6dda4664199e34731fb2581ebb6fe255a2ebf441099 AS builder

# Export var for specific actions on linux/arm/v7
ARG TARGETPLATFORM
Expand Down Expand Up @@ -33,7 +33,7 @@ COPY src/common/utils utils
COPY src/autoconf autoconf
COPY src/VERSION VERSION

FROM python:3.13-alpine@sha256:657dbdb20479a6523b46c06114c8fec7db448232f956a429d3cc0606d30c1b59
FROM python:3.13-alpine@sha256:b6f01a01e34091438a29b6dda4664199e34731fb2581ebb6fe255a2ebf441099

# Set default umask to prevent huge recursive chmod increasing the final image size
RUN umask 027
Expand All @@ -44,7 +44,7 @@ RUN apk add --no-cache bash tzdata && \
adduser -h /var/cache/autoconf -g autoconf -s /bin/sh -G autoconf -D -H -u 101 autoconf

# Fix CVEs
RUN apk add --no-cache "libcrypto3>=3.3.2-r1" "libssl3>=3.3.2-r1" # CVE-2024-9143
# There are no CVEs for the following packages

# Copy dependencies
COPY --from=builder --chown=0:101 /usr/share/bunkerweb /usr/share/bunkerweb
Expand Down
6 changes: 3 additions & 3 deletions src/bw/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM nginx:1.26.2-alpine-slim@sha256:6a3378d408c49073bdbb0243219db1072f338b979b58660577a744044515f9f7 AS builder
FROM nginx:1.26.2-alpine-slim@sha256:1d541dc68a99c4da7923e88b8e184f85034804a1ff59ee838a81d83c319267d8 AS builder

# Install temporary requirements for the dependencies
RUN apk add --no-cache bash autoconf libtool automake geoip-dev g++ gcc curl-dev libxml2-dev pcre-dev make linux-headers musl-dev gd-dev gnupg brotli-dev openssl-dev patch readline-dev yajl yajl-dev yajl-tools py3-pip
Expand Down Expand Up @@ -42,7 +42,7 @@ COPY src/common/utils utils
COPY src/VERSION VERSION
COPY misc/*.ascii misc/

FROM nginx:1.26.2-alpine-slim@sha256:6a3378d408c49073bdbb0243219db1072f338b979b58660577a744044515f9f7
FROM nginx:1.26.2-alpine-slim@sha256:1d541dc68a99c4da7923e88b8e184f85034804a1ff59ee838a81d83c319267d8

# Set default umask to prevent huge recursive chmod increasing the final image size
RUN umask 027
Expand All @@ -51,7 +51,7 @@ RUN umask 027
RUN apk add --no-cache openssl pcre bash python3 yajl geoip libxml2 libgd curl tzdata

# Fix CVEs
RUN apk add --no-cache "curl>=8.11.0-r0" "libcurl>=8.11.0-r0" # CVE-2024-9681
# There are no CVEs for the following packages

# Copy dependencies
COPY --from=builder --chown=0:101 /usr/share/bunkerweb /usr/share/bunkerweb
Expand Down
2 changes: 2 additions & 0 deletions src/common/core/pro/jobs/download-pro-plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ def install_plugin(plugin_path: Path, db, preview: bool = True) -> bool:
if metadata["is_pro"] and metadata["pro_services"] < int(data["service_number"]):
metadata["pro_overlapped"] = True

db_metadata = db.get_metadata()

# ? If we already checked today, skip the check and if the metadata is the same, skip the check
if (
pro_license_key == db_metadata.get("pro_license", "")
Expand Down
Loading
Loading