From 886fe3783d91bdb725f610528080b80af58e3f40 Mon Sep 17 00:00:00 2001 From: Tobias Trabelsi Date: Wed, 10 May 2023 10:35:00 +0200 Subject: [PATCH] fixed fields lookup update libcrypte and libssl --- Dockerfile | 3 ++- charts/bitwarden-crd-operator/Chart.yaml | 13 ++++++++----- example.yaml | 14 ++++++++++++++ src/utils/utils.py | 2 +- 4 files changed, 25 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1d321ec..94396a6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,6 +16,7 @@ LABEL org.opencontainers.image.licenses=MIT ARG PYTHON_VERSION=3.10.11-r0 ARG PIP_VERSION=22.3.1-r1 ARG GCOMPAT_VERSION=1.1.0-r0 +ARG LIBCRYPTO_VERSION=3.0.8-r4 COPY --from=builder /tmp/bw /usr/local/bin/bw COPY requirements.txt requirements.txt @@ -26,7 +27,7 @@ RUN set -eux; \ mkdir -p /home/bw-operator; \ chown -R bw-operator /home/bw-operator; \ chmod +x /usr/local/bin/bw; \ - apk add gcc musl-dev libstdc++ gcompat=${GCOMPAT_VERSION} python3=${PYTHON_VERSION} py3-pip=${PIP_VERSION}; \ + apk add gcc musl-dev libstdc++ gcompat=${GCOMPAT_VERSION} python3=${PYTHON_VERSION} py3-pip=${PIP_VERSION} libcrypto3=${LIBCRYPTO_VERSION} libssl3=${LIBCRYPTO_VERSION}; \ pip install -r requirements.txt --no-warn-script-location; \ apk del --purge gcc musl-dev libstdc++; diff --git a/charts/bitwarden-crd-operator/Chart.yaml b/charts/bitwarden-crd-operator/Chart.yaml index a5d280f..e848e47 100644 --- a/charts/bitwarden-crd-operator/Chart.yaml +++ b/charts/bitwarden-crd-operator/Chart.yaml @@ -4,9 +4,9 @@ description: Deploy the Bitwarden CRD Operator type: application -version: "v0.7.0" +version: "v0.7.1" -appVersion: "0.6.0" +appVersion: "0.6.1" keywords: - operator @@ -93,9 +93,12 @@ annotations: enabled: true artifacthub.io/license: MIT artifacthub.io/operator: "true" + artifacthub.io/containsSecurityUpdates: "true" artifacthub.io/changes: | - - kind: changed - description: "Use JSON output mode (--response) of Bitwarden CLI." + - kind: fixed + description: "Fixed fields lookup" + - kind: fixed + description: "Fixed CVE-2023-1255 in base image" artifacthub.io/images: | - name: bitwarden-crd-operator - image: ghcr.io/lerentis/bitwarden-crd-operator:0.6.0 + image: ghcr.io/lerentis/bitwarden-crd-operator:0.6.1 diff --git a/example.yaml b/example.yaml index a6e789e..77cc22b 100644 --- a/example.yaml +++ b/example.yaml @@ -15,4 +15,18 @@ spec: secretScope: login id: "88781348-c81c-4367-9801-550360c21295" name: "test-secret" + namespace: "default" +--- +apiVersion: "lerentis.uploadfilter24.eu/v1beta4" +kind: BitwardenSecret +metadata: + name: test-scope +spec: + content: + - element: + secretName: public_key + secretRef: pubKey + secretScope: fields + id: "466fc4b0-ffca-4444-8d88-b59d4de3d928" + name: "test-scope" namespace: "default" \ No newline at end of file diff --git a/src/utils/utils.py b/src/utils/utils.py index 62ad8a6..f18adf7 100644 --- a/src/utils/utils.py +++ b/src/utils/utils.py @@ -46,7 +46,7 @@ def parse_login_scope(secret_json, key): def parse_fields_scope(secret_json, key): - if "fields" not in secret_json: + if "fields" not in secret_json["data"]: return None for entry in secret_json["data"]["fields"]: if entry['name'] == key: