PageSourceSearch

https://full-court-defense-prod.firebaseapp.com/assets/CodeSecurityPage-kDL3Zl8w.js

js full-court-defense-prod.firebaseapp.com collected 2026-10-03 14:06:31 UTC 23,683 bytes, 1 lines download raw bytes

1import{r as e}from"./rolldown-runtime-NMqb_1LM.js";import{K as t,it as s}from"./vendor-4Klx9Wmc.js";import{Dt as a,J as l,Ot as r,Wt as n}from"./integrations-DyE0VHVJ.js";import{Tn as i,hr as o,wn as d}from"./index-Bqyhi1B_.js";var c=e(s(),1),x=t();function m(e="agentguard-security-mqant9g1"){return`https://github.com/apps/${encodeURIComponent(e)}/installations/select_target`}var u=[{step:"Connect GitHub",title:"Choose repos",detail:"Select the repositories you want Full Court Defense to protect."},{step:"Open a PR or push",title:"Use GitHub normally",detail:"Pull requests and pushes to the default branch scan automatically."},{step:"See results",title:"Check this page",detail:"Findings and pass/fail status appear here automatically."}],p=[{months:1,label:"Last 30 days"},{months:2,label:"Last 2 months"},{months:3,label:"Last 3 months"},{months:6,label:"Last 6 months"}];function b(e){switch(e){case"critical":return"bg-rose-100 text-rose-700";case"high":return"bg-orange-100 text-orange-700";case"medium":return"bg-amber-100 text-amber-700";default:return"bg-slate-100 text-slate-600"}}function h(e,t){return t?"Needs attention":e?"active"!==e.status?"Approval needed":"enabled"===e.branchProtection?"Merge blocking active":(e.branchProtection,"Scanning active"):"Setting up..."}function g(e){return e.pullRequest?`PR #${e.pullRequest}${e.pullRequestTitle?` - ${e.pullRequestTitle}`:""}`:e.branch?`Branch ${e.branch}`:"Latest scan"}function f(e){return e.pullRequest?"PR":e.branch||e.ref?.includes("/heads/")?"Push":"Scan"}function N(e){return e.pullRequest?g(e):`${e.branch||e.ref?.replace("refs/heads/","")||"branch"}${e.sha?` @ ${t=e.sha,t?t.slice(0,7):""}`:""}`;var t}function j(){o("Code Security CI/CD Vulnerability Scanning | Full Court Defense");const[e,t]=(0,c.useState)(null),[s,j]=(0,c.useState)(null),[v,w]=(0,c.useState)(!1),[y,k]=(0,c.useState)(null),[C,R]=(0,c.useState)([]),[S,H]=(0,c.useState)([]),[G,D]=(0,c.useState)(!0),[P,q]=(0,c.useState)({}),[L,F]=(0,c.useState)({}),[U,A]=(0,c.useState)(null),[$,I]=(0,c.useState)(1);(0,c.useEffect)(()=>{let e=!0;return async function(){const s=await i();e&&(s.success&&s.data?t(s.data):j(s.error||"Failed to load code security overview"))}(),()=>{e=!1}},[]);(0,c.useEffect)(()=>{const e=new URLSearchParams(window.location.search).get("installation_id");!async function(){if(e){k("Finishing GitHub connection...");const t=await n(e);window.history.replaceState({},"",window.location.pathname),t.success?k("GitHub connected. Selected repositories are loading..."):k(t.error||"Failed to register GitHub installation")}await(async()=>{D(!0);const e=(await a()).data?.installations||[];R(e);const t=[];for(const s of e){const e=await r(s.installationId);t.push(...(e.data?.repositories||[]).map(e=>({...e,installationId:s.installationId})))}H(t),D(!1)})()}()},[]);const _=e?.stats||{total:0,critical:0,high:0,medium:0,low:0,info:0,blocking:0},B=e?.latestRun,E=C.length>0,M=Boolean(E||B||(e?.findings?.length||0)>0||(e?.runs?.length||0)>0),O=(e?.runs||[]).filter(e=>function(e,t){const s=new Date(e.completedAt||e.createdAt).getTime();if(!Number.isFinite(s))return!0;const a=1===t?30:30*t;return s>=Date.now()-24*a*60*60*1e3}(e,$)).map(t=>{const s=(e?.findings||[]).filter(e=>e.runId===t.id&&"open"===e.status).sort((e,t)=>Number(t.blocking)-Number(e.blocking));return{run:t,findings:s,blockingFindings:s.filter(e=>e.blocking)}}),T=O.find(e=>e.run.id===U)||null,W=S.flatMap(e=>{const t=P[e.fullName],s=L[e.fullName];return s?[{repo:e,tone:"rose",title:"GitHub permission needed",detail:s,action:"permissions",actionLabel:"Review GitHub permissions"}]:"created"===t?.status||"existing"===t?.status?[{repo:e,tone:"blue",title:"Setup PR approval needed",detail:"GitHub did not allow direct workflow setup, so Full Court Defense opened a setup PR. Merge it once to activate CI/CD scanning.",action:"setup_pr",actionLabel:"Open setup PR",href:t.pullRequestUrl}]:"permission_required"===t?.branchProtection?[{repo:e,tone:"amber",title:"Merge blocking permission needed",detail:"Scanning is active, but GitHub did not allow Full Court Defense to require the security check before merge. Approve Administration permission to make blocked PRs unmergeable.",action:"permissions",actionLabel:"Review GitHub permissions"}]:"skipped"===t?.branchProtection?[{repo:e,tone:"amber",title:"Merge blocking not confirmed",detail
1:"Scanning is active, but branch protection could not be confirmed automatically. Retry setup after checking GitHub permissions.",action:"retry",actionLabel:"Retry setup"}]:[]}),K=async()=>{w(!0),k(null);const e=await l();if(!e.success||!e.data)return w(!1),void k(e.error||"Failed to start GitHub setup");if(e.data.installUrl)window.location.href=function(e){if(!e)return m();const t=e.match(/github\.com\/apps\/([^/?#]+)/i)?.[1];return t?m(decodeURIComponent(t)):m()}(e.data.installUrl);else{if(e.data.manifestActionUrl&&e.data.manifest){const t=document.createElement("form");t.method="post",t.action=e.data.manifestActionUrl;const s=document.createElement("input");return s.type="hidden",s.name="manifest",s.value=e.data.manifest,t.appendChild(s),document.body.appendChild(t),void t.submit()}w(!1),k("GitHub App setup is not configured yet.")}},z=async e=>{k(null);const t=await d({installationId:e.installationId,owner:e.owner,repo:e.name,defaultBranch:e.defaultBranch});t.success&&t.data?(q(s=>({...s,[e.fullName]:t.data})),F(t=>{const s={...t};return delete s[e.fullName],s})):F(s=>({...s,[e.fullName]:t.error||"Failed to start protection"}))};return(0,c.useEffect)(()=>{if(G||0===S.length)return;const e=S.filter(e=>!P[e.fullName]&&!L[e.fullName]);0!==e.length&&(k("Protection setup is starting automatically..."),e.forEach(e=>{z(e)}))},[G,S,P,L]),(0,x.jsxs)("div",{className:"min-h-screen bg-slate-50",children:[(0,x.jsx)("section",{className:"border-b border-slate-200 bg-gradient-to-br from-slate-950 via-blue-950 to-slate-900 text-white",children:(0,x.jsx)("div",{className:"mx-auto max-w-7xl px-4 py-10 sm:px-6 lg:px-8",children:(0,x.jsxs)("div",{className:"flex flex-col gap-8 lg:flex-row lg:items-center lg:justify-between",children:[(0,x.jsxs)("div",{className:"max-w-3xl",children:[(0,x.jsx)("div",{className:"mb-4 inline-flex items-center gap-2 rounded-full border border-cyan-300/30 bg-cyan-300/10 px-3 py-1 text-xs font-bold uppercase tracking-wide text-cyan-100",children:"Code Security + CI/CD"}),(0,x.jsx)("h1",{className:"text-3xl font-bold tracking-tight sm:text-4xl",children:E?"GitHub connected. We handle code security.":"Connect GitHub. We handle code security."}),(0,x.jsx)("p",{className:"mt-4 max-w-2xl text-sm leading-6 text-slate-300 sm:text-base",children:E?"Full Court Defense is activating protection automatically. After activation, pull requests and default-branch pushes are scanned automatically.":"Choose the repositories to protect. GitHub asks for read/write/admin approval once, then no scanner setup or manual PR configuration is needed."}),s&&(0,x.jsx)("div",{className:"mt-4 rounded-lg border border-amber-300/30 bg-amber-300/10 px-3 py-2 text-sm text-amber-100",children:s}),(0,x.jsx)("div",{className:"mt-6 flex flex-wrap gap-3",children:(0,x.jsx)("button",{type:"button",onClick:K,disabled:v||G,className:"rounded-lg bg-cyan-400 px-4 py-2 text-sm font-bold text-slate-950 shadow-sm hover:bg-cyan-300 disabled:opacity-60",children:E?v?"Opening GitHub...":"Manage selected repos":v?"Opening GitHub...":G?"Checking GitHub...":"Connect GitHub"})}),y&&(0,x.jsx)("div",{className:"mt-4 rounded-lg border border-amber-300/30 bg-amber-300/10 px-3 py-2 text-sm text-amber-100",children:y})]}),(0,x.jsxs)("div",{className:"grid w-full max-w-md grid-cols-2 gap-3",children:[(0,x.jsxs)("div",{className:"rounded-2xl border border-white/10 bg-white/10 p-4 backdrop-blur",children:[(0,x.jsx)("div",{className:"text-2xl font-bold",children:G?"Checking":E?"Connected":"Not connected"}),(0,x.jsx)("div",{className:"mt-1 text-xs uppercase tracking-wide text-slate-300",children:"GitHub status"})]}),(0,x.jsxs)("div",{className:"rounded-2xl border border-white/10 bg-white/10 p-4 backdrop-blur",children:[(0,x.jsx)("div",{className:"text-2xl font-bold",children:E?S.length:"-"}),(0,x.jsx)("div",{className:"mt-1 text-xs uppercase tracking-wide text-slate-300",children:"Selected repos"})]}),(0,x.jsxs)("div",{className:"rounded-2xl border border-white/10 bg-white/10 p-4 backdrop-blur",children:[(0,x.jsx)("div",{className:"text-3xl font-bold",children:M?_.blocking:"-"}),(0,x.jsx)("div",{className:"mt-1 text-xs uppercase tracking-wide text-slate-300",children:"Blocking findings"})]}),(0,x.jsxs)("div",{className:"rounded-2xl border border-white/10 bg-white/10 p-4 backdrop-blur",children:[(0,x.jsx)("div",{className:"text-3xl font-bold",children:M?e?.runs.length||0:"-"}),(0,x.jsx)("div",{className:"mt-1 text-xs uppercase tracking-wide text-slate-300",children:"Recent 
1CI runs"})]})]})]})})}),(0,x.jsxs)("main",{className:"mx-auto max-w-7xl space-y-6 px-4 py-8 sm:px-6 lg:px-8",children:[(0,x.jsxs)("section",{className:"rounded-2xl border border-blue-200 bg-white p-6 shadow-sm",children:[(0,x.jsx)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-end sm:justify-between",children:(0,x.jsxs)("div",{children:[(0,x.jsx)("div",{className:"text-xs font-bold uppercase tracking-wide text-blue-600",children:E?"Next step":"Start here"}),(0,x.jsx)("h2",{className:"mt-2 text-2xl font-bold text-slate-900",children:E?"Protection is activating automatically":"Connect GitHub and choose repositories"}),(0,x.jsx)("p",{className:"mt-2 max-w-3xl text-sm leading-6 text-slate-600",children:E?"You can keep working in GitHub normally. Full Court Defense will show PR and push status here.":"Click Connect GitHub, select the repos to protect, then approve the requested GitHub permissions once."})]})}),(0,x.jsx)("div",{className:"mt-6 grid gap-4 lg:grid-cols-3",children:u.map((e,t)=>(0,x.jsxs)("div",{className:"relative rounded-xl border border-slate-200 bg-slate-50 p-4",children:[(0,x.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full bg-blue-600 text-sm font-bold text-white",children:t+1}),(0,x.jsx)("div",{className:"mt-4 text-xs font-bold uppercase tracking-wide text-blue-600",children:e.step}),(0,x.jsx)("h3",{className:"mt-1 font-bold text-slate-900",children:e.title}),(0,x.jsx)("p",{className:"mt-2 text-sm leading-6 text-slate-600",children:e.detail})]},e.step))}),!E&&(0,x.jsx)("div",{className:"mt-4 rounded-xl border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-800",children:"No repositories connected yet."})]}),E&&(0,x.jsxs)("section",{className:"rounded-2xl border border-emerald-200 bg-emerald-50 p-6 shadow-sm",children:[(0,x.jsx)("div",{className:"text-xs font-bold uppercase tracking-wide text-emerald-700",children:"Connected"}),(0,x.jsx)("h2",{className:"mt-2 text-xl font-bold text-emerald-950",children:"Selected repositories"}),(0,x.jsx)("p",{className:"mt-2 text-sm leading-6 text-emerald-800",children:"Full Court Defense activates scanning automatically. Future pull requests and default-branch pushes scan after activation."}),W.length>0&&(0,x.jsxs)("div",{className:"mt-4 space-y-3",children:[(0,x.jsxs)("div",{className:"rounded-xl border border-amber-200 bg-white px-4 py-3 text-sm text-amber-900",children:[(0,x.jsx)("div",{className:"font-bold",children:"Action needed to finish click-and-go setup"}),(0,x.jsx)("div",{className:"mt-1 text-amber-800",children:"Some selected repositories still need GitHub approval or setup PR merge before scanning and merge blocking are fully automatic."})]}),W.map(e=>(0,x.jsx)("div",{className:"rounded-xl border bg-white px-4 py-3 text-sm "+("rose"===e.tone?"border-rose-200 text-rose-800":"blue"===e.tone?"border-blue-200 text-blue-800":"border-amber-200 text-amber-800"),children:(0,x.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,x.jsxs)("div",{children:[(0,x.jsxs)("div",{className:"font-bold",children:[e.repo.fullName,": ",e.title]}),(0,x.jsx)("div",{className:"mt-1",children:e.detail})]}),"setup_pr"===e.action&&e.href?(0,x.jsx)("a",{href:e.href,target:"_blank",rel:"noreferrer",className:"whitespace-nowrap rounded-lg bg-blue-600 px-3 py-2 text-center text-xs font-bold text-white hover:bg-blue-700",children:e.actionLabel}):"retry"===e.action?(0,x.jsx)("button",{type:"button",onClick:()=>{z(e.repo)},className:"whitespace-nowrap rounded-lg bg-amber-500 px-3 py-2 text-xs font-bold text-amber-950 hover:bg-amber-600",children:e.actionLabel}):(0,x.jsx)("button",{type:"button",onClick:K,className:"whitespace-nowrap rounded-lg bg-amber-500 px-3 py-2 text-xs font-bold text-amber-950 hover:bg-amber-600",children:e.actionLabel})]})},`${e.repo.fullName}-${e.title}`))]}),(0,x.jsx)("div",{className:"mt-4 rounded-xl bg-white/70 p-4",children:(0,x.jsx)("div",{className:"mt-2 grid gap-3",children:S.length>0?S.map(e=>{const t=P[e.fullName],s=L[e.fullName];return(0,x.jsxs)("div",{className:"rounded-xl border border-emerald-100 bg-white p-3",children:[(0,x.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,x.jsxs)("div",{children:[(0,x.jsx)("div",{className:"font-semibold text-emerald-950",children:e.fullName}),(0,x.jsxs)("div",{className:"mt-1 text-xs text-emerald-700",children:["Default branch: ",e.defaultBranch||"main"]})]}),(0,x.jsx)("span",{className:"rounded-full px-3 py-1 text-xs font-bold "+("active"===t?.status?"bg-emerald-100 text-emerald-700":s?"bg-rose-100 text-rose-700":t?"bg-blue-100 text-blue-700":"bg-amber-100 text-amber-700"),children:h(t,s)})]}),"active"===t?.status&&"permission_required"===t.branchProtection&&(0,x.jsx)("div",{className:"mt-3 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-800",children:"Scanning is active. Merge blocking will turn on after GitHub approves administration permission for this app."}),t?.pullRequestUrl&&(0,x.jsxs)("a",{href:t.pullRequestUrl,target:"_blank",rel:"noreferrer",className:"mt-3 inline-block text-sm font-semibold text-emerald-700 underline",children:["Approve GitHub setup",t.pullRequestNumber?` #${t.pullRequestNumber}`:""]}),s&&(0,x.jsx)("div",{className:"mt-3 rounded-lg border border-rose-200 bg-rose-50 px-3 py-2 text-sm text-rose-700",children:s})]},e.fullName)}):(0,x.jsx)("span",{className:"text-sm text-emerald-800",children:"Repository access connected. Refreshing selected repositories..."})})})]}),(0,x.jsxs)("section",{className:"grid gap-6 lg:grid-cols-2",children:[(0,x.jsxs)("div",{className:"rounded-2xl border border-slate-200 bg-white p-6 shadow-sm",children:[(0,x.jsx)("div",{className:"text-xs font-bold uppercase tracking-wide text-blue-600",children:"Current Status"}),(0,x.jsx)("h2",{className:"mt-2 text-xl font-bold text-slate-900",children:B?g(B):E?`${S.length} selected repos`:"No repository connected yet"}),B&&(0,x.jsx)("div",{className:"mt-1 text-sm text-slate-500",children:B.repository}),(0,x.jsxs)("div",{className:"mt-4 grid grid-cols-2 gap-3",children:[(0,x.jsxs)("div",{className:"rounded-xl bg-slate-50 p-4",children:[(0,x.jsx)("div",{className:"text-2xl font-bold text-slate-900",children:_.total}),(0,x.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wide text-slate-500",children:"Open findings"})]}),(0,x.jsxs)("div",{className:"rounded-xl bg-rose-50 p-4",children:[(0,x.jsx)("div",{className:"text-2xl font-bold text-rose-700",children:_.critical+_.high}),(0,x.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wide text-rose-500",children:"High/Critical"})]})]}),B?.gateDecision&&(0,x.jsxs)("div",{className:"mt-4 rounded-xl border p-4 text-sm "+("fail"===B.gateDecision.decision?"border-rose-200 bg-rose-50 text-rose-700":"border-emerald-200 bg-emerald-50 text-emerald-700"),children:[(0,x.jsxs)("div",{className:"font-bold",children:["Latest gate: ",B.gateDecision.decision.toUpperCase()]}),(0,x.jsx)("div",{className:"mt-1",children:B.gateDecision.reason})]})]}),(0,x.jsx)("div",{className:"rounded-2xl border border-slate-200 bg-white p-6 shadow-sm",children:(0,x.jsxs)("div",{children:[(0,x.jsx)("div",{className:"text-xs font-bold uppercase tracking-wide text-blue-600",children:"What to do in GitHub"}),(0,x.jsx)("h2",{className:"mt-2 text-xl font-bold text-slate-900",children:"Choose repositories only"}),(0,x.jsxs)("div",{className:"mt-4 space-y-3 text-sm text-slate-600",children:[(0,x.jsxs)("div",{className:"rounded-lg bg-slate-50 p-3",children:[(0,x.jsx)("span",{className:"font-bold text-slate-900",children:"1."})," Select the GitHub organization or account."]}),(0,x.jsxs)("div",{className:"rounded-lg bg-slate-50 p-3",children:[(0,x.jsx)("span",{className:"font-bold text-slate-900",children:"2."})," Choose only the repositories you want Full Court Defense to protect."]}),(0,x.jsxs)("div",{className:"rounded-lg bg-slate-50 p-3",children:[(0,x.jsx)("span",{className:"font-bold text-slate-900",children:"3."})," Approve the requested GitHub permissions once. Workflow setup and merge blocking run automatically after that."]})]})]})})]}),(0,x.jsxs)("section",{className:"rounded-2xl border border-slate-200 bg-white p-6 shadow-sm",children:[(0,x.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-end sm:justify-between",children:[(0,x.jsxs)("div",{children:[(0,x.jsx)("h2",{className:"text-xl font-bold text-slate-900",children:"Security Runs"}),(0,x.jsx)("p",{className:"mt-1 text-sm text-slate-500",children:O.length?"Every row is a PR, push, or manual scan. Click a row to see all vulnerabilities found in that run.":"No scan results yet. Real results appear after a protected repository runs CI."})]}),(0,x.jsxs)("label",{className:"text-sm font-semibold text-slate-700",children:["Time range",(0,x.jsx)("select",{value:$,onChange:e=>{I(Number(e.target.value)),A(null)},className:"mt-1 block rounded-lg border border-slate-200 bg-white px-3 py-2 text-sm font-semibold text-slate-700 shadow-sm focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-100",children:p.map(e=>(0,x.jsx)("option",{value:e.months,children:e.label},e.months))})]})]}),(0,x.jsx)("div",{className:"mt-5",children:O.length>0?(0,x.jsx)("div",{className:"overflow-hidden rounded-2xl border border-slate-200",children:(0,x.jsx)("div",{className:"overflow-x-auto",children:(0,x.jsxs)("table",{className:"min-w-full divide-y divide-slate-200 text-sm",children:[(0,x.jsx)("thead",{className:"bg-slate-50 text-xs font-bold uppercase tracking-wide text-slate-500",children:(0,x.jsxs)("tr",{children:[(0,x.jsx)("th",{className:"px-4 py-3 text-left",children:"Event"}),(0,x.jsx)("th",{className:"px-4 py-3 text-left",children:"Repository"}),(0,x.jsx)("th",{className:"px-4 py-3 text-left",children:"PR / Commit"}),(0,x.jsx)("th",{className:"px-4 py-3 text-left",children:"Status"}),(0,x.jsx)("th",{className:"px-4 py-3 text-left",children:"Findings"}),(0,x.jsx)("th",{className:"px-4 py-3 text-left",children:"Scanned"})]})}),(0,x.jsx)("tbody",{className:"divide-y divide-slate-200 bg-white",children:O.map(e=>{const t="fail"===e.run.gateDecision?.decision,s=U===e.run.id;return(0,x.jsxs)("tr",{onClick:()=>A(s?null:e.run.id),className:"cursor-pointer transition hover:bg-blue-50 "+(t?"bg-rose-50/70":s?"bg-blue-50":""),children:[(0,x.jsx)("td",{className:"whitespace-nowrap px-4 py-3 font-semibold text-slate-700",children:f(e.run)}),(0,x.jsx)("td",{className:"whitespace-nowrap px-4 py-3 font-semibold text-slate-950",children:e.run.repository}),(0,x.jsxs)("td",{className:"px-4 py-3",children:[e.run.pullRequestUrl?(0,x.jsx)("a",{href:e.run.pullRequestUrl,target:"_blank",rel:"noreferrer",onClick:e=>e.stopPropagation(),className:"font-semibold text-blue-700 hover:underline",children:N(e.run)}):(0,x.jsx)("span",{className:"font-semibold text-slate-800",children:N(e.run)}),e.run.gateDecision?.reason&&(0,x.jsx)("div",{className:"mt-1 max-w-xl truncate text-xs text-slate-500",children:e.run.gateDecision.reason})]}),(0,x.jsx)("td",{className:"whitespace-nowrap px-4 py-3",children:(0,x.jsx)("span",{className:"rounded-full px-3 py-1 text-xs font-bold "+(t?"bg-rose-100 text-rose-700":"bg-emerald-100 text-emerald-700"),children:t?"BLOCKED":"completed"===e.run.status?"PASSED":e.run.status.toUpperCase()})}),(0,x.jsxs)("td",{className:"whitespace-nowrap px-4 py-3 text-slate-700",children:[(0,x.jsx)("span",{className:"font-bold text-rose-700",children:e.run.summary.blocking})," blocking",(0,x.jsx)("span",{className:"mx-1 text-slate-300",children:"/"}),(0,x.jsx)("span",{className:"font-bold",children:e.run.summary.total})," total"]}),(0,x.jsx)("td",{className:"whitespace-nowrap px-4 py-3 text-slate-500",children:(a=e.run.completedAt||e.run.createdAt,a?new Date(a).toLocaleStr
1ing(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}):"")})]},e.run.id);var a})})]})})}):(0,x.jsx)("div",{className:"rounded-xl border border-slate-200 bg-slate-50 px-4 py-10 text-center text-sm text-slate-500",children:"No real security runs yet."})}),T&&(0,x.jsxs)("div",{className:"mt-5 overflow-hidden rounded-2xl border border-slate-200 bg-white",children:[(0,x.jsxs)("div",{className:"border-b border-slate-200 bg-slate-50 px-4 py-4",children:[(0,x.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-start sm:justify-between",children:[(0,x.jsxs)("div",{children:[(0,x.jsx)("div",{className:"text-xs font-bold uppercase tracking-wide text-slate-500",children:"Run details"}),(0,x.jsxs)("h3",{className:"mt-1 text-lg font-bold text-slate-950",children:[f(T.run),": ",N(T.run)]}),(0,x.jsx)("p",{className:"mt-1 text-sm text-slate-500",children:T.run.repository})]}),(0,x.jsx)("button",{type:"button",onClick:()=>A(null),className:"rounded-lg border border-slate-200 px-3 py-2 text-sm font-semibold text-slate-600 hover:bg-white",children:"Close"})]}),T.run.gateDecision&&(0,x.jsxs)("div",{className:"mt-3 rounded-xl border px-4 py-3 text-sm "+("fail"===T.run.gateDecision.decision?"border-rose-200 bg-rose-50 text-rose-800":"border-emerald-200 bg-emerald-50 text-emerald-800"),children:[(0,x.jsx)("span",{className:"font-bold",children:"fail"===T.run.gateDecision.decision?"Reason for blocking: ":"Result: "}),T.run.gateDecision.reason]})]}),(0,x.jsx)("div",{className:"divide-y divide-slate-200",children:T.findings.length>0?T.findings.map(e=>{return(0,x.jsxs)("div",{className:"grid gap-3 px-4 py-4 text-sm lg:grid-cols-[110px_120px_1fr_130px] lg:items-start",children:[(0,x.jsx)("div",{children:(0,x.jsx)("span",{className:`rounded-full px-2 py-1 text-xs font-bold ${b(e.severity)}`,children:(s=e.severity,s.charAt(0).toUpperCase()+s.slice(1))})}),(0,x.jsx)("div",{className:"font-semibold text-slate-600",children:e.tool}),(0,x.jsxs)("div",{children:[(0,x.jsx)("div",{className:"font-semibold text-slate-900",children:e.title}),(0,x.jsx)("div",{className:"mt-1 text-slate-600",children:e.message}),(0,x.jsxs)("div",{className:"mt-2 text-xs text-slate-500",children:[e.location?.f
1ile?`${e.location.file}${e.location.startLine?`:${e.location.startLine}`:""}`:"Repository-level finding",e.helpUri&&(0,x.jsx)("a",{href:e.helpUri,target:"_blank",rel:"noreferrer",className:"ml-2 font-semibold text-blue-700 underline",children:"Learn more"})]})]}),(0,x.jsx)("div",{children:(0,x.jsx)("span",{className:"rounded-full border px-2 py-1 text-xs font-bold "+(t=e.blocking?"Blocking":"Report only","Blocking"===t?"bg-rose-50 text-rose-700 border-rose-200":"bg-slate-50 text-slate-600 border-slate-200"),children:e.blocking?"Blocking":"Report only"})})]},e.id);var t,s}):(0,x.jsx)("div",{className:"px-4 py-8 text-center text-sm text-slate-500",children:"No open vulnerabilities for this run."})})]})]})]})]})}export{j as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.