Update for version 10.6.3 of Nessus #44
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
name: Docker Nessus-Scanner CI | |
on: | |
push: | |
paths: | |
- 'Dockerfile' | |
workflow_dispatch: | |
inputs: | |
input: | |
description: "Manual Trigger" | |
required: false | |
default: "Manual Trigger" | |
jobs: | |
Build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build Docker Image | |
run: docker image build . --file Dockerfile --tag ciromota/nessus-scanner:latest | |
Test: | |
needs: Build | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build Docker Image | |
run: docker image build . --file Dockerfile --tag ciromota/nessus-scanner:latest | |
- name: Run Trivy vulnerability scanner | |
uses: aquasecurity/trivy-action@master | |
with: | |
image-ref: 'ciromota/nessus-scanner:latest' | |
format: 'table' | |
exit-code: '1' | |
ignore-unfixed: true | |
vuln-type: 'os,library' | |
severity: 'UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL' | |
- name: Docker Container Run | |
run: docker container run -td --name nessus-scanner -p 8834:8834 -v /etc/localtime:/etc/localtime ciromota/nessus-scanner:latest | |
Push: | |
needs: Test | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
- name: Install Cosign | |
uses: sigstore/[email protected] | |
- name: Docker Registry Login | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USER }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Extract metadata for Docker | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ciromota/nessus-scanner | |
flavor: | | |
latest=true | |
- name: Build and Push Docker image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: true | |
tags: ciromota/nessus-scanner:latest | |
- name: Sign image with Cosign | |
run: | | |
cosign sign --yes --key env://COSIGN_PRIVATE_KEY ciromota/nessus-scanner:latest | |
env: | |
COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }} | |
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }} | |