Skip to content

Commit d7156dc

Browse files
committed
Merge branch 'nuclei-dast-server' of https://github.com/projectdiscovery/nuclei into nuclei-dast-server
2 parents 6e55c57 + c6a0dd2 commit d7156dc

File tree

137 files changed

+3600
-940
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+3600
-940
lines changed

.github/dependabot.yml

+24-21
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
1-
# To get started with Dependabot version updates, you'll need to specify which
2-
# package ecosystems to update and where the package manifests are located.
3-
# Please see the documentation for all configuration options:
4-
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5-
61
version: 2
72
updates:
8-
9-
# Maintain dependencies for go modules
103
- package-ecosystem: "gomod"
114
directory: "/"
125
schedule:
@@ -15,23 +8,33 @@ updates:
158
commit-message:
169
prefix: "chore"
1710
include: "scope"
18-
labels:
19-
- "Type: Maintenance"
2011
allow:
2112
- dependency-name: "github.com/projectdiscovery/*"
13+
groups:
14+
modules:
15+
patterns: ["github.com/projectdiscovery/*"]
16+
security:
17+
applies-to: "security-updates"
18+
patterns: ["*"]
19+
exclude-patterns: ["github.com/projectdiscovery/*"]
20+
labels:
21+
- "Type: Maintenance"
22+
23+
- package-ecosystem: "github-actions"
24+
directory: "/"
25+
schedule:
26+
interval: "weekly"
27+
target-branch: "dev"
28+
commit-message:
29+
prefix: "chore"
30+
include: "scope"
31+
groups:
32+
workflows:
33+
patterns: ["*"]
34+
exclude-patterns: ["projectdiscovery/actions/*"]
35+
labels:
36+
- "Type: Maintenance"
2237

23-
# # Maintain dependencies for GitHub Actions
24-
# - package-ecosystem: "github-actions"
25-
# directory: "/"
26-
# schedule:
27-
# interval: "weekly"
28-
# target-branch: "dev"
29-
# commit-message:
30-
# prefix: "chore"
31-
# include: "scope"
32-
# labels:
33-
# - "Type: Maintenance"
34-
#
3538
# # Maintain dependencies for docker
3639
# - package-ecosystem: "docker"
3740
# directory: "/"

.github/workflows/compability-check.yaml

+13-4
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,20 @@ on:
99
jobs:
1010
check:
1111
if: github.actor == 'dependabot[bot]'
12-
strategy:
13-
matrix:
14-
os: [ubuntu-latest, windows-latest, macOS-latest]
15-
runs-on: ${{ matrix.os }}
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
1615
steps:
1716
- uses: actions/checkout@v4
17+
- uses: projectdiscovery/actions/setup/git@v1
1818
- uses: projectdiscovery/actions/setup/go@v1
1919
- run: go mod download && go mod verify && go vet ./...
20+
- name: Checks go.mod Integrity
21+
run: |
22+
git diff --exit-code go.mod >/dev/null || {
23+
echo "::warning::go.mod is out of sync. Pushing changes to the branch."
24+
git add go.{mod,sum}
25+
git commit -m "chore(deps): go mod tidy"
26+
git push origin $GITHUB_REF
27+
}
28+
- uses: projectdiscovery/actions/goreleaser@v1

.github/workflows/dockerhub-push.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -20,27 +20,27 @@ jobs:
2020
curl --silent "https://api.github.com/repos/projectdiscovery/nuclei/releases/latest" | jq -r .tag_name | xargs -I {} echo TAG={} >> $GITHUB_OUTPUT
2121
2222
- name: Set up QEMU
23-
uses: docker/setup-qemu-action@v2
23+
uses: docker/setup-qemu-action@v3
2424

2525
- name: Set up Docker Buildx
26-
uses: docker/setup-buildx-action@v2
26+
uses: docker/setup-buildx-action@v3
2727

2828
- name: Login to DockerHub
29-
uses: docker/login-action@v2
29+
uses: docker/login-action@v3
3030
with:
3131
username: ${{ secrets.DOCKER_USERNAME }}
3232
password: ${{ secrets.DOCKER_TOKEN }}
3333

3434
- name: Build and push
35-
uses: docker/build-push-action@v4
35+
uses: docker/build-push-action@v6
3636
with:
3737
context: .
3838
platforms: linux/amd64,linux/arm64
3939
push: true
4040
tags: projectdiscovery/nuclei:latest,projectdiscovery/nuclei:${{ steps.meta.outputs.TAG }}
4141

4242
- name: Update DockerHub Description
43-
uses: peter-evans/dockerhub-description@v3
43+
uses: peter-evans/dockerhub-description@v4
4444
with:
4545
username: ${{ secrets.DOCKER_USERNAME }}
4646
password: ${{ secrets.DOCKER_TOKEN }}

.github/workflows/govulncheck.yaml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: 🐛 govulncheck
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * 0' # Weekly
6+
workflow_dispatch:
7+
8+
jobs:
9+
govulncheck:
10+
runs-on: ubuntu-latest
11+
if: github.repository == 'projectdiscovery/nuclei'
12+
permissions:
13+
actions: read
14+
contents: read
15+
security-events: write
16+
env:
17+
OUTPUT: "/tmp/results.sarif"
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: projectdiscovery/actions/setup/go@v1
21+
- run: go install golang.org/x/vuln/cmd/govulncheck@latest
22+
- run: govulncheck -scan package -format sarif ./... > $OUTPUT
23+
- uses: github/codeql-action/upload-sarif@v3
24+
with:
25+
sarif_file: "${{ env.OUTPUT }}"
26+
category: "govulncheck"

