Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 10 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ APPLE_API_ISSUER=
APPLE_API_KEY=
APPLE_API_KEY_PATH=

# --- Mac App Store edition (scripts/release-appstore.sh) ----------------------------------
# "Apple Distribution: Jane Doe (TEAMID1234)" (signs the app)
APPLE_DISTRIBUTION_IDENTITY=
# "3rd Party Mac Developer Installer: Jane Doe (TEAMID1234)" (signs the .pkg)
APPLE_INSTALLER_IDENTITY=
# "Mac App Store Connect" provisioning profile for com.patchbay.patchprobe (keep it outside the repo)
APPLE_PROVISIONING_PROFILE=
# Optional: CFBundleVersion of the upload (defaults to a yyyymmddHHMM timestamp)
BUILD_NUMBER=

# --- Tauri updater signing (only if the updater plugin is ever enabled) ----------------
# Generated with `npm run tauri signer generate`; never commit the private key.
TAURI_SIGNING_PRIVATE_KEY=
Expand Down
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ Release builds (`npm run tauri build`) need signing credentials only for signed/
packages; see [`.env.example`](.env.example). Never commit certificates, keys or
passwords.

For a Developer ID signed and notarized macOS build, fill `.env` and run
`rust/app/scripts/release-macos.sh` from Terminal.app. The Mac App Store edition
(sandboxed: no MAC addresses, traceroute or nmap) is packaged by
`rust/app/scripts/release-appstore.sh`, which produces a signed `.pkg` for Transporter.

## Conventions

