Commit 918d68c
authored
feat: Post-foundation features, UI, and test coverage (#89)
* feat: Add post-foundation features, tests, and UI enhancements
- JWT-bound project scoping, capability-based task assignment, and RBAC simplification
- DAG editor for campaign creation wizard with visual dependency management
- Results page with search, pagination, and CSV export
- Select-project page with auto-select for single-project users
- Resource upload modal for wordlists, rulelists, and masklists
- WebSocket event authentication with hybrid cookie/query-token support
- Dashboard stats endpoint and real-time connection indicator
- Playwright E2E suite with global setup/teardown and seed data
- 113 frontend tests covering all domain pages, hooks, and components
- 98 backend tests including events auth, heartbeat monitor, and contract tests
- Fix 401 handling: global interceptor for session expiry, login uses 400
- Code splitting, connection pooling, missing DB indexes
Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
* fix: Replace Bun-specific APIs with Node.js in Playwright E2E setup
Playwright runs under Node.js, not Bun, so Bun.spawn/Bun.sleep/import.meta.dir
cause ReferenceError in CI. Replace with child_process.execFileSync/spawn,
setTimeout-based sleep, and fileURLToPath for __dirname.
Also add top-level permissions block to CI workflow per CodeQL finding.
Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
* fix: Address Copilot and CodeRabbit review findings
- Fix campaign rollback to restore startedAt/completedAt/progress on enqueue
failure, not just status (CodeRabbit)
- Fix agentMatchesCapabilities to handle hashcatMode vs hashModes array
mismatch via array containment check (CodeRabbit)
- Remove Zustand store dependency from useCreateResource and
useUploadResourceFile cache invalidation — use partial key matching
per TanStack Query pattern (CodeRabbit)
- Parallelize inline task generation with Promise.all() (Copilot)
- Revert CI permissions block that broke oven-sh/setup-bun token auth
Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
* fix: Fix E2E CI — use db:push for test schema, build shared before E2E
- Use drizzle-kit push instead of migrate in E2E setup (no migration
files needed for test databases)
- Add db:push script to backend package.json
- Add shared package build step before E2E tests in CI workflow
(Vite needs @hashhive/shared built to resolve imports)
Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
* fix: Replace Bun.password.hash with subprocess call in E2E seed data
Playwright runs under Node.js, not Bun. Delegate bcrypt hashing to a
Bun subprocess via execFileSync since Bun is available on the CI runner.
Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
* fix: Address CodeRabbit E2E infrastructure feedback
- Add per-request AbortController timeout to waitForServer fetch calls
- Move S3 client destroy to finally block to prevent leak on error
- Use Promise.allSettled in teardown to avoid leaking containers
Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
* fix: Stabilize E2E smoke tests and address CodeRabbit feedback
- Use waitUntil: 'networkidle' + waitForSelector in smoke tests to
handle Vite HMR reloads during CI
- Add per-request AbortController timeout to waitForServer fetch
- Move S3 client destroy to finally block to prevent leak on error
- Use Promise.allSettled in teardown to avoid leaking containers
Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
* fix: Replace non-null assertions with explicit guards in E2E seed data
Aligns with noUncheckedIndexedAccess — throw descriptive errors instead
of suppressing with ! operator.
Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
* fix: Break 401 redirect loop on login page
The API client's global 401 handler unconditionally redirected to /login,
causing an infinite reload loop when fetchUser() fired on the login page.
Skip the redirect when already on /login.
Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
---------
Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>1 parent 864be8f commit 918d68c
80 files changed
Lines changed: 6410 additions & 341 deletions
File tree
- .github/workflows
- packages
- backend
- src
- config
- middleware
- queue
- workers
- routes
- agent
- dashboard
- services
- tests/unit
- workers
- frontend
- e2e
- setup
- src
- components/features
- hooks
- lib
- pages
- stores
- tests
- components
- fixtures
- hooks
- lib
- mocks
- pages
- stores
- utils
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| 105 | + | |
| 106 | + | |
105 | 107 | | |
106 | 108 | | |
107 | 109 | | |
| |||
114 | 116 | | |
115 | 117 | | |
116 | 118 | | |
| 119 | + | |
117 | 120 | | |
118 | 121 | | |
119 | 122 | | |
| |||
124 | 127 | | |
125 | 128 | | |
126 | 129 | | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
127 | 136 | | |
128 | 137 | | |
129 | 138 | | |
| |||
135 | 144 | | |
136 | 145 | | |
137 | 146 | | |
| 147 | + | |
138 | 148 | | |
139 | 149 | | |
140 | 150 | | |
| |||
156 | 166 | | |
157 | 167 | | |
158 | 168 | | |
| 169 | + | |
| 170 | + | |
159 | 171 | | |
160 | 172 | | |
161 | 173 | | |
162 | 174 | | |
163 | 175 | | |
164 | 176 | | |
165 | 177 | | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
166 | 181 | | |
167 | 182 | | |
168 | 183 | | |
| |||
186 | 201 | | |
187 | 202 | | |
188 | 203 | | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
189 | 210 | | |
190 | 211 | | |
191 | 212 | | |
| |||
229 | 250 | | |
230 | 251 | | |
231 | 252 | | |
| 253 | + | |
232 | 254 | | |
233 | 255 | | |
234 | 256 | | |
| |||
247 | 269 | | |
248 | 270 | | |
249 | 271 | | |
| 272 | + | |
250 | 273 | | |
251 | 274 | | |
252 | 275 | | |
253 | 276 | | |
254 | 277 | | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
255 | 289 | | |
256 | 290 | | |
257 | 291 | | |
| |||
0 commit comments