.github/workflows/perf-test.yaml

+13-3
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,26 @@ jobs:
1010
strategy:
1111
matrix:
1212
count: [50, 100, 150]
13-
runs-on: ubuntu-latest
13+
runs-on: ubuntu-latest-16-cores
1414
if: github.repository == 'projectdiscovery/nuclei'
1515
env:
1616
LIST_FILE: "/tmp/targets-${{ matrix.count }}.txt"
17+
PROFILE_MEM: "/tmp/nuclei-perf-test-${{ matrix.count }}"
1718
steps:
1819
- uses: actions/checkout@v4
1920
- uses: projectdiscovery/actions/setup/go@v1
2021
- run: make verify
2122
- name: Generate list
2223
run: for i in {1..${{ matrix.count }}}; do echo "https://scanme.sh/?_=${i}" >> "${LIST_FILE}"; done
23-
- run: go run -race . -l "${LIST_FILE}"
24+
- run: NUCLEI_ARGS=host-error-stats go run . -l "${LIST_FILE}" -profile-mem="${PROFILE_MEM}"
2425
working-directory: cmd/nuclei/
25-
26+
- uses: projectdiscovery/actions/flamegraph@v1
27+
id: flamegraph
28+
with:
29+
profile: "${{ env.PROFILE_MEM }}.prof"
30+
name: "nuclei-perf-test-${{ matrix.count }}"
31+
continue-on-error: true
32+
- if: ${{ steps.flamegraph.outputs.message == '' }}
33+
run: echo "::notice::${FLAMEGRAPH_URL}"
34+
env:
35+
FLAMEGRAPH_URL: ${{ steps.flamegraph.outputs.url }}

.github/workflows/tests.yaml

+37-4
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
steps:
7575
- uses: actions/checkout@v4
7676
- uses: projectdiscovery/actions/setup/go@v1
77-
- uses: actions/setup-python@v4
77+
- uses: actions/setup-python@v5
7878
with:
7979
python-version: '3.10'
8080
- run: bash run.sh "${{ matrix.os }}"
@@ -119,11 +119,11 @@ jobs:
119119
security-events: write
120120
steps:
121121
- uses: actions/checkout@v4
122-
- uses: github/codeql-action/init@v2
122+
- uses: github/codeql-action/init@v3
123123
with:
124124
languages: 'go'
125-
- uses: github/codeql-action/autobuild@v2
126-
- uses: github/codeql-action/analyze@v2
125+
- uses: github/codeql-action/autobuild@v3
126+
- uses: github/codeql-action/analyze@v3
127127

128128
release:
129129
name: "Release test"
@@ -133,3 +133,36 @@ jobs:
133133
- uses: actions/checkout@v4
134134
- uses: projectdiscovery/actions/setup/go@v1
135135
- uses: projectdiscovery/actions/goreleaser@v1
136+
137+
flamegraph:
138+
name: "Flamegraph"
139+
needs: ["tests"]
140+
env:
141+
PROFILE_MEM: "/tmp/nuclei"
142+
TARGET_URL: "http://scanme.sh/a/?b=c"
143+
runs-on: ubuntu-latest
144+
steps:
145+
- uses: actions/checkout@v4
146+
- run: make build
147+
- name: "Setup environment (push)"
148+
if: ${{ github.event_name == 'push' }}
149+
run: |
150+
echo "PROFILE_MEM=${PROFILE_MEM}-${GITHUB_REF_NAME}-${GITHUB_SHA}" >> $GITHUB_ENV
151+
echo "FLAMEGRAPH_NAME=nuclei-${GITHUB_REF_NAME} (${GITHUB_SHA})" >> $GITHUB_ENV
152+
- name: "Setup environment (pull_request)"
153+
if: ${{ github.event_name == 'pull_request' }}
154+
run: |
155+
echo "PROFILE_MEM=${PROFILE_MEM}-pr-${{ github.event.number }}" >> $GITHUB_ENV
156+
echo "FLAMEGRAPH_NAME=nuclei (PR #${{ github.event.number }})" >> $GITHUB_ENV
157+
- run: ./bin/nuclei -silent -update-templates
158+
- run: ./bin/nuclei -silent -u "${TARGET_URL}" -profile-mem="${PROFILE_MEM}"
159+
- uses: projectdiscovery/actions/flamegraph@master
160+
id: flamegraph
161+
with:
162+
profile: "${{ env.PROFILE_MEM }}.prof"
163+
name: "${{ env.FLAMEGRAPH_NAME }}"
164+
continue-on-error: true
165+
- if: ${{ steps.flamegraph.outputs.message == '' }}
166+
run: echo "::notice::${FLAMEGRAPH_URL}"
167+
env:
168+
FLAMEGRAPH_URL: ${{ steps.flamegraph.outputs.url }}

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build
2-
FROM golang:1.21-alpine AS build-env
2+
FROM golang:1.22-alpine AS build-env
33
RUN apk add build-base
44
WORKDIR /app
55
COPY . /app

LICENSE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2022 ProjectDiscovery, Inc.
3+
Copyright (c) 2025 ProjectDiscovery, Inc.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -137,5 +137,5 @@ dsl-docs:
137137
template-validate: build
138138
template-validate:
139139
./bin/nuclei -ut
140-
./bin/nuclei -validate
141-
./bin/nuclei -validate -w workflows
140+
./bin/nuclei -validate -et http/technologies
141+
./bin/nuclei -validate -w workflows -et http/technologies

0 commit comments

Comments
 (0)