Skip to content

Commit ca61f97

Browse files
Merge pull request #121 from bunkerity/dev
Add compatibility for older versions as well
2 parents b397540 + dcd2b0f commit ca61f97

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

.github/workflows/codeql.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ jobs:
2121
- name: Checkout repository
2222
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2323
- name: Initialize CodeQL
24-
uses: github/codeql-action/init@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0
24+
uses: github/codeql-action/init@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # v3.28.1
2525
with:
2626
languages: ${{ matrix.language }}
2727
config-file: ./.github/codeql.yml
2828
- name: Perform CodeQL Analysis
29-
uses: github/codeql-action/analyze@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0
29+
uses: github/codeql-action/analyze@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # v3.28.1
3030
with:
3131
category: "/language:${{matrix.language}}"

coraza/api/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.23-alpine@sha256:13aaa4b92fd4dc81683816b4b62041442e9f685deeb848897ce78c5e2fb03af7 AS builder
1+
FROM golang:1.23-alpine@sha256:04ec5618ca64098b8325e064aa1de2d3efbbd022a3ac5554d49d5ece99d41ad5 AS builder
22

33
WORKDIR /usr/src/app
44

@@ -11,7 +11,7 @@ COPY --chmod=644 crs.sh .
1111
RUN apk add bash git && \
1212
bash crs.sh Download
1313

14-
FROM golang:1.23-alpine@sha256:13aaa4b92fd4dc81683816b4b62041442e9f685deeb848897ce78c5e2fb03af7
14+
FROM golang:1.23-alpine@sha256:04ec5618ca64098b8325e064aa1de2d3efbbd022a3ac5554d49d5ece99d41ad5
1515

1616
COPY --from=builder --chown=0:0 /usr/local/bin/bw-coraza /usr/local/bin/bw-coraza
1717

crowdsec/jobs/crowdsec-conf.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
sys_path.append(deps_path)
1313

1414
from jinja2 import Environment, FileSystemLoader
15+
from common_utils import get_version # type: ignore
1516
from logger import setup_logger # type: ignore
1617
from jobs import Job # type: ignore
1718

@@ -36,7 +37,11 @@
3637
LOGGER.info("CrowdSec is not activated, skipping job...")
3738
sys_exit(status)
3839

39-
JOB = Job(LOGGER, __file__)
40+
bunkerweb_version_split = get_version().split(".")
41+
if len(bunkerweb_version_split) > 1 and int(bunkerweb_version_split[1]) < 6:
42+
JOB = Job(LOGGER)
43+
else:
44+
JOB = Job(LOGGER, __file__)
4045

4146
# Generate content
4247
jinja_env = Environment(loader=FileSystemLoader(PLUGIN_PATH.joinpath("misc")))

0 commit comments

Comments
 (0)