Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ops(docker): use Docker Compose V2 commands #1142

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
7addc2a
fix(external_tools): incorrect Naabu regex
AnonymousWP Nov 27, 2023
b33b61c
feat(external_tools): remove deprecated Gauplus
AnonymousWP Nov 27, 2023
1ca8db6
feat(external_tools): add lookup command theHarvester
AnonymousWP Nov 28, 2023
fd405e2
chore(issue-template): don't allow blank issues
AnonymousWP Nov 28, 2023
021899a
Merge pull request #1085 from yogeshojha/release/2.0.2
AnonymousWP Nov 28, 2023
1d9cbd1
Rebase branch
psyray Nov 28, 2023
bc988db
Fix indent
psyray Nov 28, 2023
c5e4ed6
Merge pull request #1090 from psyray/add-dir-count-822
yogeshojha Nov 29, 2023
753b261
Merge pull request #1089 from yogeshojha/don't-allow-blank-issues
yogeshojha Nov 29, 2023
d380d21
Fix bad nuclei config name
psyray Dec 4, 2023
c76eeb4
Fix Hide info vulns on report when box checked
psyray Dec 5, 2023
db5fc45
Fix grouped vulns at the end of the report
psyray Dec 5, 2023
c69d334
Add rel tag to links (security fix)
psyray Dec 5, 2023
e9771c5
Merge pull request #1098 from psyray/fix-nuclei-config
yogeshojha Dec 5, 2023
ab25cb4
fix attribute error on scan history
yogeshojha Dec 5, 2023
5ddc5bc
show error popup for empty passwords
yogeshojha Dec 5, 2023
26d9c23
block empty pass from ui
yogeshojha Dec 5, 2023
fba40ee
issue-633: added already-in-org filter to target dropdown in org form
SeanOverton Dec 5, 2023
e338908
Update Dockerfile
SubGlitch1 Dec 5, 2023
5cc63b1
Merge pull request #1105 from yogeshojha/1079-disallow-empty-password
AnonymousWP Dec 5, 2023
6132ab9
Merge pull request #1104 from yogeshojha/1103-fix-scan-history
AnonymousWP Dec 5, 2023
0cf1d17
Merge pull request #1106 from SeanOverton/633-remove-target-from-org-…
AnonymousWP Dec 5, 2023
431af55
Merge pull request #1107 from SubGlitch1/master
AnonymousWP Dec 5, 2023
a4073df
Add source for nmap scan
psyray Dec 5, 2023
195f8f5
Merge pull request #1108 from psyray/fix-nmap-results
yogeshojha Dec 6, 2023
a204e51
feat(external_tools): add lookup command Netlas
AnonymousWP Dec 6, 2023
ea30710
fix(version): incorrect number in art
AnonymousWP Dec 6, 2023
7bc089f
Update hackerone.html
Xplo8E Dec 7, 2023
9a55da7
Merge pull request #1112 from Linuxinet/patch-1
AnonymousWP Dec 7, 2023
4341d98
Merge pull request #1111 from yogeshojha/fix-incorrect-version-string…
yogeshojha Dec 8, 2023
6923109
Merge pull request #1100 from psyray/fix-report-without-info-vulns
yogeshojha Dec 8, 2023
e68e80b
update theHarvester version lookup command
yogeshojha Dec 8, 2023
d315448
fix oneforall version
yogeshojha Dec 8, 2023
fd5a5e5
Merge pull request #1086 from yogeshojha/fixes-for-tool-arsenal
yogeshojha Dec 8, 2023
06e33ff
update workflows
jxdv Dec 13, 2023
22585a5
Merge pull request #1136 from jxdv/update-workflows
AnonymousWP Dec 16, 2023
9d2ee11
ops(docker): use Docker Compose V2 commands
AnonymousWP Dec 17, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
2 changes: 1 addition & 1 deletion .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the git repo
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build Docker image

on:
push:
branches: [ master]
branches: [ master ]
schedule:
- cron: '0 18 * * 5'

Expand All @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the git repo
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
26 changes: 13 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,48 +13,48 @@ SERVICES := db web proxy redis celery celery-beat
.PHONY: setup certs up build username pull down stop restart rm logs

certs: ## Generate certificates.
@${COMPOSE_PREFIX_CMD} docker-compose -f docker-compose.setup.yml run --rm certs
@${COMPOSE_PREFIX_CMD} docker compose -f docker-compose.setup.yml run --rm certs

