Repository navigation
core: resolve kit root from installed layouts (fix "Could not find phishkit root" flood) - #26
Merged
Merged
Conversation
A brew-installed desktop app (or CLI) has no kit/ tree on the Cargo-manifest
or dev path, so kit_root() failed with "Could not find phishkit root" and the
Activity log flooded. Extend resolution to also check installed layouts:
- macOS .app bundle resources: <exe>/../Resources and ../Resources/kit-root
(Tauri bundle.resources), and ../share/phishkit beside the binary
- Homebrew/standard prefixes: $HOMEBREW_PREFIX, /opt/homebrew, /usr/local
-> share/phishkit[/kit-root]
- macOS Application Support (com.phishkit.phishkit / com.phishkit.app)/kit-root
- ~/.phishkit
PHISHKIT_ROOT still wins. Also fix validate_kit_root, which checked the modern
kit/evilginx/phishlets path twice instead of falling back to the legacy
evilginx/phishlets layout. Added tests (legacy layout + homebrew-share
candidate). NOTE: this is the resolution half — a release must also *ship*
the kit tree into one of these locations (see PR body).
adamsiwiec1
added a commit
that referenced
this pull request
Oct 26, 2026
…lves without PHISHKIT_ROOT Resolver half (PR #26) taught kit_root() to look in installed layouts, but nothing shipped the kit tree there, so brew installs still flooded 'Could not find phishkit root'. This ships it: - scripts/stage_kit_root.sh: stages a valid kit root (kit/, built evilginx binary, redirectors, community phishlets, top-level scripts, Makefile the shell harness sanity-checks for), excluding runtime state/caches. Portable cp -R (macOS CI runs openrsync). - Desktop: tauri.conf bundle.resources 'kit-root/**/*' -> Contents/Resources/ kit-root/, which the resolver's ../Resources/kit-root candidate finds. CI stages it after building evilginx. - CLI: release.yml cli job now installs Go, builds evilginx per-target (GOOS/GOARCH from the triple), and stages kit-root/ inside the tarball; kit.rs resolves a kit-root/ sibling of the executable (cask symlinks resolve back into the staged dir). - Bump 0.1.1-alpha.6 -> 0.1.1-alpha.7. cargo test (38 pass) + clippy clean.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
After
brew upgradeto alpha.6, the desktop Activity log floods withCould not find phishkit root. Set PHISHKIT_ROOT to the kit directory.The cask ships only the Tauri.appbinary (and the CLI tarball ships only the binaries) — neither contains thekit/tree.kit_root()only looked at the Cargo-manifest dir (dev-only) and the executable's parent dirs, none of which holdkit/evilginx/phishletson an installed machine, so it always failed.This PR (resolution half)
Extends
kit_root()to also discover installed layouts:.appresources:<exe>/../Resourcesand../Resources/kit-root(Tauribundle.resources), plus../share/phishkit$HOMEBREW_PREFIX,/opt/homebrew,/usr/local) →share/phishkit[/kit-root]com.phishkit.phishkit/com.phishkit.app)/kit-root, and~/.phishkitPHISHKIT_ROOTstill takes priority. Also fixesvalidate_kit_root(it checkedkit/evilginx/phishletstwice instead of falling back to legacyevilginx/phishlets). Tested:cargo test -p phishkit-core kit(3 pass), clippy clean.Still required to fully close the fire (packaging half — needs a release build to validate)
This PR makes the app look in the right places; a release must ship the kit tree to one of them. Recommended:
kit/(incl. builtkit/evilginx/run/evilginx) +vendor/community-phishletsintoapps/desktop/src-tauri/kit-root/during the desktop job, add"resources": ["kit-root/**/*"]totauri.conf.json→ lands atContents/Resources/kit-root/(no_up_mangling), which this PR's../Resources/kit-rootcandidate finds.clijob (per-targetGOARCH) and ship akit-root/dir in the tarball; have thephishkit-clicask install it to#{HOMEBREW_PREFIX}/share/phishkit/kit-root.phishkitcaskdepends_onphishkit-cliresolves to the same version (currently reported "1 missing").I did not commit the CI/bundle changes here because I can't build/validate the
.dmg/tarball in this environment and a broken bundle step would break the release pipeline. A new release tag is required for either half to reach brew users.Interim:
launchctl setenv PHISHKIT_ROOT <dev-checkout>+ relaunch unblocks the desktop app now.