Fully autonomous AI Agents system capable of performing complex penetration testing tasks
Go ai-agentsai-security-toolanthropicautonomous-agentsgolanggptgraphqlmulti-agent-systemoffensive-securityopen-sourceopenaipenetration-testingpenetration-testing-toolsreactsecurity-automationsecurity-testingsecurity-toolsself-hosted
ci(webui): make all frontend CI checks blocking
Sergey Kozyrenkob6db0b59adfc
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex a8c2ab4c..1f0d0050 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -59,12 +59,10 @@ jobs:- name: Frontend - Prettierworking-directory: frontendrun: pnpm run prettier- continue-on-error: true- name: Frontend - Lintworking-directory: frontendrun: pnpm run lint- continue-on-error: true- name: Frontend - Type checkworking-directory: frontend@@ -73,7 +71,6 @@ jobs:- name: Frontend - Testworking-directory: frontendrun: pnpm run test- continue-on-error: true# Backend lint and test- name: Backend - Download dependenciesdiff --git a/frontend/src/components/layouts/main-sidebar.test.tsx b/frontend/src/components/layouts/main-sidebar.test.tsxindex a9ea1f78..6cab7bee 100644--- a/frontend/src/components/layouts/main-sidebar.test.tsx+++ b/frontend/src/components/layouts/main-sidebar.test.tsx@@ -4,7 +4,10 @@ import { MemoryRouter, Route, Routes, useLocation } from 'react-router-dom';import { describe, expect, it, vi } from 'vitest';vi.mock('@/providers/user-provider', () => ({- useUser: () => ({ authInfo: { user: { mail: '[email protected]', name: 'Test User', type: 'local' } }, logout: vi.fn() }),+ useUser: () => ({+ authInfo: { user: { mail: '[email protected]', name: 'Test User', type: 'local' } },+ logout: vi.fn(),+ }),}));vi.mock('@/hooks/use-theme', () => ({ useTheme: () => ({ setTheme: vi.fn(), theme: 'system' }) }));vi.mock('@/providers/favorites-provider', () => ({@@ -32,9 +35,18 @@ function renderSidebar() {<MainSidebar /></SidebarProvider><Routes>- <Route element={<div>dashboard</div>} path="/dashboard" />- <Route element={<FromProbe />} path="/settings" />- <Route element={<FromProbe />} path="/settings/account" />+ <Route+ element={<div>dashboard</div>}+ path="/dashboard"+ />+ <Route+ element={<FromProbe />}+ path="/settings"+ />+ <Route+ element={<FromProbe />}+ path="/settings/account"+ /></Routes></MemoryRouter>,);diff --git a/frontend/src/components/layouts/settings-layout.test.tsx b/frontend/src/components/layouts/settings-layout.test.tsxindex 87736f7a..3d78649f 100644--- a/frontend/src/components/layouts/settings-layout.test.tsx+++ b/frontend/src/components/layouts/settings-layout.test.tsx@@ -9,9 +9,18 @@ function renderAt(entry: { pathname: string; state?: unknown }) {return render(<MemoryRouter initialEntries={[entry]}><Routes>- <Route element={<SettingsLayout />} path="/settings">- <Route element={<div>account</div>} path="account" />- <Route element={<div>providers</div>} path="providers" />+ <Route+ element={<SettingsLayout />}+ path="/settings"+ >+ <Route+ element={<div>account</div>}+ path="account"+ />+ <Route+ element={<div>providers</div>}+ path="providers"+ /></Route></Routes></MemoryRouter>,diff --git a/frontend/src/components/ui/input-search.test.tsx b/frontend/src/components/ui/input-search.test.tsxindex 59901016..314d25f5 100644--- a/frontend/src/components/ui/input-search.test.tsx+++ b/frontend/src/components/ui/input-search.test.tsx@@ -141,19 +141,37 @@ describe('InputSearch — trailing clear button', () => {const queryClearButton = () => screen.queryByRole('button', { name: 'Clear search docs' });it('does not render the clear button when the field is empty', () => {- render(<SearchHost emitted={[]} initialQuery="" />, { wrapper: Wrapper });+ render(+ <SearchHost+ emitted={[]}+ initialQuery=""+ />,+ { wrapper: Wrapper },+ );expect(queryClearButton()).not.toBeInTheDocument();});it('renders the clear button on mount when deep-linked with a non-empty query', () => {- render(<SearchHost emitted={[]} initialQuery="jwt" />, { wrapper: Wrapper });+ render(+ <SearchHost+ emitted={[]}+ initialQuery="jwt"+ />,+ { wrapper: Wrapper },+ );expect(queryClearButton()).toBeInTheDocument();});it('shows the clear button after typing, hides it once the field is empty again', async () => {const emitted: string[] = [];const user = userEvent.setup();- render(<SearchHost emitted={emitted} initialQuery="" />, { wrapper: Wrapper });+ render(+ <SearchHost+ emitted={emitted}+ initialQuery=""+ />,+ { wrapper: Wrapper },+ );await user.click(queryTrigger()!);expect(queryClearButton()).not.toBeInTheDocument();@@ -168,7 +186,13 @@ describe('InputSearch — trailing clear button', () => {it('clears the value, emits "" upstream, and keeps focus on the input', async () => {const emitted: string[] = [];const user = userEvent.setup();- render(<SearchHost emitted={emitted} initialQuery="jwt" />, { wrapper: Wrapper });+ render(+ <SearchHost+ emitted={emitted}+ initialQuery="jwt"+ />,+ { wrapper: Wrapper },+ );const input = getInput();await user.click(queryClearButton()!);diff --git a/frontend/src/lib/report/report-pdf.tsx b/frontend/src/lib/report/report-pdf.tsxindex de76c352..edac39ea 100644--- a/frontend/src/lib/report/report-pdf.tsx+++ b/frontend/src/lib/report/report-pdf.tsx@@ -3,8 +3,10 @@ import { marked } from 'marked';import { Log } from '@/lib/log';-const CJK_RE = /[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Bopomofo}\u3000-\u303f\uff00-\uffef]+/gu;-const HAS_CJK_RE = /[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Bopomofo}\u3000-\u303f\uff00-\uffef]/u;+const CJK_RE =+ /[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Bopomofo}\u3000-\u303f\uff00-\uffef]+/gu;+const HAS_CJK_RE =+ /[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Bopomofo}\u3000-\u303f\uff00-\uffef]/u;let hasBaseFonts = false;let hasCJKFonts = false;diff --git a/frontend/src/pages/login.tsx b/frontend/src/pages/login.tsxindex 3182a7b1..88029164 100644--- a/frontend/src/pages/login.tsx+++ b/frontend/src/pages/login.tsx@@ -13,7 +13,10 @@ function Login() {const { authInfo, isLoading } = useUser();const authProviders = authInfo?.providers || [];- const returnUrl = getSafeReturnUrl((location.state?.from as string) || searchParams.get('returnUrl'), routes.newFlow);+ const returnUrl = getSafeReturnUrl(+ (location.state?.from as string) || searchParams.get('returnUrl'),+ routes.newFlow,+ );return (<div className="flex h-dvh w-full items-center justify-center">