setup: ## Generate certificates.
@make certs

up: ## Build and start all services.
${COMPOSE_PREFIX_CMD} docker-compose ${COMPOSE_ALL_FILES} up -d --build ${SERVICES}
${COMPOSE_PREFIX_CMD} docker compose ${COMPOSE_ALL_FILES} up -d --build ${SERVICES}

build: ## Build all services.
${COMPOSE_PREFIX_CMD} docker-compose ${COMPOSE_ALL_FILES} build ${SERVICES}
${COMPOSE_PREFIX_CMD} docker compose ${COMPOSE_ALL_FILES} build ${SERVICES}

username: ## Generate Username (Use only after make up).
${COMPOSE_PREFIX_CMD} docker-compose ${COMPOSE_ALL_FILES} exec web python3 manage.py createsuperuser
${COMPOSE_PREFIX_CMD} docker compose ${COMPOSE_ALL_FILES} exec web python3 manage.py createsuperuser

pull: ## Pull Docker images.
docker login docker.pkg.github.com
${COMPOSE_PREFIX_CMD} docker-compose ${COMPOSE_ALL_FILES} pull
${COMPOSE_PREFIX_CMD} docker compose ${COMPOSE_ALL_FILES} pull

down: ## Down all services.
${COMPOSE_PREFIX_CMD} docker-compose ${COMPOSE_ALL_FILES} down
${COMPOSE_PREFIX_CMD} docker compose ${COMPOSE_ALL_FILES} down

stop: ## Stop all services.
${COMPOSE_PREFIX_CMD} docker-compose ${COMPOSE_ALL_FILES} stop ${SERVICES}
${COMPOSE_PREFIX_CMD} docker compose ${COMPOSE_ALL_FILES} stop ${SERVICES}

restart: ## Restart all services.
${COMPOSE_PREFIX_CMD} docker-compose ${COMPOSE_ALL_FILES} restart ${SERVICES}
${COMPOSE_PREFIX_CMD} docker compose ${COMPOSE_ALL_FILES} restart ${SERVICES}

rm: ## Remove all services containers.
${COMPOSE_PREFIX_CMD} docker-compose $(COMPOSE_ALL_FILES) rm -f ${SERVICES}
${COMPOSE_PREFIX_CMD} docker compose $(COMPOSE_ALL_FILES) rm -f ${SERVICES}

test:
${COMPOSE_PREFIX_CMD} docker-compose $(COMPOSE_ALL_FILES) exec celery python3 -m unittest tests/test_scan.py
${COMPOSE_PREFIX_CMD} docker compose $(COMPOSE_ALL_FILES) exec celery python3 -m unittest tests/test_scan.py

logs: ## Tail all logs with -n 1000.
${COMPOSE_PREFIX_CMD} docker-compose $(COMPOSE_ALL_FILES) logs --follow --tail=1000 ${SERVICES}
${COMPOSE_PREFIX_CMD} docker compose $(COMPOSE_ALL_FILES) logs --follow --tail=1000 ${SERVICES}

images: ## Show all Docker images.
${COMPOSE_PREFIX_CMD} docker-compose $(COMPOSE_ALL_FILES) images ${SERVICES}
${COMPOSE_PREFIX_CMD} docker compose $(COMPOSE_ALL_FILES) images ${SERVICES}

prune: ## Remove containers and delete volume data.
@make stop && make rm && docker volume prune -f

