-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue 168 vulnerability checks (#183)
* Update plugin to latest to get vunerability analysis checks * Bumped alpine version to latest stable. * Updated Imagemagick to latest * Fix for java-jna package discontinued for aarch64 * Added link to aports issue that requires custom build of java-jna * Generate grype reports on pushs as well as pull requests. * Updated fits to latest to get security updates. * Added ability to ignore specific vulnerabilities, while a fix is not availiable. * Updated tomcat to latest * Documented additional flag for grype * Made alpine version a argument. Co-authored-by: Nigel Banks <[email protected]:w>
- Loading branch information
1 parent
51a6b09
commit 2ee80c7
Showing
30 changed files
with
456 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
plugins { | ||
id("com.github.nigelgbanks.IsleDocker") version "0.7" | ||
id("com.github.nigelgbanks.IsleDocker") version "0.9" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
# syntax=docker/dockerfile:1.2.1 | ||
ARG repository=local | ||
ARG tag=latest | ||
ARG alpine=3.15.0 | ||
FROM --platform=$BUILDPLATFORM ${repository}/download:${tag} AS download | ||
|
||
RUN --mount=type=cache,id=fits-downloads,sharing=locked,target=/opt/downloads \ | ||
|
@@ -10,10 +11,10 @@ RUN --mount=type=cache,id=fits-downloads,sharing=locked,target=/opt/downloads \ | |
FITSSERVLET_SHA256="13cfcb910092b197757e459353f0c30381febfca6baf3031ac69ff92789b200c" && \ | ||
download.sh --url "${FITSSERVLET_URL}" --sha256 "${FITSSERVLET_SHA256}" "${DOWNLOAD_CACHE_DIRECTORY}" && \ | ||
install-war-into-tomcat.sh --name "fits" --file "${DOWNLOAD_CACHE_DIRECTORY}/${FITSSERVLET_FILE}" && \ | ||
FITS_VERSION="1.5.0" && \ | ||
FITS_VERSION="1.5.1" && \ | ||
FITS_FILE="fits-${FITS_VERSION}.zip" && \ | ||
FITS_URL="https://github.com/harvard-lts/fits/releases/download/${FITS_VERSION}/${FITS_FILE}" \ | ||
FITS_SHA256="1378a78892db103b3a00e45c510b58c70e19a1a401b3720ff4d64a51438bfe0b" && \ | ||
FITS_SHA256="4bf4adfedf0779221cc2f4648f5dfd3040c7a3e5daa4060c5754d73dc1964442" && \ | ||
mkdir /opt/fits && \ | ||
download.sh --url "${FITS_URL}" --sha256 "${FITS_SHA256}" "${DOWNLOAD_CACHE_DIRECTORY}" && \ | ||
unzip "${DOWNLOAD_CACHE_DIRECTORY}/${FITS_FILE}" -d /opt/fits && \ | ||
|
@@ -24,9 +25,43 @@ RUN --mount=type=cache,id=fits-downloads,sharing=locked,target=/opt/downloads \ | |
/opt/fits/tools/file_utility_windows \ | ||
/opt/fits/tools/mediainfo | ||
|
||
FROM alpine:3.13.2 AS cache | ||
# Onces this https://gitlab.alpinelinux.org/alpine/aports/-/issues/13495 is resolved we can remove this build step. | ||
FROM ${repository}/abuild:${tag} AS build | ||
|
||
RUN --mount=type=cache,id=imagemagick-apk,sharing=locked,from=cache,target=/var/cache/apk \ | ||
apk add \ | ||
apache-ant \ | ||
autoconf \ | ||
automake \ | ||
libffi-dev \ | ||
libtool \ | ||
openjdk8 | ||
|
||
COPY /build /build | ||
|
||
WORKDIR /build | ||
|
||
RUN chown -R builder /build | ||
|
||
USER builder | ||
|
||
RUN export PACKAGER="Nigel Banks <[email protected]>" && \ | ||
abuild-keygen -ain && \ | ||
abuild-apk update && \ | ||
abuild | ||
|
||
USER root | ||
|
||
RUN cp -r /home/builder/packages/* /packages | ||
|
||
FROM alpine:${alpine} AS cache | ||
FROM ${repository}/tomcat:${tag} | ||
|
||
RUN --mount=type=bind,from=build,source=/packages,target=/packages \ | ||
--mount=type=bind,from=build,source=/etc/apk/keys,target=/etc/apk/keys \ | ||
apk add /packages/java-jna-*.apk && \ | ||
cleanup.sh | ||
|
||
COPY --from=download --chown=tomcat:tomcat /opt/tomcat /opt/tomcat | ||
COPY --from=download --chown=tomcat:tomcat /opt/fits /opt/fits | ||
|
||
|
@@ -35,7 +70,6 @@ COPY --from=download --chown=tomcat:tomcat /opt/fits /opt/fits | |
RUN --mount=type=cache,id=fits-apk,sharing=locked,from=cache,target=/var/cache/apk \ | ||
apk add \ | ||
file \ | ||
java-jna \ | ||
libmediainfo \ | ||
libzen \ | ||
perl \ | ||
|
Oops, something went wrong.