Skip to content
This repository was archived by the owner on Oct 14, 2020. It is now read-only.

Commit 072bf3b

Browse files
committed
Wrap Nikto with entrypoint script to ignore non zero exit code Nikto throws when it identified anything of interest
1 parent dadeef5 commit 072bf3b

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

integrations/nikto/nikto-scan-type.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@ spec:
1111
ttlSecondsAfterFinished: 10
1212
template:
1313
spec:
14-
restartPolicy: OnFailure
14+
restartPolicy: Never
1515
containers:
1616
- name: nikto
1717
image: scbexperimental/nikto:latest
1818
command:
19-
- 'nikto'
20-
- '-F'
21-
- 'json'
19+
# Nikto Entrypoint Script to avoid problems nikto exiting with a non zero exit code
20+
# This would cause the kubernetes job to fail no matter what
21+
- 'sh'
22+
- '/wrapper.sh'
2223
- '-o'
2324
- '/home/securecodebox/nikto-results.json'
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM sullo/nikto
2+
COPY wrapper.sh /wrapper.sh
3+
ENTRYPOINT [ "sh", "/wrapper.sh" ]
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Nikto Entrypoint Script to avoid problems nikto exiting with a non zero exit code
2+
# This would cause the kubernetes job to fail no matter what
3+
nikto.pl $@
4+
exit 0

0 commit comments

Comments
 (0)