Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Publish docker image of nikto for updates and releases #842

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
48 changes: 48 additions & 0 deletions .github/workflows/publishImage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: publishImage
concurrency:
group: ${{ github.event_name }}-${{ github.repository }}-${{ github.ref_name }}
cancel-in-progress: true
on:
workflow_dispatch:
release:
types: [published]
push:
branches:
- master
permissions:
actions: read
contents: read
packages: write
pull-requests: write
jobs:
publishImage:
# if: ${{ (github.ref_name == 'main') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.event.repository.full_name }}
- name: Build and push
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
push: true
cache-from: type=gha
cache-to: type=gha
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
10 changes: 2 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
FROM alpine:3.20.3

LABEL version="2.5.0" \
author="Author Paul Sec (https://github.com/PaulSec), Nikto User https://github.com/drwetter" \
docker_build="docker build -t sullo/nikto:2.5.0 ." \
docker_run_basic="docker run --rm sullo/nikto:2.5.0 -h http://www.example.com" \
docker_run_advanced="docker run --rm -v $(pwd):/tmp sullo/nikto:2.5.0 -h http://www.example.com -o /tmp/out.json"

RUN echo 'Installing packages for Nikto.'
RUN apk add --update --no-cache --virtual .build-deps \
perl \
perl-net-ssleay
perl \
perl-net-ssleay

RUN echo 'Creating the nikto group.' \
&& addgroup nikto \
Expand Down
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ nikto
[![alt text](https://cirt.net/images/patreon.png "Become a patron of Nikto!")](https://www.patreon.com/sullo)


Nikto web server scanner - https://cirt.net/Nikto2
Nikto web server scanner - https://cirt.net/Nikto2

Full documentation - https://github.com/sullo/nikto/wiki

Expand All @@ -20,7 +20,15 @@ cd nikto/program
perl nikto.pl -h http://www.example.com
~~~

Run as a Docker container:
Use Docker image:
~~~bash
# get latest docker image
docker pull ghcr.io/sullo/nikto:master
~~~

Check [here](https://github.com/sullo/nikto/pkgs/container/nikto) for various docker images.

Build Docker container:

~~~bash
git clone https://github.com/sullo/nikto.git
Expand Down