-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into ads/eng-262-fix-fix-gh-validation-workflow-f…
…or-robopages-on-skip Signed-off-by: Ads Dawson <[email protected]>
- Loading branch information
Showing
2 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Git clone stage | ||
FROM alpine:latest AS source | ||
RUN apk add --no-cache git | ||
WORKDIR /src | ||
RUN git clone https://github.com/zcyberseclab/zscan.git . || exit 1 | ||
|
||
# Build stage - update Go version | ||
FROM golang:1.23.2-alpine AS builder | ||
WORKDIR /build | ||
COPY --from=source /src . | ||
|
||
# Set Go build flags | ||
ENV CGO_ENABLED=0 \ | ||
GOOS=linux \ | ||
GOARCH=amd64 \ | ||
GO111MODULE=on | ||
|
||
# Build optimized binary | ||
RUN go mod download && \ | ||
go build -ldflags="-w -s" -o zscan cmd/main.go | ||
|
||
# Final stage | ||
FROM gcr.io/distroless/static-debian12:nonroot | ||
WORKDIR /app | ||
|
||
# Copy only necessary artifacts | ||
COPY --from=builder /build/zscan /app/ | ||
COPY --from=builder /build/config /app/config | ||
COPY --from=builder /build/templates /app/templates | ||
|
||
# Container configuration | ||
USER nonroot:nonroot | ||
EXPOSE 8080 | ||
|
||
ENTRYPOINT ["/app/zscan"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
description: > | ||
Zscan is a security scanning tool built in Go that provides network exploration | ||
and vulnerability assessment capabilities. It combines multiple security tools | ||
and techniques into a single interface for comprehensive security testing. | ||
categories: | ||
- cybersecurity | ||
- offensive | ||
- web-expliotation | ||
|
||
functions: | ||
zscan_default_scan: | ||
description: Perform a default security scan against specified targets | ||
parameters: | ||
target: | ||
type: string | ||
description: The target IP address or CIDR range to scan | ||
examples: | ||
- 192.168.1.1 | ||
- 10.0.0.0/24 | ||
- 127.0.0.1 | ||
|
||
container: | ||
build: | ||
path: ${cwd}/zscan.Dockerfile | ||
name: zscan_local | ||
args: | ||
- --net=host | ||
volumes: | ||
- ${cwd}:/data | ||
|
||
cmdline: | ||
- /app/zscan | ||
- -target | ||
- ${target} | ||
|
||
zscan_full_scan: | ||
description: Perform a comprehensive security scan | ||
parameters: | ||
target: | ||
type: string | ||
description: The target IP address or CIDR range to scan | ||
threads: | ||
type: integer | ||
description: Number of concurrent scanning threads | ||
default: 10 | ||
|
||
container: | ||
build: | ||
path: ${cwd}/zscan.Dockerfile | ||
name: zscan_local | ||
args: | ||
- --net=host | ||
volumes: | ||
- ${cwd}:/data | ||
|
||
cmdline: | ||
- /app/zscan | ||
- -target | ||
- ${target} | ||
- -threads | ||
- ${threads} |