-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'RedHatInsights:master' into update-postgresql-rds-image
- Loading branch information
Showing
9 changed files
with
2,342 additions
and
1,520 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
# The default values used in the docker build commands are the root | ||
# directory '.' and the dockerfile name of 'Dockerfile'. If there is | ||
# a need to change these do so in your local workflow template (this file) and | ||
# change them there. HINT: Look at the bottom of this file. | ||
|
||
# This workflow checks out code, builds an image, performs a container image | ||
# vulnerability scan with Anchore's Grype tool, and generates an | ||
# SBOM via Anchore's Syft tool | ||
|
||
# For more information on Anchore's container image scanning tool Grype, see | ||
# https://github.com/anchore/grype | ||
|
||
# For more information about the Anchore SBOM tool, Syft, see | ||
# https://github.com/anchore/syft | ||
|
||
name: ConsoleDot Platform Security Scan | ||
|
||
on: | ||
push: | ||
branches: [ "main", "master" ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ "main", "master" ] | ||
|
||
jobs: | ||
PlatSec-Security-Workflow: | ||
uses: RedHatInsights/platform-security-gh-workflow/.github/workflows/platsec-security-scan-reusable-workflow.yml@master | ||
## The optional parameters below are used if you are using something other than the | ||
## the defaults of root '.' for the path and 'Dockerfile' for the Dockerfile name. | ||
## Additionally, if you have a Dockerfile you use as your BASE_IMG or you need to | ||
## use '--build-arg', those can be define below as well. | ||
|
||
with: | ||
# dockerbuild_path: './buildtest' | ||
dockerfile_path: './build' | ||
dockerfile_name: 'Dockerfile' | ||
# base_image_build: true | ||
# base_dockerbuild_path: './testbuild.base' | ||
# base_dockerfile_path: './test' | ||
# base_dockerfile_name: 'Dockerfile.base' | ||
# build_arg: '--build-arg BASE_IMAGE="localbuild/baseimage:latest"' | ||
# only_fixed: true | ||
# fail_on_vulns: true | ||
# severity_fail_cutoff: high |
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 |
---|---|---|
|
@@ -4,3 +4,4 @@ node_modules | |
sonar-scanner.properties | ||
.scannerwork/ | ||
artifacts | ||
.npm |
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,27 +1,37 @@ | ||
|
||
#----------------------- base ----------------------- | ||
|
||
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.9-1137 AS base | ||
|
||
WORKDIR /opt/app-root/src | ||
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.10-1018 AS base | ||
|
||
RUN microdnf module enable nodejs:16 && \ | ||
RUN microdnf module enable nodejs:20 && \ | ||
microdnf install -y nodejs --nodocs && \ | ||
microdnf clean all | ||
|
||
#--------------------- packages --------------------- | ||
ENV APP_ROOT=/opt/app-root/src | ||
WORKDIR $APP_ROOT | ||
RUN mkdir -p $APP_ROOT/.npm/{_logs,_cacache} && chgrp -R 0 $APP_ROOT && chmod -R ug+rwX $APP_ROOT | ||
|
||
RUN npm install -g [email protected] | ||
|
||
USER 1001 | ||
|
||
# make npm happy.... | ||
ENV HOME=$APP_ROOT | ||
|
||
#-------------------- packages ---------------------- | ||
|
||
FROM base AS packages | ||
|
||
COPY package.json package-lock.json ./ | ||
COPY ./test ./test | ||
COPY package.json package-lock.json knexfile.js ./ | ||
|
||
#----------------------- test ----------------------- | ||
|
||
FROM packages AS test | ||
|
||
RUN npm ci | ||
COPY jest.config.js tsconfig.json ./ | ||
COPY ./src ./src | ||
|
||
COPY . . | ||
RUN npm ci | ||
|
||
RUN npm run compile | ||
|
||
|
@@ -31,12 +41,10 @@ ENV NODE_ENV=test | |
|
||
FROM packages AS dist | ||
|
||
RUN npm ci --omit=dev | ||
COPY --from=test $APP_ROOT/dist ./dist | ||
|
||
COPY --from=test /opt/app-root/src/dist/package.json ./dist/ | ||
COPY --from=test /opt/app-root/src/dist/src ./dist/src | ||
RUN npm ci --omit=dev && npm cache clean --force | ||
|
||
USER 1001 | ||
EXPOSE 9006 | ||
|
||
ENV NODE_ENV=production | ||
|
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
Oops, something went wrong.