help: ## Show this help.
@echo "Make application docker images and manage containers using docker-compose files."
@echo "Make application docker images and manage containers using docker compose files."
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m (default: help)\n\nTargets:\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-12s\033[0m %s\n", $$1, $$2 }' $(MAKEFILE_LIST)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ vulnerability_scan: {
'timeout': 5,
'fetch_gpt_report': true,
'nuclei': {
'use_conf': false,
'use_nuclei_config': false,
'severities': [
'unknown',
'info',
Expand Down
8 changes: 4 additions & 4 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ fi
echo " "
tput setaf 4;
echo "#########################################################################"
echo "Installing docker-compose"
echo "Installing docker compose"
echo "#########################################################################"
if [ -x "$(command -v docker-compose)" ]; then
tput setaf 2; echo "docker-compose already installed, skipping."
if [ -x "$(command -v docker compose)" ]; then
tput setaf 2; echo "docker compose already installed, skipping."
else
curl -L "https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
tput setaf 2; echo "docker-compose installed!!!"
tput setaf 2; echo "docker compose installed!!!"
fi

echo " "
Expand Down
28 changes: 14 additions & 14 deletions make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,30 @@ set COMPOSE_ALL_FILES = -f docker-compose.yml
set SERVICES = db web proxy redis celery celery-beat

:: Generate certificates.
if "%1" == "certs" docker-compose -f docker-compose.setup.yml run --rm certs
if "%1" == "certs" docker compose -f docker-compose.setup.yml run --rm certs
:: Generate certificates.
if "%1" == "setup" docker-compose -f docker-compose.setup.yml run --rm certs
if "%1" == "setup" docker compose -f docker-compose.setup.yml run --rm certs
:: Build and start all services.
if "%1" == "up" docker-compose %COMPOSE_ALL_FILES% up -d --build %SERVICES%
if "%1" == "up" docker compose %COMPOSE_ALL_FILES% up -d --build %SERVICES%
:: Build all services.
if "%1" == "build" docker-compose %COMPOSE_ALL_FILES% build %SERVICES%
if "%1" == "build" docker compose %COMPOSE_ALL_FILES% build %SERVICES%
:: Generate Username (Use only after make up).
if "%1" == "username" docker-compose %COMPOSE_ALL_FILES% exec web python3 manage.py createsuperuser
if "%1" == "username" docker compose %COMPOSE_ALL_FILES% exec web python3 manage.py createsuperuser
:: Pull Docker images.
if "%1" == "pull" docker login docker.pkg.github.com & docker-compose %COMPOSE_ALL_FILES% pull
if "%1" == "pull" docker login docker.pkg.github.com & docker compose %COMPOSE_ALL_FILES% pull
:: Down all services.
if "%1" == "down" docker-compose %COMPOSE_ALL_FILES% down
if "%1" == "down" docker compose %COMPOSE_ALL_FILES% down
:: Stop all services.
if "%1" == "stop" docker-compose %COMPOSE_ALL_FILES% stop %SERVICES%
if "%1" == "stop" docker compose %COMPOSE_ALL_FILES% stop %SERVICES%
:: Restart all services.
if "%1" == "restart" docker-compose %COMPOSE_ALL_FILES% restart %SERVICES%
if "%1" == "restart" docker compose %COMPOSE_ALL_FILES% restart %SERVICES%
:: Remove all services containers.
if "%1" == "rm" docker-compose %COMPOSE_ALL_FILES% rm -f %SERVICES%
if "%1" == "rm" docker compose %COMPOSE_ALL_FILES% rm -f %SERVICES%
:: Tail all logs with -n 1000.
if "%1" == "logs" docker-compose %COMPOSE_ALL_FILES% logs --follow --tail=1000 %SERVICES%
if "%1" == "logs" docker compose %COMPOSE_ALL_FILES% logs --follow --tail=1000 %SERVICES%
:: Show all Docker images.
if "%1" == "images" docker-compose %COMPOSE_ALL_FILES% images %SERVICES%
if "%1" == "images" docker compose %COMPOSE_ALL_FILES% images %SERVICES%
:: Remove containers and delete volume data.
if "%1" == "prune" docker-compose %COMPOSE_ALL_FILES% stop %SERVICES% & docker-compose %COMPOSE_ALL_FILES% rm -f %SERVICES% & docker volume prune -f
if "%1" == "prune" docker compose %COMPOSE_ALL_FILES% stop %SERVICES% & docker compose %COMPOSE_ALL_FILES% rm -f %SERVICES% & docker volume prune -f
:: Show this help.
if "%1" == "help" @echo Make application docker images and manage containers using docker-compose files only for windows.
if "%1" == "help" @echo Make application docker images and manage containers using docker compose files only for windows.
3 changes: 1 addition & 2 deletions web/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Base image
FROM ubuntu:22.04
FROM --platform=linux/amd64 ubuntu:22.04

# Labels and Credits
LABEL \
Expand Down Expand Up @@ -67,7 +67,6 @@ ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1

# Download Go packages
RUN go install -v -v github.com/bp0lr/gauplus@latest
RUN go install -v github.com/jaeles-project/gospider@latest
RUN go install -v github.com/tomnomnom/gf@latest
RUN go install -v github.com/tomnomnom/unfurl@latest
Expand Down
2 changes: 1 addition & 1 deletion web/art/reNgine.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
_ __ ___| \| | __ _ _ _ __ ___
| '__/ _ \ . ` |/ _` | | '_ \ / _ \
| | | __/ |\ | (_| | | | | | __/
|_| \___|_| \_|\__, |_|_| |_|\___| v2.0.0-jasper
|_| \___|_| \_|\__, |_|_| |_|\___| v2.0.2-jasper
__/ |
|___/
7 changes: 7 additions & 0 deletions web/dashboard/templates/dashboard/admin.html
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,13 @@ <h4>Users</h4>
var create_username = document.getElementById('create_username').value;
var role_selected = document.getElementById('create_user_role').value;
var create_password = document.getElementById('create_password').value;
if (!create_password) {
Swal.fire({
title: "Oops! Passwords can't be empty!",
icon: 'error',
})
return
}
const data = {
'username': create_username,
'role': role_selected,
Expand Down
7 changes: 5 additions & 2 deletions web/dashboard/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,8 @@ def admin_interface_update(request, slug):
try:
user.delete()
messages.add_message(
request,
messages.INFO,
request,
messages.INFO,
f'User {user.username} successfully deleted.'
)
messageData = {'status': True}
Expand All @@ -245,6 +245,9 @@ def admin_interface_update(request, slug):
elif mode == 'create':
try:
response = json.loads(request.body)
if not response.get('password'):
messageData = {'status': False, 'error': 'Empty passwords are not allowed'}
return JsonResponse(messageData)
UserModel = get_user_model()
user = UserModel.objects.create_user(
username=response.get('username'),
Expand Down
6 changes: 3 additions & 3 deletions web/fixtures/default_scan_engines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
\ 'run_nuclei': true,\r\n 'run_dalfox': true,\r\n 'run_crlfuzz': true,\r\n
\ 'enable_http_crawl': true,\r\n 'concurrency': 50,\r\n 'intensity': 'normal',\r\n
\ 'rate_limit': 150,\r\n 'retries': 1,\r\n 'timeout': 5,\r\n 'fetch_gpt_report':
true,\r\n 'nuclei': {\r\n 'use_conf': false,\r\n 'severities': ['unknown',
true,\r\n 'nuclei': {\r\n 'use_nuclei_config': false,\r\n 'severities': ['unknown',
'info', 'low', 'medium', 'high', 'critical']\r\n }\r\n}\r\nwaf_detection: {\r\n\r\n}\r\nscreenshot:
{\r\n 'enable_http_crawl': true,\r\n 'intensity': 'normal',\r\n 'timeout':
10,\r\n 'threads': 40\r\n}\r\n\r\n# custom_header: \"Cookie: Test\""
Expand Down Expand Up @@ -72,7 +72,7 @@
{\r\n 'run_nuclei': true,\r\n 'run_dalfox': true,\r\n 'run_crlfuzz': true,\r\n
\ 'enable_http_crawl': true,\r\n 'concurrency': 50,\r\n 'intensity': 'normal',\r\n
\ 'rate_limit': 150,\r\n 'retries': 1,\r\n 'timeout': 5,\r\n 'fetch_gpt_report':
true,\r\n 'nuclei': {\r\n 'use_conf': false,\r\n 'severities': ['unknown',
true,\r\n 'nuclei': {\r\n 'use_nuclei_config': false,\r\n 'severities': ['unknown',
'info', 'low', 'medium', 'high', 'critical']\r\n }\r\n}"
default_engine: true
- model: scanEngine.enginetype
Expand All @@ -99,6 +99,6 @@
{\r\n 'run_nuclei': true,\r\n 'run_dalfox': true,\r\n 'run_crlfuzz': true,\r\n
\ 'enable_http_crawl': false,\r\n 'concurrency': 50,\r\n 'intensity': 'normal',\r\n
\ 'rate_limit': 150,\r\n 'retries': 1,\r\n 'timeout': 5,\r\n 'fetch_gpt_report':
true,\r\n 'nuclei': {\r\n 'use_conf': false,\r\n 'severities': ['low',
true,\r\n 'nuclei': {\r\n 'use_nuclei_config': false,\r\n 'severities': ['low',
'medium', 'high', 'critical']\r\n }\r\n}"
default_engine: true
Loading
Loading