diff --git a/.github/dependabot.yml b/.github/dependabot.yml index c987a50..b938ffc 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,5 +1,13 @@ version: 2 updates: +- package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" +- package-ecosystem: "docker" + directory: "/" + schedule: + interval: "daily" - package-ecosystem: cargo directory: "/" schedule: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c05c9f9..c59c986 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout sources - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Install stable toolchain uses: actions-rs/toolchain@v1 @@ -38,7 +38,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout sources - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Install stable toolchain uses: actions-rs/toolchain@v1 @@ -59,7 +59,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout sources - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: submodules: true diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 17462f7..9fc214b 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -22,9 +22,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out the repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Log in to Docker Hub + if: github.event_name != 'pull_request' uses: docker/login-action@v3 with: password: ${{ secrets.DOCKERHUB_USERNAME }} @@ -32,13 +33,13 @@ jobs: - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: rustscan/rustscan flavor: latest=true - name: Build and push Docker image - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v5 with: context: . push: ${{ contains(fromJson('["push", "release"]'), github.event_name) }} # Publish to docker registry only on push event or new release. diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f8292b3..ab1ad17 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -74,7 +74,7 @@ jobs: python-version: '3.10' - name: Checkout sources - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: submodules: true @@ -142,7 +142,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout sources - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: submodules: false diff --git a/Dockerfile b/Dockerfile index 068847a..4f8f4cb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,4 @@ +# Build Stage FROM rust:alpine as builder LABEL maintainer="RustScan " RUN apk add --no-cache build-base @@ -8,13 +9,17 @@ COPY Cargo.toml Cargo.lock ./ COPY src/ src/ RUN cargo build --release -FROM alpine:3.17 +# Release Stage +FROM alpine:3.19.1 as release LABEL author="Hydragyrum " LABEL author="LeoFVO " + RUN addgroup -S rustscan && \ adduser -S -G rustscan rustscan && \ ulimit -n 100000 && \ - apk add --no-cache nmap nmap-scripts wget + apk add --no-cache nmap nmap-scripts wget ca-certificates bind-tools + USER rustscan COPY --from=builder /app/rustscan/target/release/rustscan /usr/local/bin/rustscan + ENTRYPOINT [ "/usr/local/bin/rustscan" ]