From 863c705b4d6d0a6b3830ca2e2eb7c0b6c086221a Mon Sep 17 00:00:00 2001 From: Olivier Cervello Date: Tue, 3 Mar 2026 14:44:33 +0100 Subject: [PATCH 1/5] Fix build failures and add binary releases Fixes: - #66: Add serde derive feature to fix compilation error - #65: Add cross-compiled musl binary for Alpine compatibility - Fix unnecessary parentheses warning in main.rs - Update repository URL to freelabz/x8 Release infrastructure: - Add GitHub Actions workflow for cross-platform binary releases (linux-gnu, linux-musl, macOS, Windows, arm64) - Add release test workflow for PR validation Co-Authored-By: Claude Opus 4.6 --- .github/release.yml | 17 +++++ .github/workflows/release-binary.yml | 96 ++++++++++++++++++++++++++++ .github/workflows/release-test.yml | 43 +++++++++++++ Cargo.toml | 6 +- src/main.rs | 2 +- 5 files changed, 160 insertions(+), 4 deletions(-) create mode 100644 .github/release.yml create mode 100644 .github/workflows/release-binary.yml create mode 100644 .github/workflows/release-test.yml diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 0000000..bc11730 --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,17 @@ +changelog: + exclude: + authors: + - dependabot + categories: + - title: New Features + labels: + - "Type: Enhancement" + - title: Bug Fixes + labels: + - "Type: Bug" + - title: Maintenance + labels: + - "Type: Maintenance" + - title: Other Changes + labels: + - "*" diff --git a/.github/workflows/release-binary.yml b/.github/workflows/release-binary.yml new file mode 100644 index 0000000..4956722 --- /dev/null +++ b/.github/workflows/release-binary.yml @@ -0,0 +1,96 @@ +name: Release Binary + +on: + push: + tags: + - '*' + workflow_dispatch: + +jobs: + build: + name: Build ${{ matrix.target }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - target: x86_64-unknown-linux-gnu + os: ubuntu-latest + archive: tar.gz + - target: x86_64-unknown-linux-musl + os: ubuntu-latest + archive: tar.gz + - target: aarch64-unknown-linux-gnu + os: ubuntu-latest + archive: tar.gz + - target: x86_64-apple-darwin + os: macos-latest + archive: zip + - target: aarch64-apple-darwin + os: macos-latest + archive: zip + - target: x86_64-pc-windows-msvc + os: windows-latest + archive: zip + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + with: + targets: ${{ matrix.target }} + + - name: Install cross (Linux cross-compilation) + if: matrix.os == 'ubuntu-latest' && matrix.target != 'x86_64-unknown-linux-gnu' + run: cargo install cross --git https://github.com/cross-rs/cross + + - name: Build (native) + if: matrix.target == 'x86_64-unknown-linux-gnu' || matrix.os != 'ubuntu-latest' + run: cargo build --release --target ${{ matrix.target }} + + - name: Build (cross) + if: matrix.os == 'ubuntu-latest' && matrix.target != 'x86_64-unknown-linux-gnu' + run: cross build --release --target ${{ matrix.target }} + + - name: Package (Unix) + if: matrix.os != 'windows-latest' + run: | + cd target/${{ matrix.target }}/release + if [ "${{ matrix.archive }}" = "tar.gz" ]; then + tar czf ../../../x8-${{ matrix.target }}.tar.gz x8 + else + zip ../../../x8-${{ matrix.target }}.zip x8 + fi + + - name: Package (Windows) + if: matrix.os == 'windows-latest' + run: | + cd target/${{ matrix.target }}/release + 7z a ../../../x8-${{ matrix.target }}.zip x8.exe + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: x8-${{ matrix.target }} + path: x8-${{ matrix.target }}.* + + release: + needs: build + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Download all artifacts + uses: actions/download-artifact@v4 + with: + merge-multiple: true + + - name: Create GitHub Release + uses: softprops/action-gh-release@v1 + with: + files: x8-* + generate_release_notes: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release-test.yml b/.github/workflows/release-test.yml new file mode 100644 index 0000000..8f364da --- /dev/null +++ b/.github/workflows/release-test.yml @@ -0,0 +1,43 @@ +name: Release Test + +on: + pull_request: + paths: + - '**.rs' + - 'Cargo.toml' + - 'Cargo.lock' + workflow_dispatch: + +jobs: + build-test: + name: Build ${{ matrix.target }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - target: x86_64-unknown-linux-gnu + os: ubuntu-latest + - target: x86_64-unknown-linux-musl + os: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + with: + targets: ${{ matrix.target }} + + - name: Install cross (musl) + if: matrix.target == 'x86_64-unknown-linux-musl' + run: cargo install cross --git https://github.com/cross-rs/cross + + - name: Build (native) + if: matrix.target == 'x86_64-unknown-linux-gnu' + run: cargo build --release --target ${{ matrix.target }} + + - name: Build (cross) + if: matrix.target == 'x86_64-unknown-linux-musl' + run: cross build --release --target ${{ matrix.target }} diff --git a/Cargo.toml b/Cargo.toml index 0955328..4a4a7e4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,8 +4,8 @@ version = "4.3.1-main" authors = ["Alexander Mironov "] edition = "2018" license = "GPL-3.0-or-later" -homepage = "https://github.com/Sh1Yo/x8" -repository = "https://github.com/Sh1Yo/x8" +homepage = "https://github.com/freelabz/x8" +repository = "https://github.com/freelabz/x8" description = "Hidden parameters discovery suite." categories = ["command-line-utilities"] keywords = ["security", "web", "recon", "content-discovery"] @@ -30,7 +30,7 @@ parking_lot = "0.11" log = "0.4.14" atty = "0.2" async-recursion = "1.0.0" -serde = "1.0" +serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" indicatif = "0.17.1" linked-hash-map = "0.5.6" diff --git a/src/main.rs b/src/main.rs index cc222dc..d7293e3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -298,7 +298,7 @@ async fn run( !request_defaults.parameters.contains_key(&x.name) && (x.reason_kind != ReasonKind::Code || x.status == 200) }) - .map(|x| (x.get())), + .map(|x| x.get()), )); utils::info( From 5f71bf509cfd10692bf6539db2d6122163caf951 Mon Sep 17 00:00:00 2001 From: Olivier Cervello Date: Tue, 3 Mar 2026 14:50:21 +0100 Subject: [PATCH 2/5] Remove cross-compiled targets that fail with git deps The custom reqwest/http/url forks cause cross compilation failures. Keep native builds only (linux-gnu, macOS x86+arm, Windows). Alpine users can fall back to cargo install. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/release-binary.yml | 17 +---------------- .github/workflows/release-test.yml | 13 +------------ 2 files changed, 2 insertions(+), 28 deletions(-) diff --git a/.github/workflows/release-binary.yml b/.github/workflows/release-binary.yml index 4956722..1b922cf 100644 --- a/.github/workflows/release-binary.yml +++ b/.github/workflows/release-binary.yml @@ -17,12 +17,6 @@ jobs: - target: x86_64-unknown-linux-gnu os: ubuntu-latest archive: tar.gz - - target: x86_64-unknown-linux-musl - os: ubuntu-latest - archive: tar.gz - - target: aarch64-unknown-linux-gnu - os: ubuntu-latest - archive: tar.gz - target: x86_64-apple-darwin os: macos-latest archive: zip @@ -42,18 +36,9 @@ jobs: with: targets: ${{ matrix.target }} - - name: Install cross (Linux cross-compilation) - if: matrix.os == 'ubuntu-latest' && matrix.target != 'x86_64-unknown-linux-gnu' - run: cargo install cross --git https://github.com/cross-rs/cross - - - name: Build (native) - if: matrix.target == 'x86_64-unknown-linux-gnu' || matrix.os != 'ubuntu-latest' + - name: Build run: cargo build --release --target ${{ matrix.target }} - - name: Build (cross) - if: matrix.os == 'ubuntu-latest' && matrix.target != 'x86_64-unknown-linux-gnu' - run: cross build --release --target ${{ matrix.target }} - - name: Package (Unix) if: matrix.os != 'windows-latest' run: | diff --git a/.github/workflows/release-test.yml b/.github/workflows/release-test.yml index 8f364da..8e65ae1 100644 --- a/.github/workflows/release-test.yml +++ b/.github/workflows/release-test.yml @@ -18,8 +18,6 @@ jobs: include: - target: x86_64-unknown-linux-gnu os: ubuntu-latest - - target: x86_64-unknown-linux-musl - os: ubuntu-latest steps: - name: Checkout code @@ -30,14 +28,5 @@ jobs: with: targets: ${{ matrix.target }} - - name: Install cross (musl) - if: matrix.target == 'x86_64-unknown-linux-musl' - run: cargo install cross --git https://github.com/cross-rs/cross - - - name: Build (native) - if: matrix.target == 'x86_64-unknown-linux-gnu' + - name: Build run: cargo build --release --target ${{ matrix.target }} - - - name: Build (cross) - if: matrix.target == 'x86_64-unknown-linux-musl' - run: cross build --release --target ${{ matrix.target }} From f68c8a990c61c484c8f502d105407168e863b65f Mon Sep 17 00:00:00 2001 From: Olivier Cervello Date: Tue, 3 Mar 2026 15:08:40 +0100 Subject: [PATCH 3/5] fix: restore original repository URLs for upstream compatibility Replace freelabz fork references with original Sh1Yo/x8 URLs to prepare for upstream contribution. Co-Authored-By: Claude Opus 4.6 --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 4a4a7e4..edeb939 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,8 +4,8 @@ version = "4.3.1-main" authors = ["Alexander Mironov "] edition = "2018" license = "GPL-3.0-or-later" -homepage = "https://github.com/freelabz/x8" -repository = "https://github.com/freelabz/x8" +homepage = "https://github.com/Sh1Yo/x8" +repository = "https://github.com/Sh1Yo/x8" description = "Hidden parameters discovery suite." categories = ["command-line-utilities"] keywords = ["security", "web", "recon", "content-discovery"] From 9ed1bd7f2e32cf38f9f69b09a3405eb71cc5c959 Mon Sep 17 00:00:00 2001 From: Olivier Cervello Date: Tue, 3 Mar 2026 15:37:21 +0100 Subject: [PATCH 4/5] fix: use musl target for Linux builds for Alpine compatibility Replace x86_64-unknown-linux-gnu with x86_64-unknown-linux-musl to produce statically linked binaries that work on both glibc and musl systems (Alpine). Co-Authored-By: Claude Opus 4.6 --- .github/workflows/release-binary.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-binary.yml b/.github/workflows/release-binary.yml index 1b922cf..ea9f303 100644 --- a/.github/workflows/release-binary.yml +++ b/.github/workflows/release-binary.yml @@ -14,7 +14,7 @@ jobs: fail-fast: false matrix: include: - - target: x86_64-unknown-linux-gnu + - target: x86_64-unknown-linux-musl os: ubuntu-latest archive: tar.gz - target: x86_64-apple-darwin @@ -31,6 +31,10 @@ jobs: - name: Checkout code uses: actions/checkout@v3 + - name: Install musl tools + if: contains(matrix.target, 'musl') + run: sudo apt-get update && sudo apt-get install -y musl-tools + - name: Install Rust toolchain uses: dtolnay/rust-toolchain@stable with: From ebd8467d3ecf7b6ac787683ae580930faafba75b Mon Sep 17 00:00:00 2001 From: Olivier Cervello Date: Tue, 3 Mar 2026 15:43:51 +0100 Subject: [PATCH 5/5] fix: vendor OpenSSL for musl builds Add vendored-openssl feature to statically compile OpenSSL for musl targets, fixing binary compatibility on Alpine Linux. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/release-binary.yml | 2 +- Cargo.toml | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-binary.yml b/.github/workflows/release-binary.yml index ea9f303..af31f3f 100644 --- a/.github/workflows/release-binary.yml +++ b/.github/workflows/release-binary.yml @@ -41,7 +41,7 @@ jobs: targets: ${{ matrix.target }} - name: Build - run: cargo build --release --target ${{ matrix.target }} + run: cargo build --release --target ${{ matrix.target }} ${{ contains(matrix.target, 'musl') && '--features vendored-openssl' || '' }} - name: Package (Unix) if: matrix.os != 'windows-latest' diff --git a/Cargo.toml b/Cargo.toml index edeb939..9cc1dca 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,3 +35,8 @@ serde_json = "1.0" indicatif = "0.17.1" linked-hash-map = "0.5.6" strip-ansi-escapes = "0.1.1" +openssl = { version = "0.10", features = ["vendored"], optional = true } + +[features] +default = [] +vendored-openssl = ["openssl"]