This file provides persistent context for AI coding agents working in the catnet-io/app repository.
catnet-io/app is the cross-platform (desktop & mobile) GUI for CatNet.
Built with Wails v2 (Go backend) + React/TypeScript (frontend).
It is a pure consumer of catnet-io/engine — it contains zero scanning logic.
Module path: github.com/catnet-io/app
Binary name: catnet-app (defined in wails.json)
Go version: 1.26.4
Engine dependency: github.com/catnet-io/engine (see go.mod)
Frontend: React + TypeScript, bundled by Bun
app.go ← Wails App struct, startup(), all method bindings
├── handlers/ ← (planned refactor) one file per domain
│ ├── scan.go StartScan(), StopScan()
│ ├── quicktools.go Ping(), ReverseDNS(), GetMAC(), ScanPorts()
│ ├── network.go ParseRange(), GetLocalIPRange()
│ ├── export.go ExportResults()
│ └── history.go GetScans(), GetScanReport(), DeleteScan(), CompareScans()
└── internal/
├── store/ SQLite scan history (migrating from engine pkg/store)
└── diff/ Scan comparison (migrating from engine pkg/diff)
frontend/src/
├── App.tsx
└── components/
├── ScannerView.tsx ← main scan UI
├── HistoryView.tsx ← scan history
└── DiffView.tsx ← scan comparison
This app uses pkg/scan.Engine.ScanStream (channel-based API) from catnet-io/engine.
Events flow: ScanStream → chan events.Event → goroutine drains channel →
runtime.EventsEmit → Wails WebSocket → React frontend.
Do NOT add a second event path. Do NOT call engine.StartScan (callback API) from here.
See .jules/palette.md for the exact color palette, typography, and design tokens.
The UI follows a cyberpunk / high-contrast glassmorphism aesthetic.
Do not introduce flat or material design components.
- No scanning logic in this repository. All scanning happens in
catnet-io/engine. - Do not sanitize
ScanProfileinapp.go. The engine callsprofile.Sanitize()internally. Double sanitization causes silent divergence. Remove any manual bounds checks onConcurrencyorTimeoutMsfrom Go code. - No CGO.
wails buildhandles platform-specific linking; do not introduce CGO manually. - English only in all Go source files and Wails bindings.
- No local
replacedirectives inmainbranch. Usescripts/dev-replace.sh. - Do not add features to
pkg/storeorpkg/diffincatnet-io/engine. These packages are migrating tointernal/storeandinternal/diffin this repository. .archive-notice.mdbelongs indocs/. Do not put archive notices in the root.- NEVER replace
bunwithnpm,yarn, orpnpm. Always usebun(bun install,bun run build,bun test,bun dev) for all JS/TS package management and execution. CHANGES.mdis deprecated. All changelog entries go toCHANGELOG.mdonly.
- Extract
app.gomethod groups intohandlers/package (one file per domain) - Move
pkg/storeandpkg/diffimports fromcatnet-io/enginetointernal/storeandinternal/diffin this repository (coordinate with engine Sprint 3) - Update
go.modtoengine@v0.5.1after store/diff removal from engine
feat(scanner): add host side panel on row click
fix(app): remove duplicate ScanProfile sanitization
chore(deps): update engine to v0.5.1
refactor(app): extract scan handler to handlers/scan.go
style(frontend): update ScannerView to use palette token --neon-cyan
Scopes: scanner, history, diff, export, quicktools, network, app,
frontend, deps, ci, docs.
Update CHANGELOG.md under [Unreleased] for every behavioral change.
CHANGES.md is deprecated — do not add entries there.
- TypeScript strict mode — no
anytypes. - All Wails backend calls via the generated bindings in
frontend/src/wailsjs/. - Do not call
fetch()oraxiosfor backend data — use Wails runtime only. - Use CSS variables from
.jules/palette.mdfor all color values. - Components live in
frontend/src/components/— one file per view.
- Go:
go build ./...,go vet ./... - Frontend:
cd frontend && npm run build - Wails:
wails build(on release PRs) - Security:
semgrep,snyk,govulncheck(configured as required checks)
- Harden
mendsec/catnet-scannerwith DevSecOps practices (SHA pinning, permissions, Semgrep SAST) and automate signed PRs fromdeveloptomainvia SSH-signed commits ondevelop-signed.
- Package Manager: NEVER replace
bunwithnpm,yarn, orpnpm. Always usebun(bun install,bun run build,bun test,bun dev) for all JS/TS package management and execution. - PR author must be
github-actions[bot](notmendsec) so the user can review and merge. - Commits on
develop-signedmust show Verified badge (SSH signing key added to GitHub account). - Follow the pattern from the
mendsec/catnetrepo (auto-merge-pr.yml+BOT_SSH_PRIVATE_KEY). - CI must work end-to-end:
catnet-coreprivate dependency must resolve in CI.
- All 4 workflows (
ci.yml,govulncheck.yml,release.yml,snyk.yml): addedpermissions: contents: read(with override onreleasejob towrite), pinned 14 third-party actions by commit SHA. - Removed floating tags (
@v4,@v6,@v1,@master, etc.) across all workflows. - Created
.github/dependabot.yml(weekly schedule, github-actions ecosystem). - Created
.github/workflows/semgrep.yml(SAST for Go + TS, pinned to713efdd). - Created
.github/PULL_REQUEST_TEMPLATE.md(Security, Accessibility, Testing, Risk sections). - Updated
CONTRIBUTING.mdwith full DevSecOps Guide. - Created
.github/workflows/signed-merge.yml(triggers on push todevelopandworkflow_dispatch): SSH-signs commits viagit filter-branch -S, pushes todevelop-signed, closes old PRs, opens new PR tomain. - SSH signing key generated (no passphrase), added as
BOT_SSH_PRIVATE_KEYsecret, public key added to GitHub account as signing key. - 4 dependabot PRs (#70–#73) approved and merged to
main: updatedaction-gh-release,setup-go,checkout,setup-bunto latest versions. GH_PATadded as a Dependabot secret oncatnet-scannerso dependabot-triggered CI can checkout privatecatnet-core.- Aikido PR #63 closed as superseded (action pinning already done).
- Palette PR #62 merged to
develop: table header keyboard accessibility (tabIndex,onKeyDown,aria-sort,handleSortKeyDown,th:focus-visibleCSS). - Changes from PRs #41 (empty state scanning message), #42 (scan input Enter key handler), #43 (progress bar ARIA attributes) applied directly to
developvia commit51f0764. - Remaining 18 palette PRs (#41–#60) closed as superseded.
- Signed-merge workflow sync step updated: handles divergent branches by merging
mainintodevelopinstead of a plain fast-forward push. - PRs #69, #74, #75, #76, #77 signed-merge completed:
develop-signed→main(all 9 CI checks passed).
- (none)
- (none)
- Use SSH signing (
BOT_SSH_PRIVATE_KEY) instead of GPG — matches the proven catnet repo pattern. - Use
GITHUB_TOKENfor PR creation — makes the authorgithub-actions[bot]. - The
if: github.actor != 'github-actions[bot]'guard prevents re-triggering loops on the signed push. - Proxy packages in catnet-core bridge import gap rather than restructuring catnet-scanner's code.
- Dependabot PRs merged despite CI infra failures (secrets not available to dependabot actor);
GH_PATadded as Dependabot secret to fix long-term. - Palette a11y improvements consolidated into a single merged PR (#62) + direct commits instead of 19 conflicting PRs.
- Remove the
GH_PATsecret if no longer needed elsewhere. - Continue monitoring signed-merge automation for regressions on future
developpushes.
- The
GITHUB_TOKENrestriction ("GitHub Actions is not permitted to create or approve pull requests") is a repo-level setting that the user enabled — both REST and GraphQL now work. git filter-branch -Srewrites all commits fromorigin/main..HEADwith the SSH signing key.- Commits on
develop-signedbranches showverified: truefor all rewritten commits. - The
actions/checkout@v4deprecation warning (Node 20 → 24) is cosmetic. GH_PATDependabot secret was created on the repo settings page to allow dependabot-triggered CI to access privatecatnet-core.- The signed-merge sync step now uses
git merge origin/maininstead ofgit push origin origin/main:developto handle divergent branches.
.github/workflows/signed-merge.yml: signed-merge automation with updated sync step (merge instead of fast-forward push).github/workflows/ci.yml: CI with SHA-pinned actions, permissions, andGH_PATfor catnet-core checkout.github/workflows/govulncheck.yml: vulnerability scanning with SHA-pinned actions.github/workflows/release.yml: release with explicitcontents: writeoverride on release job.github/workflows/snyk.yml: Snyk scanning, switched@masterto@v1.0.0.github/workflows/semgrep.yml: SAST workflow.github/dependabot.yml: weekly dependabot config.github/PULL_REQUEST_TEMPLATE.md: PR template with DevSecOps checklistCONTRIBUTING.md: appended DevSecOps Guide sectionmendsec/catnet-corerepo:/pkg/scan,/pkg/events,/pkg/export,/pkg/profile,/pkg/results— proxy packages added for catnet-scanner compatibilityfrontend/src/App.tsx: monolithic component with keyboard-accessible sortable table headers, scan input Enter key, progress bar ARIA, and dynamic empty state message