Skip to content

Commit eb2af4b

Browse files
author
cclss
committed
first
0 parents  commit eb2af4b

Some content is hidden

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

98 files changed

+8807
-0
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
blank_issues_enabled: false
2+
3+
contact_links:
4+
- name: Ask an question / advise on using naabu
5+
url: https://github.com/projectdiscovery/naabu/discussions/categories/q-a
6+
about: Ask a question or request support for using naabu
7+
8+
- name: Share idea / feature to discuss for naabu
9+
url: https://github.com/projectdiscovery/naabu/discussions/categories/ideas
10+
about: Share idea / feature to discuss for naabu
11+
12+
- name: Connect with PD Team (Discord)
13+
url: https://discord.gg/projectdiscovery
14+
about: Connect with PD Team for direct communication
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: Feature request
3+
about: Request feature to implement in this project
4+
labels: 'Type: Enhancement'
5+
---
6+
7+
<!--
8+
1. Please make sure to provide a detailed description with all the relevant information that might be required to start working on this feature.
9+
2. In case you are not sure about your request or whether the particular feature is already supported or not, please start a discussion instead.
10+
3. GitHub Discussion: https://github.com/projectdiscovery/naabu/discussions/categories/ideas
11+
4. Join our discord server at https://discord.gg/projectdiscovery to discuss the idea on the #naabu channel.
12+
-->
13+
14+
### Please describe your feature request:
15+
<!-- A clear and concise description of feature to implement -->
16+
17+
### Describe the use case of this feature:
18+
<!-- A clear and concise description of the feature request's motivation and the use-cases in which it could be useful. -->
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
name: Issue report
3+
about: Create a report to help us to improve the project
4+
labels: 'Type: Bug'
5+
6+
---
7+
8+
<!--
9+
1. Please search to see if an issue already exists for the bug you encountered.
10+
2. For support requests, FAQs or "How to" questions, please use the GitHub Discussions section instead - https://github.com/projectdiscovery/naabu/discussions or
11+
3. Join our discord server at https://discord.gg/projectdiscovery and post the question on the #naabu channel.
12+
-->
13+
14+
<!-- ISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION. -->
15+
16+
### Naabu version:
17+
<!-- You can find current version of naabu with "naabu -version" -->
18+
<!-- We only accept issues that are reproducible on the latest version of naabu. -->
19+
<!-- You can find the latest version of project at https://github.com/projectdiscovery/naabu/releases/ -->
20+
21+
### Current Behavior:
22+
<!-- A concise description of what you're experiencing. -->
23+
24+
### Expected Behavior:
25+
<!-- A concise description of what you expected to happen. -->
26+
27+
### Steps To Reproduce:
28+
<!--
29+
Example: steps to reproduce the behavior:
30+
1. Run 'naabu ..'
31+
2. See error...
32+
-->
33+
34+
35+
### Anything else:
36+
<!-- Links? References? Screnshots? Anything that will give us more context about the issue that you are encountering! -->

.github/dependabot.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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+
6+
version: 2
7+
updates:
8+
9+
# Maintain dependencies for go modules
10+
- package-ecosystem: "gomod"
11+
directory: "v2/"
12+
schedule:
13+
interval: "weekly"
14+
target-branch: "dev"
15+
commit-message:
16+
prefix: "chore"
17+
include: "scope"
18+
labels:
19+
- "Type: Maintenance"
20+
allow:
21+
- dependency-name: "github.com/projectdiscovery/*"
22+
23+
# Maintain dependencies for docker
24+
- package-ecosystem: "docker"
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+
35+
# Maintain dependencies for GitHub Actions
36+
- package-ecosystem: "github-actions"
37+
directory: "/"
38+
schedule:
39+
interval: "weekly"
40+
target-branch: "dev"
41+
commit-message:
42+
prefix: "chore"
43+
include: "scope"
44+
labels:
45+
- "Type: Maintenance"

.github/release.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
changelog:
2+
exclude:
3+
authors:
4+
- dependabot
5+
categories:
6+
- title: 🎉 New Features
7+
labels:
8+
- "Type: Enhancement"
9+
- title: 🐞 Bugs Fixes
10+
labels:
11+
- "Type: Bug"
12+
- title: 🔨 Maintenance
13+
labels:
14+
- "Type: Maintenance"
15+
- title: Other Changes
16+
labels:
17+
- "*"

.github/stale.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Number of days of inactivity before an issue becomes stale
2+
daysUntilStale: 7
3+
4+
# Number of days of inactivity before a stale issue is closed
5+
daysUntilClose: 7
6+
7+
# Issues with these labels will never be considered stale
8+
# exemptLabels:
9+
# - pinned
10+
# - security
11+
12+
# Only issues or pull requests with all of these labels are check if stale.
13+
onlyLabels:
14+
- "Status: Abandoned"
15+
- "Type: Question"
16+
17+
# Label to use when marking as stale
18+
staleLabel: stale
19+
20+
# Comment to post when marking an issue as stale. Set to `false` to disable
21+
markComment: >
22+
This issue has been automatically marked as stale because it has not had
23+
recent activity. It will be closed if no further activity occurs. Thank you
24+
for your contributions.
25+
26+
# Comment to post when closing a stale issue. Set to `false` to disable
27+
closeComment: false

.github/workflows/build-test.yml

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
name: 🔨 Build Test
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- '**.go'
7+
- '**.mod'
8+
workflow_dispatch:
9+
10+
jobs:
11+
build-linux:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Check out code
15+
uses: actions/checkout@v3
16+
17+
- name: Set up Go
18+
uses: actions/setup-go@v4
19+
with:
20+
go-version: 1.21.x
21+
22+
- name: Install libpcap-dev
23+
run: sudo apt install libpcap-dev
24+
25+
- name: Install nmap
26+
run: sudo apt install nmap
27+
28+
- name: Build
29+
run: go build .
30+
working-directory: v2/cmd/naabu/
31+
32+
- name: Test
33+
run: go test -race ./...
34+
working-directory: v2/
35+
36+
- name: Integration Tests
37+
env:
38+
GH_ACTION: true
39+
run: bash run.sh
40+
working-directory: integration_tests/
41+
42+
- name: Race Condition Tests - Standard User
43+
run: |
44+
go run -race . -host scanme.sh
45+
working-directory: v2/cmd/naabu/
46+
47+
- name: Race Condition Tests - Root User
48+
run: |
49+
sudo go run -race . -host scanme.sh -Pn
50+
working-directory: v2/cmd/naabu/
51+
52+
build-mac:
53+
runs-on: macos-latest
54+
steps:
55+
- name: Set up Go
56+
uses: actions/setup-go@v4
57+
with:
58+
go-version: 1.21.x
59+
60+
- name: Check out code
61+
uses: actions/checkout@v3
62+
63+
- name: Install libpcap-dev
64+
run: brew install libpcap
65+
66+
- name: Install nmap
67+
run: brew install nmap
68+
69+
- name: Build
70+
run: go build .
71+
working-directory: v2/cmd/naabu/
72+
73+
- name: Test
74+
run: go test -race ./...
75+
working-directory: v2/
76+
77+
- name: Integration Tests
78+
env:
79+
GH_ACTION: true
80+
run: bash run.sh
81+
working-directory: integration_tests/
82+
83+
- name: Race Condition Tests - Standard User
84+
run: |
85+
go run -race . -host scanme.sh
86+
working-directory: v2/cmd/naabu/
87+
88+
- name: Race Condition Tests - Root User
89+
run: |
90+
sudo go run -race . -host scanme.sh -Pn
91+
working-directory: v2/cmd/naabu/
92+
93+
build-windows:
94+
runs-on: windows-latest
95+
steps:
96+
- name: Set up Go
97+
uses: actions/setup-go@v4
98+
with:
99+
go-version: 1.21.x
100+
101+
- name: Check out code
102+
uses: actions/checkout@v3
103+
104+
- name: Build
105+
run: go build .
106+
working-directory: v2/cmd/naabu/
107+
108+
- name: Test
109+
run: go test -race ./...
110+
working-directory: v2/
111+
112+
- name: Race Condition Tests
113+
# Known issue: https://github.com/golang/go/issues/46099
114+
run: |
115+
# go run -race . -host scanme.sh
116+
# sudo go run -race . -host scanme.sh
117+
working-directory: v2/cmd/naabu/

.github/workflows/codeql-analysis.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: 🚨 CodeQL Analysis
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
paths:
7+
- '**.go'
8+
- '**.mod'
9+
jobs:
10+
analyze:
11+
name: Analyze
12+
runs-on: ubuntu-latest
13+
permissions:
14+
actions: read
15+
contents: read
16+
security-events: write
17+
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
language: [ 'go' ]
22+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
23+
24+
steps:
25+
- name: Install libpcap-dev
26+
run: sudo apt install libpcap-dev
27+
28+
- name: Checkout repository
29+
uses: actions/checkout@v3
30+
31+
# Initializes the CodeQL tools for scanning.
32+
- name: Initialize CodeQL
33+
uses: github/codeql-action/init@v2
34+
with:
35+
languages: ${{ matrix.language }}
36+
37+
- name: Autobuild
38+
uses: github/codeql-action/autobuild@v2
39+
40+
- name: Perform CodeQL Analysis
41+
uses: github/codeql-action/analyze@v2

.github/workflows/dep-auto-merge.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: 🤖 dep auto merge
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- dev
7+
workflow_dispatch:
8+
9+
permissions:
10+
pull-requests: write
11+
issues: write
12+
repository-projects: write
13+
14+
jobs:
15+
automerge:
16+
runs-on: ubuntu-latest
17+
if: github.actor == 'dependabot[bot]'
18+
steps:
19+
- uses: actions/checkout@v3
20+
with:
21+
token: ${{ secrets.DEPENDABOT_PAT }}
22+
23+
- uses: ahmadnassri/action-dependabot-auto-merge@v2
24+
with:
25+
github-token: ${{ secrets.DEPENDABOT_PAT }}
26+
target: all

.github/workflows/dockerhub-push.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: 🌥 Docker Push
2+
3+
on:
4+
workflow_run:
5+
workflows: ["🎉 Release Binary"]
6+
types:
7+
- completed
8+
workflow_dispatch:
9+
10+
jobs:
11+
docker:
12+
runs-on: ubuntu-latest-16-cores
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v3
16+
17+
- name: Get Github tag
18+
id: meta
19+
run: |
20+
curl --silent "https://api.github.com/repos/projectdiscovery/naabu/releases/latest" | jq -r .tag_name | xargs -I {} echo TAG={} >> $GITHUB_OUTPUT
21+
22+
- name: Set up QEMU
23+
uses: docker/setup-qemu-action@v2
24+
25+
- name: Set up Docker Buildx
26+
uses: docker/setup-buildx-action@v2
27+
28+
- name: Login to DockerHub
29+
uses: docker/login-action@v2
30+
with:
31+
username: ${{ secrets.DOCKER_USERNAME }}
32+
password: ${{ secrets.DOCKER_TOKEN }}
33+
34+
- name: Build and push
35+
uses: docker/build-push-action@v4
36+
with:
37+
context: .
38+
platforms: linux/amd64,linux/arm64,linux/arm
39+
push: true
40+
tags: projectdiscovery/naabu:latest,projectdiscovery/naabu:${{ steps.meta.outputs.TAG }}

0 commit comments

Comments
 (0)