Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
ec70539
Migration To docker/build-push-action@v2 parser
nigthknight Dec 29, 2020
49d437f
Encapsulate Docker Namespace in GitHub Secret
nigthknight Dec 30, 2020
87f255a
Add hook-sdk To New CI
nigthknight Dec 30, 2020
5d76c12
Reformat File
nigthknight Dec 30, 2020
925c8c2
Fix Spelling Error For hook-sdk Build
nigthknight Dec 30, 2020
7007525
Fix Filepath for hook-sdk Image Build
nigthknight Dec 30, 2020
b3f1c94
Reformat CI To Improve Readability
nigthknight Dec 30, 2020
3905906
Add Image Build For Operator
nigthknight Dec 30, 2020
557a399
Add Lurcher Image Build
nigthknight Dec 30, 2020
3b2706d
Fix Syntax For Operator and Lurcher Build
nigthknight Dec 30, 2020
94b3162
Change Job Name To Be Consistent
nigthknight Dec 30, 2020
6085633
Fix Spelling for Actions
nigthknight Dec 30, 2020
334ee2a
Add Step ID For Operator and Lurker Build
nigthknight Dec 30, 2020
7bf564a
Add Hook Build for Two Hooks for Testing
nigthknight Dec 30, 2020
79b6f3e
Require hook-sdk job for Hook build matrix
nigthknight Dec 30, 2020
f19d14b
Add Matrix Build for two Parsers to test
nigthknight Dec 30, 2020
1ded6ab
Merge Operator And Lurcher Build in Build Matrix
nigthknight Jan 4, 2021
87bb8a5
Add Unit Tests for Python Code
nigthknight Jan 4, 2021
69dfb9a
Add JavaScript Unit Tests
nigthknight Jan 4, 2021
48f9cf1
Merge SDK Builds in Matrix Build
nigthknight Jan 4, 2021
3e7be79
Add Scanner Build For Two Scanners For Testing
nigthknight Jan 4, 2021
adcc26c
Make Scanner Build depend on Unit Tests
nigthknight Jan 4, 2021
4493e13
Add Build For Nikto Scanner
nigthknight Jan 4, 2021
b38d47a
Add First Integration Tests for Testing CI
nigthknight Jan 11, 2021
9fc5cba
Add Remaining Hooks To Docker Image Build
nigthknight Jan 13, 2021
565d2ad
Add Remaining Parser Image Builds
nigthknight Jan 13, 2021
047d936
Reformat CI
nigthknight Jan 13, 2021
638feaa
Add Remaining Scanner Image Builds
nigthknight Jan 13, 2021
72c93e2
Rename Jobs To Clarify Purpose
nigthknight Jan 13, 2021
cd7e06d
Add Integration Tests For Remaining Scanner
nigthknight Jan 13, 2021
434d3c6
Add Cascading Tests And Debug Steps
nigthknight Jan 13, 2021
e760130
Temporarily Disable Kubeaudit
nigthknight Jan 13, 2021
2061112
Fix Scanner Images In Integration Tests
nigthknight Jan 13, 2021
4275086
Revert "Temporarily Disable Kubeaudit"
nigthknight Jan 18, 2021
18e380d
Temporarily Disable Kubeaudit Integration Tests
nigthknight Jan 18, 2021
a009ec7
Remove Unused Env Vars In CI
nigthknight Jan 18, 2021
6a05387
Remove `latest` Tag For Scanner Build On push
nigthknight Jan 18, 2021
7464f7b
Split Scanner Image Build In Custom + Third Party
nigthknight Jan 18, 2021
7d649c9
Fix Prefix For Parser Images
nigthknight Jan 20, 2021
672bf57
Read Scanner Version From Chart.yaml
nigthknight Jan 25, 2021
0c5a2a6
Simple Reformat Without Any Changes
nigthknight Jan 25, 2021
ca5669f
Rename Some Jobs For Readability
nigthknight Jan 25, 2021
7cc0bf1
Pin Scanner Versions
nigthknight Jan 25, 2021
c692e31
Merge remote-tracking branch 'upstream/main' into update/ci
nigthknight Jan 25, 2021
14dedd1
Revert "Temporarily Disable Kubeaudit Integration Tests"
nigthknight Jan 25, 2021
7e79629
Pin Kubeaudit Version To Current Commit
nigthknight Jan 25, 2021
4a48540
Use Commit Hash As Base Image Tag
nigthknight Jan 25, 2021
fe74b97
Fix Image Prefix For kube-audit
nigthknight Jan 25, 2021
017bdca
Fix Env Var Syntax
nigthknight Jan 25, 2021
999a550
Introduce Build Arg To Fix Wrong Docker Namespace
nigthknight Jan 25, 2021
e5f7bc0
Fix Image Names For Kubeaudit Scanner And Parser
nigthknight Jan 27, 2021
3862bd5
Remove Line To make Linter Happy
nigthknight Jan 27, 2021
beb1769
Update Contributing Page For new CI
nigthknight Jan 27, 2021
f2c6214
Include kubeaudit In Parser Build
nigthknight Jan 27, 2021
909635c
Read Docker Namespace From Secret
nigthknight Jan 27, 2021
db0da34
Rename ENV DOCKER_PASSWORD -> DOCKER_TOKEN
nigthknight Jan 27, 2021
9d35f35
Enable All Supported Kubernetes Versions In CI
nigthknight Jan 27, 2021
cd25367
Move Codeclimate ID into secrets; Enable unit Test
nigthknight Jan 27, 2021
5b6a40d
Add Description for Codeclimate ID to Contributing
nigthknight Jan 27, 2021
45172eb
Use YAML Lists To resolve Review Issues
nigthknight Jan 27, 2021
e13d10d
Use yq To Parse Scanner Version From Chart.yaml
nigthknight Jan 28, 2021
1f0dad7
Simple Reformatting Without Functional Changes
nigthknight Jan 28, 2021
ec4e8bc
Merge branch 'main' into update/ci
J12934 Feb 8, 2021
4481372
Update teams webhook image for new build infrastructure
J12934 Feb 8, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
994 changes: 571 additions & 423 deletions .github/workflows/ci.yaml

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,3 @@ enforcement ladder](https://github.com/mozilla/diversity).
For answers to common questions about this code of conduct, see the FAQ at
<https://www.contributor-covenant.org/faq>. Translations are available at
<https://www.contributor-covenant.org/translations>.

14 changes: 12 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,18 @@ TL;DR

## Working with Forks and Pull Requests

Our current continuous integration workflow makes it very hard to work on own forks of the _secureCodeBox_ because CI tests cannot be executed outside of our repository. We are aware of that problem and are working on a solution.
If you want to contribute you will need to fork the project.
To enable the use of our CI Pipeline you will need to add these GitHub secrets:

| Secret | Usage |
|------------------|--------|
| DOCKER_NAMESPACE | This is the namespace for the docker images. For the main repository this is *securecodebox*. On you fork this is probably your Docker user |
| DOCKER_USERNAME | This is the username that is used to push the Docker images |
| DOCKER_TOKEN | This is the Token that enables the CI to push |
| CC_TEST_REPORTER_ID | Your Codeclimate ID (optional) |

If you want early feedback feel free to open a *Draft Pull Request*.
When you are done, you can convert it to a standard *Pull Request* (or create one if you did not create a *Draft Pull Request*).

Generally the _secureCodeBox_ project follows the standard [GitHub Pull request process](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests).

Expand Down Expand Up @@ -67,4 +78,3 @@ NOTE: Make sure you don't include `@mentions` or `fixes` keywords in your git co
## Code of Conduct

Please have a look at our [Code of Conduct](./CODE_OF_CONDUCT.md) before you write an Issue or make a PR.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ secureCodeBox is an official [OWASP][owasp] project.
## Contributing

Contributions are welcome and extremely helpful 🙌
Please have a look at [Contributing](./CONTRIBUTING.md)

## Author Information

Expand Down
3 changes: 2 additions & 1 deletion hooks/declarative-subsequent-scans/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
ARG namespace
ARG baseImageTag
FROM node:12-alpine as install
RUN mkdir -p /home/app
Expand All @@ -13,7 +14,7 @@ RUN npm ci
COPY hook.ts scan-helpers.ts kubernetes-label-selector.ts ./
RUN npm run build

FROM securecodebox/hook-sdk-nodejs:${baseImageTag:-latest}
FROM ${namespace:-securecodebox}/hook-sdk-nodejs:${baseImageTag:-latest}
WORKDIR /home/app/hook-wrapper/hook/
COPY --from=install --chown=app:app /home/app/node_modules/ ./node_modules/
COPY --from=build --chown=app:app /home/app/hook.js /home/app/hook.js.map /home/app/scan-helpers.js /home/app/scan-helpers.js.map /home/app/kubernetes-label-selector.js /home/app/kubernetes-label-selector.js.map ./
3 changes: 2 additions & 1 deletion hooks/finding-post-processing/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.

ARG namespace
ARG baseImageTag
FROM node:12-alpine as build
RUN mkdir -p /home/app
WORKDIR /home/app
COPY package.json package-lock.json ./
RUN npm ci --production

FROM securecodebox/hook-sdk-nodejs:${baseImageTag:-latest}
FROM ${namespace:-securecodebox}/hook-sdk-nodejs:${baseImageTag:-latest}
WORKDIR /home/app/hook-wrapper/hook/
COPY --from=build --chown=app:app /home/app/node_modules/ ./node_modules/
COPY --chown=app:app ./hook.js ./hook.js
3 changes: 2 additions & 1 deletion hooks/generic-webhook/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
ARG namespace
ARG baseImageTag
FROM node:12-alpine as build
RUN mkdir -p /home/app
WORKDIR /home/app
COPY package.json package-lock.json ./
RUN npm ci --production

FROM securecodebox/hook-sdk-nodejs:${baseImageTag:-latest}
FROM ${namespace:-securecodebox}/hook-sdk-nodejs:${baseImageTag:-latest}
WORKDIR /home/app/hook-wrapper/hook/
COPY --from=build --chown=app:app /home/app/node_modules/ ./node_modules/
COPY --chown=app:app ./hook.js ./hook.js
3 changes: 2 additions & 1 deletion hooks/persistence-elastic/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
ARG namespace
ARG baseImageTag
FROM node:12-alpine as build
RUN mkdir -p /home/app
WORKDIR /home/app
COPY package.json package-lock.json ./
RUN npm ci --production

FROM securecodebox/hook-sdk-nodejs:${baseImageTag:-latest}
FROM ${namespace:-securecodebox}/hook-sdk-nodejs:${baseImageTag:-latest}
WORKDIR /home/app/hook-wrapper/hook/
COPY --from=build --chown=app:app /home/app/node_modules/ ./node_modules/
COPY --chown=app:app ./hook.js ./hook.js
3 changes: 2 additions & 1 deletion hooks/teams-webhook/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.

ARG namespace
ARG baseImageTag
FROM node:12-alpine as build
RUN mkdir -p /home/app
WORKDIR /home/app
COPY package.json package-lock.json ./
RUN npm ci --production

FROM securecodebox/hook-sdk-nodejs:${baseImageTag:-latest}
FROM ${namespace:-securecodebox}/hook-sdk-nodejs:${baseImageTag:-latest}
WORKDIR /home/app/hook-wrapper/hook/
COPY --from=build --chown=app:app /home/app/node_modules/ ./node_modules/
COPY --chown=app:app ./hook.js ./hook.js
Expand Down
3 changes: 2 additions & 1 deletion hooks/update-field/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
ARG namespace
ARG baseImageTag
FROM node:12-alpine as build
RUN mkdir -p /home/app
WORKDIR /home/app
COPY package.json package-lock.json ./
RUN npm ci --production

FROM securecodebox/hook-sdk-nodejs:${baseImageTag:-latest}
FROM ${namespace:-securecodebox}/hook-sdk-nodejs:${baseImageTag:-latest}
WORKDIR /home/app/hook-wrapper/hook/
COPY --from=build --chown=app:app /home/app/node_modules/ ./node_modules/
COPY --chown=app:app ./hook.js ./hook.js
3 changes: 2 additions & 1 deletion scanners/amass/parser/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ARG namespace
ARG baseImageTag
FROM securecodebox/parser-sdk-nodejs:${baseImageTag:-latest}
FROM ${namespace:-securecodebox}/parser-sdk-nodejs:${baseImageTag:-latest}
WORKDIR /home/app/parser-wrapper/parser/
COPY --chown=app:app ./parser.js ./parser.js
3 changes: 2 additions & 1 deletion scanners/git-repo-scanner/parser/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ARG namespace
ARG baseImageTag
FROM securecodebox/parser-sdk-nodejs:${baseImageTag:-latest}
FROM ${namespace:-securecodebox}/parser-sdk-nodejs:${baseImageTag:-latest}
WORKDIR /home/app/parser-wrapper/parser/
COPY --chown=app:app ./parser.js ./parser.js
3 changes: 2 additions & 1 deletion scanners/gitleaks/parser/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
ARG namespace
ARG baseImageTag
FROM node:12-alpine as build
RUN mkdir -p /home/app
WORKDIR /home/app
COPY package.json package-lock.json ./
RUN npm ci --production

FROM securecodebox/parser-sdk-nodejs:${baseImageTag:-latest}
FROM ${namespace:-securecodebox}/parser-sdk-nodejs:${baseImageTag:-latest}
WORKDIR /home/app/parser-wrapper/parser/
COPY --from=build --chown=app:app /home/app/node_modules/ ./node_modules/
COPY --chown=app:app ./parser.js ./parser.js
3 changes: 2 additions & 1 deletion scanners/gitleaks/scanner/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
FROM zricethezav/gitleaks:v6.1.2
ARG scannerVersion=latest
FROM zricethezav/gitleaks:${scannerVersion}
COPY wrapper.sh /wrapper.sh
ENTRYPOINT [ "sh", "/wrapper.sh" ]
2 changes: 1 addition & 1 deletion scanners/kube-hunter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: A Helm chart for the kube-hunter security scanner that integrates w
type: application
# version - gets automatically set to the secureCodeBox release version when the helm charts gets published
version: latest
appVersion: "0.3.0"
appVersion: 0.3.0
kubeVersion: ">=v1.11.0-0"

keywords:
Expand Down
3 changes: 2 additions & 1 deletion scanners/kube-hunter/parser/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ARG namespace
ARG baseImageTag
FROM securecodebox/parser-sdk-nodejs:${baseImageTag:-latest}
FROM ${namespace:-securecodebox}/parser-sdk-nodejs:${baseImageTag:-latest}
WORKDIR /home/app/parser-wrapper/parser/
COPY --chown=app:app ./parser.js ./parser.js
5 changes: 3 additions & 2 deletions scanners/kube-hunter/scanner/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
FROM aquasec/kube-hunter:0.3.0
ARG scannerVersion=latest
FROM aquasec/kube-hunter:${scannerVersion}
COPY wrapper.sh /wrapper.sh
ENTRYPOINT [ "sh", "/wrapper.sh" ]
ENTRYPOINT [ "sh", "/wrapper.sh" ]
2 changes: 1 addition & 1 deletion scanners/kubeaudit/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: A Helm chart for the kubeaudit security scanner that integrates wit

type: application
version: latest
appVersion: "v0.11.5"
appVersion: v0.11.5
kubeVersion: ">=v1.11.0-0"

keywords:
Expand Down
3 changes: 2 additions & 1 deletion scanners/kubeaudit/parser/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ARG namespace
ARG baseImageTag
FROM securecodebox/parser-sdk-nodejs:${baseImageTag:-latest}
FROM ${namespace:-securecodebox}/parser-sdk-nodejs:${baseImageTag:-latest}
WORKDIR /home/app/parser-wrapper/parser/
COPY --chown=app:app ./parser.js ./parser.js
4 changes: 2 additions & 2 deletions scanners/kubeaudit/scanner/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
FROM golang:1.15.1 AS builder
ARG scannerVersion=latest

# no need to include cgo bindings
ENV CGO_ENABLED=0 GOOS=linux GOARCH=amd64

# this is where we build our app
WORKDIR /go/src/app/

ARG version
RUN git clone --depth 1 --branch $version https://github.com/Shopify/kubeaudit.git /go/src/app/
RUN git clone --depth 1 --branch $scannerVersion https://github.com/Shopify/kubeaudit.git /go/src/app/
RUN go mod download

RUN go build -a -ldflags '-w -s -extldflags "-static"' -o /go/bin/kubeaudit ./cmd/ \
Expand Down
3 changes: 2 additions & 1 deletion scanners/ncrack/parser/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
ARG namespace
ARG baseImageTag
FROM node:12-alpine as build
RUN mkdir -p /home/app
WORKDIR /home/app
COPY package.json package-lock.json ./
RUN npm ci --production

FROM securecodebox/parser-sdk-nodejs:${baseImageTag:-latest}
FROM ${namespace:-securecodebox}/parser-sdk-nodejs:${baseImageTag:-latest}
WORKDIR /home/app/parser-wrapper/parser/
COPY --from=build --chown=app:app /home/app/node_modules/ ./node_modules/
COPY --chown=app:app ./parser.js ./parser.js
3 changes: 2 additions & 1 deletion scanners/ncrack/scanner/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
FROM ubuntu:20.04
ARG scannerVersion=latest

RUN apt-get update \
&& apt-get install ncrack=0.7+debian-1build1 -y \
&& apt-get install ncrack=$scannerVersion+debian-1build1 -y \
&& rm -rf /var/lib/apt/lists/*

CMD [ "ncrack" ]
Expand Down
3 changes: 2 additions & 1 deletion scanners/nikto/parser/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ARG namespace
ARG baseImageTag
FROM securecodebox/parser-sdk-nodejs:${baseImageTag:-latest}
FROM ${namespace:-securecodebox}/parser-sdk-nodejs:${baseImageTag:-latest}
WORKDIR /home/app/parser-wrapper/parser/
COPY --chown=app:app ./parser.js ./parser.js
4 changes: 2 additions & 2 deletions scanners/nikto/scanner/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM sullo/nikto
FROM localhost:5000/sullo/nikto
COPY wrapper.sh /wrapper.sh
ENTRYPOINT [ "sh", "/wrapper.sh" ]
ENTRYPOINT [ "sh", "/wrapper.sh" ]
3 changes: 2 additions & 1 deletion scanners/nmap/parser/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
ARG namespace
ARG baseImageTag
FROM node:12-alpine as build
RUN mkdir -p /home/app
WORKDIR /home/app
COPY package.json package-lock.json ./
RUN npm ci --production

FROM securecodebox/parser-sdk-nodejs:${baseImageTag:-latest}
FROM ${namespace:-securecodebox}/parser-sdk-nodejs:${baseImageTag:-latest}
WORKDIR /home/app/parser-wrapper/parser/
COPY --from=build --chown=app:app /home/app/node_modules/ ./node_modules/
COPY --chown=app:app ./parser.js ./parser.js
3 changes: 2 additions & 1 deletion scanners/nmap/scanner/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM alpine:3.12
RUN apk add --no-cache nmap=7.80-r2 nmap-scripts=7.80-r2
ARG scannerVersion=latest
RUN apk add --no-cache nmap=$scannerVersion nmap-scripts=$scannerVersion
RUN addgroup --system --gid 1001 nmap && adduser nmap --system --uid 1001 --ingroup nmap
USER 1001
CMD [nmap]
3 changes: 2 additions & 1 deletion scanners/screenshooter/parser/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ARG namespace
ARG baseImageTag
FROM securecodebox/parser-sdk-nodejs:${baseImageTag:-latest}
FROM ${namespace:-securecodebox}/parser-sdk-nodejs:${baseImageTag:-latest}
WORKDIR /home/app/parser-wrapper/parser/
COPY --chown=app:app ./parser.js ./parser.js
3 changes: 2 additions & 1 deletion scanners/ssh_scan/parser/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ARG namespace
ARG baseImageTag
FROM securecodebox/parser-sdk-nodejs:${baseImageTag:-latest}
FROM ${namespace:-securecodebox}/parser-sdk-nodejs:${baseImageTag:-latest}
WORKDIR /home/app/parser-wrapper/parser/
COPY --chown=app:app ./parser.js ./parser.js
3 changes: 2 additions & 1 deletion scanners/sslyze/parser/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
ARG namespace
ARG baseImageTag
FROM node:12-alpine as build
RUN mkdir -p /home/app
WORKDIR /home/app
COPY package.json package-lock.json ./
RUN npm ci --production

FROM securecodebox/parser-sdk-nodejs:${baseImageTag:-latest}
FROM ${namespace:-securecodebox}/parser-sdk-nodejs:${baseImageTag:-latest}
WORKDIR /home/app/parser-wrapper/parser/
COPY --from=build --chown=app:app /home/app/node_modules/ ./node_modules/
COPY --chown=app:app ./parser.js ./parser.js
3 changes: 2 additions & 1 deletion scanners/test-scan/parser/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ARG namespace
ARG baseImageTag
FROM securecodebox/parser-sdk-nodejs:${baseImageTag:-latest}
FROM ${namespace:-securecodebox}/parser-sdk-nodejs:${baseImageTag:-latest}
WORKDIR /home/app/parser-wrapper/parser/
COPY --chown=app:app ./parser.js ./parser.js
3 changes: 2 additions & 1 deletion scanners/trivy/parser/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ARG namespace
ARG baseImageTag
FROM securecodebox/parser-sdk-nodejs:${baseImageTag:-latest}
FROM ${namespace:-securecodebox}/parser-sdk-nodejs:${baseImageTag:-latest}
WORKDIR /home/app/parser-wrapper/parser/
COPY --chown=app:app ./parser.js ./parser.js
3 changes: 2 additions & 1 deletion scanners/wpscan/parser/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ARG namespace
ARG baseImageTag
FROM securecodebox/parser-sdk-nodejs:${baseImageTag:-latest}
FROM ${namespace:-securecodebox}/parser-sdk-nodejs:${baseImageTag:-latest}
WORKDIR /home/app/parser-wrapper/parser/
COPY --chown=app:app ./parser.js ./parser.js
3 changes: 2 additions & 1 deletion scanners/zap/parser/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
ARG namespace
ARG baseImageTag
FROM node:12-alpine as build
RUN mkdir -p /home/app
WORKDIR /home/app
COPY package.json package-lock.json ./
RUN npm ci --production

FROM securecodebox/parser-sdk-nodejs:${baseImageTag:-latest}
FROM ${namespace:-securecodebox}/parser-sdk-nodejs:${baseImageTag:-latest}
WORKDIR /home/app/parser-wrapper/parser/
COPY --from=build --chown=app:app /home/app/node_modules/ ./node_modules/
COPY --chown=app:app ./parser.js ./parser.js