diff --git a/.github/workflows/publishImage.yml b/.github/workflows/publishImage.yml new file mode 100644 index 00000000..12b43062 --- /dev/null +++ b/.github/workflows/publishImage.yml @@ -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 }} diff --git a/Dockerfile b/Dockerfile index e7426022..d5a91fe2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 \ diff --git a/README.md b/README.md index b9d72ca5..7103c3af 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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