Skip to content

Commit

Permalink
build(connector-besu): fix CVE-2022-21190 CVE-2023-36665 CVE-2022-2421
Browse files Browse the repository at this point in the history
Primary Changes
----------------
1. Updated the version of the base image that is used in the Dockerfile
2. Updated the Dockerfile to use the yarn version 4
3. Updated the README to the new command to run the container

Fixes #2745

Signed-off-by: aldousalvarez <aldousss.alvarez@gmail.com>
  • Loading branch information
aldousalvarez authored and petermetz committed Jun 19, 2024
1 parent 03816d4 commit 79f30fd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
8 changes: 5 additions & 3 deletions packages/cactus-plugin-ledger-connector-besu/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
FROM ghcr.io/hyperledger/cactus-cmd-api-server:2022-08-05-7309f2a
RUN npm install -g yarn@1.22.17
FROM ghcr.io/hyperledger/cactus-cmd-api-server:2024-03-18-8ddc02d
RUN npm install -g yarn \
&& yarn set version 4.1.0 \
&& yarn config set nodeLinker node-modules

ENV NODE_ENV=production
ARG NPM_PKG_VERSION=latest

RUN yarn add @hyperledger/cactus-plugin-ledger-connector-besu@${NPM_PKG_VERSION} --production --ignore-engines
RUN yarn add @hyperledger/cactus-plugin-ledger-connector-besu@${NPM_PKG_VERSION} --exact
7 changes: 6 additions & 1 deletion packages/cactus-plugin-ledger-connector-besu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,12 @@ docker run \
--rm \
--publish 3000:3000 \
--publish 4000:4000 \
--env PLUGINS='[{"packageName": "@hyperledger/cactus-plugin-ledger-connector-besu", "type": "org.hyperledger.cactus.plugin_import_type.LOCAL", "action": "org.hyperledger.cactus.plugin_import_action.INSTALL", "options": {"rpcApiHttpHost": "http://localhost:8545", "rpcApiWsHost":"ws://localhost:8546", "instanceId": "some-unique-besu-connector-instance-id"}}]' \
--env AUTHORIZATION_PROTOCOL='NONE' \
--env AUTHORIZATION_CONFIG_JSON='{}' \
--env GRPC_TLS_ENABLED=false \
cplcb \
node_modules/@hyperledger/cactus-cmd-api-server/dist/lib/main/typescript/cmd/cactus-api.js \
--plugins='[{"packageName": "@hyperledger/cactus-plugin-ledger-connector-besu", "type": "org.hyperledger.cactus.plugin_import_type.LOCAL", "action": "org.hyperledger.cactus.plugin_import_action.INSTALL", "options": {"rpcApiHttpHost": "http://localhost:8545", "rpcApiWsHost":"ws://localhost:8546", "instanceId": "some-unique-besu-connector-instance-id"}}]' \
cplcb
```

Expand Down

0 comments on commit 79f30fd

Please sign in to comment.