import { useEffect } from 'react'; import { Info } from 'lucide-react'; import { useTrivyStatus } from '@/hooks/useTrivyStatus'; import { useNodes } from '@/context/NodeContext'; import { TrivyManager } from './TrivyManager'; /** Scanner install/update/health for the active node. Owns the single * useTrivyStatus instance and feeds the controlled TrivyManager. */ export function ScannerSetupTab() { const { status, updateCheck, refresh, refreshUpdateCheck } = useTrivyStatus(); const { activeNode } = useNodes(); const isRemote = activeNode?.type === 'remote'; // useTrivyStatus only refreshes on mount. Re-fetch when the active node // changes so the displayed scanner state matches the node TrivyManager's // actions target (both follow x-node-id); otherwise switching nodes while on // this tab would show node A's status while install/update hit node B. useEffect(() => { void refresh(); }, [activeNode?.id, refresh]); return (
Vulnerability scanning uses Trivy, installed independently on each node. Manage the scanner for the active node here.
Trivy is installed independently on each Sencho instance. Scan policies and CVE suppressions are managed on the control node.