Run Nuclei #70
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: Run Nuclei | |
on: | |
# Run every sunday | |
schedule: | |
- cron: "0 12 * * SUN" | |
workflow_dispatch: | |
env: | |
REPO_OWNER: ${{ github.repository_owner }} | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK | |
NUCLEI_VERSION: '3.2.5' | |
jobs: | |
project-runner: | |
name: Project runner | |
# seaweed configurations | |
env: | |
TAG: "lfi,xss,fileupload,xxe,injection,traversal,disclosure,auth-bypass,ssrf,sqli,oast,rce" | |
runs-on: ubuntu-latest | |
services: | |
apache: | |
image: "httpd:2.4@sha256:43c7661a3243c04b0955c81ac994ea13a1d8a1e53c15023a7b3cd5e8bb25de3c" | |
waf: | |
image: "owasp/modsecurity-crs:4-apache-202404131004@sha256:9c20dd4756378de04c3587911efdf37c15614403c0540e008f16ca1cdbc63cba" | |
ports: | |
- 8080:8080 | |
env: | |
MODSEC_RULE_ENGINE: "On" | |
SERVERNAME: "_default_" | |
MODSEC_AUDIT_LOG: "/var/log/apache2/modsec_audit.log" | |
PARANOIA: 4 | |
BACKEND: "http://apache:80" | |
steps: | |
- name: Nuclei - Vulnerability Scan | |
uses: projectdiscovery/nuclei-action@main | |
with: | |
target: "http://127.0.0.1:8080" | |
flags: "-t http/cves -type http -stats -ni -sresp" | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: montudor/action-zip@a8e75c9faefcd80fac3baf53ef40b9b119d5b702 # v1 | |
with: | |
args: zip -qq -r output.zip output | |
- name: GitHub Workflow artifacts | |
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4 | |
with: | |
name: output | |
path: output.zip | |
process-artifacts: | |
name: Generate report | |
runs-on: ubuntu-latest | |
needs: [project-runner] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 | |
- name: Setup Go | |
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5 | |
with: | |
go-version: '^1.22.3' | |
- name: Download artifacts | |
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4 | |
with: | |
name: output | |
path: output | |
- name: Build report | |
run: | | |
go build | |
./project-seaweed -o output | |
# success: | |
# name: Send success notification | |
# runs-on: ubuntu-latest | |
# needs: [project-runner] | |
# # runs only if last job was successful | |
# if: success() | |
# steps: | |
# - name: Success | |
# uses: slackapi/slack-github-action@70cd7be8e40a46e8b0eced40b0de447bdb42f68e # v1.26.0 | |
# with: | |
# payload: | | |
# { | |
# "text": "Testing finished!", | |
# "attachments": [ | |
# { | |
# "color": "28a745", | |
# "fields": [ | |
# { | |
# "title": "Status", | |
# "value": "Complete" | |
# }, | |
# { | |
# "title": "cves tested", | |
# "value": ${{ env.cves_tested }} | |
# }, | |
# { | |
# "title": "blocks", | |
# "value": ${{ env.blocks }} | |
# }, | |
# { | |
# "title": "partial blocks", | |
# "value": ${{ env.partial_blocks }} | |
# }, | |
# { | |
# "title": "non blocks", | |
# "value": ${{ env.non_blocks }} | |
# } | |
# ] | |
# } | |
# ] | |
# } | |
# failure: | |
# name: Send Failure notification | |
# runs-on: ubuntu-latest | |
# needs: [project-runner] | |
# if: failure() | |
# steps: | |
# - name: Failure | |
# # Runs if anything went wrong in any job | |
# if: ${{ !contains(join(needs.*.result, ','), 'success') }} | |
# uses: slackapi/slack-github-action@70cd7be8e40a46e8b0eced40b0de447bdb42f68e # v1.26.0 | |
# with: | |
# payload: | | |
# { | |
# "text": "Seems like Seaweed ran into an error :/", | |
# "attachments": [ | |
# { | |
# "color": "c91a23", | |
# "fields": [ | |
# { | |
# "title": "Status", | |
# "value": "Incomplete" | |
# } | |
# ] | |
# } | |
# ] | |
# } |