Skip to content

Commit 66735ca

Browse files
author
Owen Jones
committed
Updates to platform-image-builder needed for webgoat demo
1 parent eaf7f22 commit 66735ca

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

platform-image-builder/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ RUN apt-get install -y cmake g++ flex bison doxygen patch python3
99

1010
ADD build-security-analyzer.sh /build-security-analyzer.sh
1111

12-
ENTRYPOINT bash /build-security-analyzer.sh
12+
ENTRYPOINT ["/build-security-analyzer.sh"]

platform-image-builder/README

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ expected by Diffblue's platform and export a tarball suitable for building the
33
security scanner platform image.
44

55
Pre-requisite: the deeptest-base Docker image must be available to build
6-
against. If it isn't already present (try
7-
`docker image inspect eu.gcr.io/diffblue-cr/deeptest-base`),
8-
build it by:
6+
against. If it isn't already present, i.e.
7+
`docker image inspect eu.gcr.io/diffblue-cr/deeptest-base` does not give any
8+
output, build it by:
99

1010
$ git clone https://github.com/diffblue/platform
1111
$ cd platform/docker/docker-jobs
@@ -17,6 +17,8 @@ $ cd $REPO_ROOT/platform-image-builder
1717
$ mkdir -p /tmp/output-dir # for example
1818
$ ./make-security-release.sh /tmp/output-dir [branch-or-commit]
1919

20+
'branch-or-commit' refers to the github repository, not your local repository.
21+
2022
If 'branch-or-commit' is not specified we'll build a release tarball from the
2123
tip of 'develop'.
2224

platform-image-builder/build-security-analyzer.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/bin/sh
2+
13
# Runs inside the security-analyzer-builder container.
24

35
set -e
@@ -9,9 +11,9 @@ fi
911

1012
cd /
1113
git clone [email protected]:diffblue/security-scanner
12-
if [ $# -eq 1 ]; then git checkout $1; fi
1314

1415
cd security-scanner
16+
if [ $# -eq 1 ]; then git checkout $1; fi
1517
git submodule update --init
1618

1719
mkdir build
@@ -28,6 +30,7 @@ mkdir /tmp/release/lib
2830
cp dist/lib/libboost* /tmp/release/lib/
2931
cp -r dist/lib/driver/*.py /tmp/release
3032
cp src/java-class-info/default_config.json /tmp/release
33+
cp benchmarks/LIBRARIES/models/model/target/models.jar /tmp/release
3134

3235
cd /tmp/release
3336
tar cvzf /output/release.tar.gz .

platform-image-builder/make-security-release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ if [ $# -lt 1 ]; then
1010
exit 1
1111
fi
1212

13-
docker image inspect security-analyzer-builder:latest >/dev/null 2>&1 || ./create-builder-image.sh
13+
./create-builder-image.sh
1414

1515
mkdir -p $1
1616

0 commit comments

Comments
 (0)