- **Layering**: pure logic, parsers and protocols go in `PatchProbe-core` (no UI, no
Expand Down
44 changes: 18 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Everything runs locally: no account, no cloud, no telemetry.
<img alt="Written in Rust" src="https://img.shields.io/badge/written%20in-Rust-b7410e?logo=rust&logoColor=white">
<img alt="Built with Tauri 2" src="https://img.shields.io/badge/Tauri-2-24c8db?logo=tauri&logoColor=white">
<img alt="Runs on macOS, Windows and Linux" src="https://img.shields.io/badge/runs%20on-macOS%20%C2%B7%20Windows%20%C2%B7%20Linux-2563eb">
<a href="#status"><img alt="Status: pre-release" src="https://img.shields.io/badge/status-pre--release-f5a524"></a>
<a href="#status"><img alt="Status: 1.0" src="https://img.shields.io/badge/status-1.0-2ea44f"></a>
</p>

<br>
Expand Down Expand Up @@ -88,6 +88,8 @@ Everything runs locally: no account, no cloud, no telemetry.
- Every technique returns a typed result (*found*, *no name* with the reason, *timeout*, *error*,
*skipped*). The **name diagnostic** panel shows the full trace for a host and can re-run every
technique on demand.
- **Default name source** setting: the HTML title of web services is shown first by default
(best for self-hosted services); pick any other technique, or the automatic order, in Settings.
- A per-IP cache keeps found names for 7 days; failures are only remembered for 5 minutes.
- All protocol decoders are hand-written, bounds-checked and tested against truncated and corrupted packets.

Expand All @@ -101,6 +103,9 @@ Everything runs locally: no account, no cloud, no telemetry.
- Vendor lookup in the **embedded IEEE OUI registry** (about 39,000 entries), offline.
- **Manual vendor correction per MAC address**, to relabel a device or fix a randomized MAC.
- **Wake-on-LAN** magic packet from the host details.
- On **macOS 27**, the system only shows the neighbor table to notarized apps: use the signed
release (or a Developer ID build). The Mac App Store edition is sandboxed and shows no MAC
addresses or vendors.

## Port scanning

Expand Down Expand Up @@ -155,37 +160,26 @@ Everything runs locally: no account, no cloud, no telemetry.

## Downloads

> **Pre-release v0.1.0.** The first build is available for **Apple silicon only** and is
> **unsigned** (no Apple Developer ID yet). Intel, Windows and Linux packages are coming soon;
> until then, [build from source](#build-from-source).
> **Version 1.0.0.** The macOS build is for **Apple silicon**, signed with an Apple Developer ID
> and notarized. Intel, Windows and Linux packages are coming soon; until then,
> [build from source](#build-from-source).

### macOS

| Build | File | Notes |
|---|---|---|
| App, Apple silicon (arm64) | [`PatchProbe_0.1.0_aarch64.dmg`](https://github.com/Patchbay-s/PatchProbe/releases/download/v0.1.0/PatchProbe_0.1.0_aarch64.dmg) | **Unsigned** — see the Gatekeeper note below |
| App, universal (Apple silicon + Intel) | `patchprobe-<ver>-macos-universal.dmg` | Coming soon (signed and notarized) |
| App, Apple silicon (arm64) | [`PatchProbe_1.0.0_aarch64.dmg`](https://github.com/Patchbay-s/PatchProbe/releases/download/v1.0.0/PatchProbe_1.0.0_aarch64.dmg) | Signed and notarized, all features |
| Mac App Store | Coming soon | Sandboxed edition: no MAC addresses, vendors, traceroute or nmap |
| App, universal (Apple silicon + Intel) | `PatchProbe_<ver>_universal.dmg` | Coming soon |

#### Install with Homebrew

The Homebrew cask installs the same unsigned Apple silicon build:

```bash
brew tap Patchbay-s/patchprobe
brew install --cask patchprobe
```

On first launch, macOS may block the unsigned app. In Finder, Control-click
`PatchProbe.app`, choose **Open**, then confirm. Intel support and signed builds are coming soon.

Because this build is not signed or notarized, macOS will refuse to open it on first launch.
After downloading, either right-click the app and choose **Open**, or clear the quarantine flag:

```bash
xattr -dr com.apple.quarantine /Applications/PatchProbe.app
```

Verify the download against [`SHA256SUMS.txt`](https://github.com/Patchbay-s/PatchProbe/releases/download/v0.1.0/SHA256SUMS.txt).
Verify the download against [`SHA256SUMS.txt`](https://github.com/Patchbay-s/PatchProbe/releases/download/v1.0.0/SHA256SUMS.txt).

### Windows

Expand Down Expand Up @@ -221,7 +215,7 @@ git clone https://github.com/Patchbay-s/PatchProbe.git
cd PatchProbe/rust/app
npm ci
npm run tauri dev # run in development mode
npm run tauri build # build an app bundle/installer for your OS (unsigned)
npm run tauri build # build an app bundle/installer for your OS (not notarized)
```

Run the checks:
Expand Down Expand Up @@ -251,10 +245,9 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for per-OS details and the permissions a

## Status

PatchProbe is **pre-release**. What works today:

Current version: **0.1.0**, published as a [pre-release](https://github.com/Patchbay-s/PatchProbe/releases/tag/v0.1.0)
(Apple silicon, unsigned). Follow the [releases page](https://github.com/Patchbay-s/PatchProbe/releases) for updates.
Current version: **1.0.0**, [released](https://github.com/Patchbay-s/PatchProbe/releases/tag/v1.0.0) for
Apple silicon (signed and notarized). Follow the
[releases page](https://github.com/Patchbay-s/PatchProbe/releases) for updates. What works today:

- Everything described above is implemented in the Rust/Tauri app and covered by about 200
automated tests (parsers and protocol decoders fed with fixtures from all three OS, network
Expand All @@ -263,8 +256,7 @@ Current version: **0.1.0**, published as a [pre-release](https://github.com/Patc

What is missing or known to be rough:

- **No signed or notarized packages yet**, and no auto-update: the v0.1.0 pre-release is an
unsigned Apple silicon build only.
- **Apple silicon only** for now, and no auto-update.
- The app has **not yet been field-tested by users on many real networks**; please report what
you see, the name diagnostic panel output is especially useful.
- Features of the legacy Swift app **not ported yet**: reading and changing the IP configuration
Expand Down
6 changes: 3 additions & 3 deletions rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ members = [
]

[workspace.package]
version = "0.1.0"
version = "1.0.0"
edition = "2021"
license = "GPL-3.0-only"
publish = false
Expand Down
Binary file modified rust/app/app-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions rust/app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rust/app/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "patchprobe-app",
"private": true,
"version": "0.1.0",
"version": "1.0.0",
"license": "GPL-3.0-only",
"type": "module",
"scripts": {
Expand Down
100 changes: 100 additions & 0 deletions rust/app/scripts/release-appstore.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
#!/usr/bin/env bash
# Paquet Mac App Store de PatchProbe (.pkg signé, prêt pour Transporter).
#
# Usage : scripts/release-appstore.sh [--upload]
# --upload envoie le .pkg à App Store Connect avec la clé API (APPLE_API_KEY…).
#
# Identifiants lus dans l'environnement ou dans `.env` à la racine du dépôt (git-ignoré, voir
# `.env.example`). L'édition App Store tourne dans le bac à sable d'Apple : pas de MAC, de
# traceroute ni de nmap (l'interface le signale). À lancer depuis Terminal.app.
set -euo pipefail

app_dir="$(cd "$(dirname "$0")/.." && pwd)"
repo_root="$(cd "$app_dir/../.." && pwd)"
target_root="$(cd "$app_dir/.." && pwd)/target"
out_dir="$target_root/appstore"
bundle_id="com.patchbay.patchprobe"

upload=false
[[ "${1:-}" == "--upload" ]] && upload=true

if [[ -f "$repo_root/.env" ]]; then
set -a
# shellcheck disable=SC1091
source "$repo_root/.env"
set +a
fi

fail() { echo "erreur : $*" >&2; exit 1; }
has_identity() { security find-identity -v | grep -qF "\"$1\""; }

[[ "${APPLE_DISTRIBUTION_IDENTITY:-}" == "Apple Distribution:"* ||
"${APPLE_DISTRIBUTION_IDENTITY:-}" == "3rd Party Mac Developer Application:"* ]] ||
fail "APPLE_DISTRIBUTION_IDENTITY doit être un certificat « Apple Distribution: … »."
[[ "${APPLE_INSTALLER_IDENTITY:-}" == "3rd Party Mac Developer Installer:"* ||
"${APPLE_INSTALLER_IDENTITY:-}" == "Mac Installer Distribution:"* ]] ||
fail "APPLE_INSTALLER_IDENTITY doit être un certificat « 3rd Party Mac Developer Installer: … »."
has_identity "$APPLE_DISTRIBUTION_IDENTITY" || fail "certificat introuvable : $APPLE_DISTRIBUTION_IDENTITY"
has_identity "$APPLE_INSTALLER_IDENTITY" || fail "certificat introuvable : $APPLE_INSTALLER_IDENTITY"
[[ -n "${APPLE_TEAM_ID:-}" ]] || fail "APPLE_TEAM_ID manquant."
[[ -f "${APPLE_PROVISIONING_PROFILE:-}" ]] ||
fail "APPLE_PROVISIONING_PROFILE doit pointer vers le profil « Mac App Store Connect » (.provisionprofile)."

version="$(node -p 'require(process.argv[1]).version' "$app_dir/src-tauri/tauri.conf.json")"
# CFBundleVersion doit croître à chaque envoi pour une même version.
build_number="${BUILD_NUMBER:-$(date +%Y%m%d%H%M)}"

# Binaire universel si la cible Intel est installée, sinon Apple silicon seulement : l'App Store
# n'accepte alors le paquet qu'avec macOS 12.0 minimum (erreur 90869).
if [[ -d "$(rustc --print target-libdir --target x86_64-apple-darwin 2>/dev/null)" ]]; then
target="universal-apple-darwin"
minimum_macos="11.0"
else
target="aarch64-apple-darwin"
minimum_macos="12.0"
echo "note : cible x86_64-apple-darwin absente, paquet Apple silicon uniquement (macOS 12.0+)."
fi

mkdir -p "$out_dir"
sed -e "s/__TEAM_ID__/$APPLE_TEAM_ID/g" -e "s/__BUNDLE_ID__/$bundle_id/g" \
"$app_dir/src-tauri/appstore/Entitlements.plist.in" > "$out_dir/Entitlements.plist"
node -e '
const [entitlements, profile, build, minimumSystemVersion, file] = process.argv.slice(1);
const config = { bundle: { macOS: {
entitlements, bundleVersion: build, minimumSystemVersion,
files: { "embedded.provisionprofile": profile },
} } };
require("fs").writeFileSync(file, JSON.stringify(config, null, 2));
' "$out_dir/Entitlements.plist" "$APPLE_PROVISIONING_PROFILE" "$build_number" "$minimum_macos" \
"$out_dir/tauri.appstore.json"

cd "$app_dir"
npm ci
# Variables de notarisation retirées : un paquet App Store n'est pas notarisé.
env -u APPLE_ID -u APPLE_PASSWORD -u APPLE_API_ISSUER -u APPLE_API_KEY -u APPLE_API_KEY_PATH \
APPLE_SIGNING_IDENTITY="$APPLE_DISTRIBUTION_IDENTITY" \
npm run tauri build -- --bundles app --target "$target" --config "$out_dir/tauri.appstore.json"

app="$target_root/$target/release/bundle/macos/PatchProbe.app"
pkg="$out_dir/PatchProbe-$version-$build_number.pkg"

echo "--- vérifications"
codesign --verify --strict --deep "$app"
codesign -d --entitlements - --xml "$app" 2>/dev/null | grep -q "com.apple.security.app-sandbox" ||
fail "le bac à sable n'est pas activé dans la signature."
[[ -f "$app/Contents/embedded.provisionprofile" ]] || fail "profil de provisionnement absent du .app."
[[ "$(plutil -extract LSMinimumSystemVersion raw "$app/Contents/Info.plist")" == "$minimum_macos" ]] ||
fail "LSMinimumSystemVersion différent de $minimum_macos."

productbuild --component "$app" /Applications --sign "$APPLE_INSTALLER_IDENTITY" "$pkg"
pkgutil --check-signature "$pkg" | head -n 3
echo "OK : $pkg (version $version, build $build_number)"

if $upload; then
[[ -n "${APPLE_API_KEY:-}" && -n "${APPLE_API_ISSUER:-}" && -f "${APPLE_API_KEY_PATH:-}" ]] ||
fail "--upload demande APPLE_API_KEY, APPLE_API_ISSUER et APPLE_API_KEY_PATH."
API_PRIVATE_KEYS_DIR="$(dirname "$APPLE_API_KEY_PATH")" \
xcrun altool --upload-app -f "$pkg" -t macos --apiKey "$APPLE_API_KEY" --apiIssuer "$APPLE_API_ISSUER"
else
echo "Envoi : glisser le .pkg dans l'app Transporter, ou relancer avec --upload."
fi
51 changes: 51 additions & 0 deletions rust/app/scripts/release-macos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#!/usr/bin/env bash
# Build signé Developer ID + notarisé de PatchProbe pour macOS (.app et .dmg).
#
# Identifiants lus dans l'environnement ou dans `.env` à la racine du dépôt (git-ignoré, voir
# `.env.example`). Rien n'est écrit sur disque en dehors de `rust/target/`.
#
# À lancer depuis Terminal.app : la notarisation a besoin d'une session utilisateur normale.
set -euo pipefail

app_dir="$(cd "$(dirname "$0")/.." && pwd)"
repo_root="$(cd "$app_dir/../.." && pwd)"
bundle_dir="$app_dir/../target/release/bundle"

if [[ -f "$repo_root/.env" ]]; then
set -a
# shellcheck disable=SC1091
source "$repo_root/.env"
set +a
fi

fail() { echo "erreur : $*" >&2; exit 1; }

[[ "${APPLE_SIGNING_IDENTITY:-}" == "Developer ID Application:"* ]] ||
fail "APPLE_SIGNING_IDENTITY doit être un certificat « Developer ID Application: … »."
security find-identity -v -p codesigning | grep -qF "\"$APPLE_SIGNING_IDENTITY\"" ||
fail "certificat introuvable dans le trousseau : $APPLE_SIGNING_IDENTITY"

if [[ -n "${APPLE_API_ISSUER:-}" || -n "${APPLE_API_KEY:-}" ]]; then
[[ -n "${APPLE_API_ISSUER:-}" && -n "${APPLE_API_KEY:-}" && -f "${APPLE_API_KEY_PATH:-}" ]] ||
fail "clé App Store Connect incomplète : APPLE_API_ISSUER, APPLE_API_KEY et APPLE_API_KEY_PATH (.p8)."
elif [[ -z "${APPLE_ID:-}" || -z "${APPLE_PASSWORD:-}" || -z "${APPLE_TEAM_ID:-}" ]]; then
fail "identifiants de notarisation manquants (clé API App Store Connect, ou APPLE_ID/APPLE_PASSWORD/APPLE_TEAM_ID)."
fi

# Volumes laissés par un bundle_dmg.sh interrompu : ils font échouer l'éjection suivante.
for volume in /Volumes/dmg.*; do
[[ -d "$volume" ]] && hdiutil detach "$volume" -force >/dev/null 2>&1 || true
done

cd "$app_dir"
npm ci
npm run tauri build -- --bundles app,dmg

app="$bundle_dir/macos/PatchProbe.app"
dmg="$(ls -t "$bundle_dir"/dmg/PatchProbe_*.dmg | head -n 1)"

echo "--- vérifications"
codesign --verify --strict --deep "$app"
spctl --assess --type execute -vv "$app"
xcrun stapler validate "$app"
echo "OK : $dmg"
3 changes: 3 additions & 0 deletions rust/app/src-tauri/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
les sondes échouent et le scan ne trouve aucun hôte. -->
<key>NSLocalNetworkUsageDescription</key>
<string>PatchProbe a besoin d'accéder au réseau local pour détecter les appareils connectés, leurs ports ouverts et leurs noms.</string>
<!-- Seul le chiffrement standard du système est utilisé (HTTPS) : exempté (App Store Connect). -->
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<!-- Types de services parcourus par la découverte Bonjour de fin de scan. -->
<key>NSBonjourServices</key>
<array>
Expand Down
23 changes: 23 additions & 0 deletions rust/app/src-tauri/appstore/Entitlements.plist.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!-- Entitlements de l'édition Mac App Store. __TEAM_ID__ et __BUNDLE_ID__ sont remplacés par
scripts/release-appstore.sh ; la version Developer ID n'utilise pas ce fichier. -->
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<!-- Sondes TCP, DNS, mDNS, NBNS, SNMP, titres web. -->
<key>com.apple.security.network.client</key>
<true/>
<!-- Sans elle, `ping` ne peut pas recevoir les réponses ICMP dans le bac à sable. -->
<key>com.apple.security.network.server</key>
<true/>
<!-- Exports CSV/JSON vers l'emplacement choisi dans le panneau d'enregistrement. -->
<key>com.apple.security.files.user-selected.read-write</key>
<true/>
<key>com.apple.application-identifier</key>
<string>__TEAM_ID__.__BUNDLE_ID__</string>
<key>com.apple.developer.team-identifier</key>
<string>__TEAM_ID__</string>
</dict>
</plist>
Binary file modified rust/app/src-tauri/icons/128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified rust/app/src-tauri/icons/128x128@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified rust/app/src-tauri/icons/32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified rust/app/src-tauri/icons/64x64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading