Skip to content

Commit

Permalink
fix(security): vulnerabilities found in fabric2-all-in-one
Browse files Browse the repository at this point in the history
Fixes hyperledger-cacti#2057

Signed-off-by: zondervancalvez <[email protected]>
  • Loading branch information
zondervancalvez committed Aug 15, 2023
1 parent 3a58508 commit a3f9b14
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ describe(testCase, () => {
const assets = JSON.parse(res.data.functionOutput);
const asset277 = assets.find((c: { ID: string }) => c.ID === assetId);
expect(asset277).toBeTruthy();
expect(asset277.owner).toBeTruthy();
expect(asset277.owner).toEqual(assetOwner);
expect(asset277.Owner).toBeTruthy();
expect(asset277.Owner).toEqual(assetOwner);
}

{
Expand Down Expand Up @@ -302,8 +302,8 @@ describe(testCase, () => {
const assets = JSON.parse(res.data.functionOutput);
const asset277 = assets.find((c: { ID: string }) => c.ID === assetId);
expect(asset277).toBeTruthy();
expect(asset277.owner).toBeTruthy();
expect(asset277.owner).toEqual(assetOwner);
expect(asset277.Owner).toBeTruthy();
expect(asset277.Owner).toEqual(assetOwner);
}
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ test("run-transaction-with-identities", async (t: Test) => {
});
t.true(resp.success);
const asset = JSON.parse(resp.functionOutput);
t.equal(asset.owner, "client2");
t.equal(asset.Owner, "client2");
}
t.end();
});
Expand Down
26 changes: 21 additions & 5 deletions tools/docker/fabric-all-in-one/Dockerfile_v2.x
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,34 @@
# https://github.com/docker-library/docker/issues/170
FROM docker:24.0.5-dind

ARG FABRIC_VERSION=2.2.13
ARG FABRIC_NODEENV_VERSION=2.4.2
ARG CA_VERSION=1.4.9
ARG FABRIC_VERSION=2.4.4
ARG CA_VERSION=1.5.3
ARG COUCH_VERSION_FABRIC=0.4
ARG COUCH_VERSION=3.1.1
ARG COUCH_VERSION=3.2.2
ARG FABRIC_NODEENV_VERSION=2.4.2

WORKDIR /

RUN apk update && apk --no-cache upgrade openssh-client

# Install dependencies of Docker Compose
RUN apk add docker-cli docker-cli-compose
RUN apk add py-pip python3-dev libffi-dev openssl-dev gcc libc-dev make

# Install python/pip - We need this because DinD 18.x has Python 2
# And we cannot upgrade to DinD 19 because of
# https://github.com/docker-library/docker/issues/170
ENV PYTHONUNBUFFERED=1
RUN apk add --update --no-cache python3 && ln -sf python3 /usr/bin/python
RUN python3 -m ensurepip
RUN pip install --no-cache --upgrade --index-url=https://pypi.python.org/simple/ "pip>=21" setuptools

# Without this the docker-compose installation crashes, complaining about
# a lack of rust compiler...
# RUN pip install setuptools_rust
ENV CRYPTOGRAPHY_DONT_BUILD_RUST=1

# Install Docker Compose which is a dependency of Fabric Samples
RUN pip install docker-compose

# Need git to clone the sources of the Fabric Samples repository from GitHub
RUN apk add --no-cache git
Expand Down

0 comments on commit a3f9b14

Please sign in to comment.