PageSourceSearch

https://kotavlabs.com/assets/AdminAppSecWorkspace-DZ3I_s1W.js

js kotavlabs.com collected 2026-10-06 07:18:18 UTC 13,979 bytes, 1 lines download raw bytes

1import{b as O,r as d,j as e}from"./vendor-react-Rvk9on0c.js";import{b as g}from"./index-CmACDpJa.js";import{p as V}from"./productCatalog-B9uEHAi_.js";import{q as w,ad as y,b7 as I,c as M,ae as P,am as W,L as D,R as B}from"./vendor-icons-3tHL_zt8.js";import"./vendor-query-CMHVTZYo.js";import"./vendor-i18n-BaZGA7ZO.js";import"./vendor-http-DhXgJQ-f.js";function ie(){const s=O(),t=H(s.pathname),[r,i]=d.useState([]),[m,R]=d.useState(""),[o,v]=d.useState(null),[E,f]=d.useState([]),[h,j]=d.useState([]),L=V("APPSEC");d.useEffect(()=>{g.get("/api/labs/tenants").then(a=>{const n=a.data.filter(b=>b.slug!=="kotav-labs");i(n);const x=n.find(b=>b.slug==="demo-client");R(b=>{var C;return b||(x==null?void 0:x.id)||((C=n[0])==null?void 0:C.id)||""})}).catch(()=>i([]))},[]),d.useEffect(()=>{m&&(v(null),f([]),j([]),g.get("/api/labs/product-access",{params:{tenantId:m}}).then(a=>v(a.data)).catch(()=>v({tenantId:m,products:[]})),g.get("/api/labs/appsec/repositories",{params:{tenantId:m}}).then(a=>f(a.data)).catch(()=>f([])),g.get("/api/labs/appsec/runs",{params:{tenantId:m,limit:25}}).then(a=>j(a.data)).catch(()=>j([])))},[m]);const N=d.useMemo(()=>((o==null?void 0:o.products)??[]).filter(a=>a.entitlements.some(n=>n.productFamily==="APPSEC")),[o]),T=E.filter(a=>a.appsecEnabled).length,F=h.filter(a=>a.status==="COMPLETED"||a.status==="PARTIAL").length,_=h.filter(a=>["PENDING","CLAIMED","RUNNING"].includes(a.status)).length,G=d.useMemo(()=>new Map(((o==null?void 0:o.products)??[]).map(a=>[a.id,a.name])),[o]),S={appsec:["AppSec overview","Tenant entitlement, repository onboarding, and the current operating state of the AppSec pipeline."],repositories:["Repositories","Repository access, protected-product mapping, and runtime boundary linkage for this tenant."],runs:["Pipeline runs","Recent executions across commit checks, pre-release validation, and scheduled assurance."]},[$,q]=S[t]??S.appsec;return e.jsxs("div",{className:"mx-auto max-w-6xl",children:[e.jsxs("div",{className:"mb-8 flex flex-wrap items-end justify-between gap-4",children:[e.jsxs("div",{className:"max-w-3xl",children:[e.jsx("div",{className:"mono-label mb-2",children:"// argus appsec"}),e.jsx("h1",{className:"text-4xl font-semibold text-ink-50",children:$}),e.jsx("p",{className:"mt-3 text-prose",children:q})]}),e.jsxs("label",{className:"min-w-64",children:[e.jsx("span",{className:"mb-1.5 block font-mono text-[9px] uppercase text-ink-300",children:"customer tenant"}),e.jsx("select",{value:m,onChange:a=>R(a.target.value),className:"h-10 w-full rounded border border-ink-600 bg-white px-3 text-sm text-ink-50",children:r.map(a=>e.jsx("option",{value:a.id,children:a.name},a.id))})]})]}),t==="appsec"?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid gap-px overflow-hidden rounded border border-ink-700 bg-ink-
1700 sm:grid-cols-3",children:[{label:"entitled products",value:N.length,icon:w},{label:"enabled repositories",value:T,icon:y},{label:"runs ready for review",value:F,icon:I}].map(({label:a,value:n,icon:x})=>e.jsxs("div",{className:"bg-white p-5",children:[e.jsx(x,{className:"mb-5 h-4 w-4 text-lime-600"}),e.jsx("div",{className:"text-3xl font-semibold text-ink-50",children:n}),e.jsx("div",{className:"mt-1 font-mono text-[10px] uppercase text-ink-300",children:a})]},a))}),e.jsxs("section",{className:"mt-8 grid gap-4 lg:grid-cols-3",children:[e.jsx(k,{label:"active pipeline jobs",value:_,body:"Jobs currently pending or running for this tenant."}),e.jsx(k,{label:"completed executions",value:h.filter(a=>a.status==="COMPLETED").length,body:"Finished runs that produced a full result set."}),e.jsx(k,{label:"partial executions",value:h.filter(a=>a.status==="PARTIAL").length,body:"Runs that returned usable output but need operator attention."})]}),e.jsxs("section",{className:"mt-10 border-t border-ink-700 pt-7",children:[e.jsx("div",{className:"mono-label mb-4",children:"// active product access"}),N.length===0?e.jsx(A,{icon:M,title:"No AppSec entitlement",body:"This tenant has no AppSec product provisioned."}):e.jsx("div",{className:"divide-y divide-ink-700 border-y border-ink-700",children:N.map(a=>{var n;return e.jsxs("div",{className:"grid gap-2 py-5 sm:grid-cols-[1.3fr_1fr_auto] sm:items-center",children:[e.jsxs("div",{children:[e.jsx("div",{className:"font-medium text-ink-50",children:a.name}),e.jsx("div",{className:"mt-1 text-xs text-prose",children:a.description})]}),e.jsx("div",{className:"font-mono text-[10px] uppercase text-ink-300",children:(n=a.entitlements.find(x=>x.productFamily==="APPSEC"))==null?void 0:n.planKey}),e.jsx("span",{className:"font-mono text-[10px] uppercase text-green-700",children:"active"})]},a.id)})})]})]}):t==="runs"?e.jsx(U,{runs:h}):e.jsx(K,{repositories:E,productNames:G,familyName:L.name})]})}function H(s){return s.endsWith("/repositories")?"repositories":s.endsWith("/runs")?"runs":"appsec"}function K({repositories:s,productNames:t,familyName:r}){return s.length===0?e.jsx(A,{icon:y,title:"No repositories synced yet",body:`The entitlement is live; ${r} stays restricted until a GitHub installation syncs selected repositories into this tenant.`}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("section",{className:"grid gap-px overflow-hidden rounded border border-ink-700 bg-ink-
1700 sm:grid-cols-2 xl:grid-cols-5",children:[e.jsx(l,{label:"total repositories",value:s.length,icon:y}),e.jsx(l,{label:"enabled for appsec",value:s.filter(i=>i.appsecEnabled).length,icon:w}),e.jsx(l,{label:"runtime linked",value:s.filter(i=>i.engagementId).length,icon:B}),e.jsx(l,{label:"human review required",value:s.filter(i=>i.materialReviewRequired).length,icon:D}),e.jsx(l,{label:"agentic review",value:s.filter(i=>i.agenticReviewEnabled).length,icon:M})]}),e.jsxs("section",{className:"overflow-hidden rounded border border-ink-700",children:[e.jsxs("div",{className:"grid gap-3 border-b border-ink-700 bg-white px-5 py-4 lg:grid-cols-[1.15fr_1.25fr_0.8fr]",children:[e.jsxs("div",{children:[e.jsx("div",{className:"mono-label",children:"// repository policy surface"}),e.jsx("h2",{className:"mt-2 text-xl font-semibold text-ink-50",children:"Repository authorisation and policy mapping"})]}),e.jsx("div",{className:"text-sm leading-relaxed text-prose lg:col-span-2",children:"Admin can see exactly which repositories are enabled, how they are mapped to protected products, and whether runtime correlation is linked to an authorised engagement."})]}),e.jsx("div",{className:"divide-y divide-ink-700",children:s.map(i=>e.jsxs("div",{className:"grid gap-5 bg-white px-5 py-5 xl:grid-cols-[1fr_1.2fr_0.9fr]",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{className:"font-mono text-[10px] uppercase text-lime-600",children:i.provider}),e.jsx("span",{className:"font-mono text-[10px] uppercase text-ink-300",children:i.privateRepo?"private":"public"}),e.jsx("span",{className:"font-mono text-[10px] uppercase text-ink-300",children:i.defaultBranch??"branch unknown"})]}),e.jsx("h3",{className:"mt-2 text-base font-semibold text-ink-50",children:i.fullName}),e.jsx("p",{className:"mt-2 text-sm leading-relaxed text-prose",children:i.appsecEnabled?"Authorised for AppSec pipeline execution.":"Synced into the tenant but currently excluded from AppSec execution."})]}),e.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[e.jsx(c,{label:"scan profile",value:u(i.scanProfile)}),e.jsx(c,{label:"deployment gate",value:u(i.deploymentGateMode)}),e.jsx(c,{label:"protected product",value:i.protectedProductId?t.get(i.protectedProductId)??"Mapped product":"Not mapped"}),e.jsx(c,{label:"runtime link",value:i.engagementId?"Authorised engagement linked":"Code only"}),e.jsx(c,{label:"daily cap",value:`${i.maxChecksPerDay} checks`}),e.jsx(c,{label:"review policy",value:i.materialReviewRequired?"Autonomous + human approval":"Autonomous adjudication"}),e.jsx(c,{label:"reasoning lane",value:i.agenticReviewEnabled?`${u(i.agenticProvider)} / ${i.agenticModel}`:"Disabled"}),e.jsx(c,{label:"agentic cadence",value:i.agenticReviewEnabled?u(i.agenticCadence):"Deterministic only"}),e.jsx(c,{label:"review boundary",value:i.agenticReviewEnabled?`${i.agenticMaxFiles} files / ${Math.round(i.agenticMaxContextBytes/1e3)} KB / ${i.agenticMaxTurns} turns`:"No external processing"})]}),e.jsxs("div",{className:"grid gap-2 content-start",children:[e.jsx(p,{enabled:i.appsecEnabled,label:"AppSec enabled"}),e.jsx(p,{enabled:i.prChecksEnabled,label:"PR checks"}),e.jsx(p,{enabled:i.pushChecksEnabled,label:"Push signals"}),e.jsx(p,{enabled:i.releaseValidationEnabled,label:"Pre-release"}),e.jsx(p,{enabled:i.scheduledAssuranceEnabled,label:"Scheduled assurance"}),e.jsx(p,{enabled:i.externalLlmProcessingApproved,label:"External processing approved"}),e.jsx(p,{enabled:i.agenticReviewEnabled,label:"Agentic code review"})]})]},i.id))})]})]})}function U({runs:s}){return s.length===0?e.jsx(A,{icon:P,title:"No pipeline runs yet",body:"Once signed GitHub events land for enabled repositories, commit checks and pull-request validations will appear here."}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("section",{className:"grid gap-px overflow-hidden rounded border border-ink-700 bg-ink-
1700 sm:grid-cols-2 xl:grid-cols-5",children:[e.jsx(l,{label:"total runs",value:s.length,icon:P}),e.jsx(l,{label:"completed",value:s.filter(t=>t.status==="COMPLETED").length,icon:w}),e.jsx(l,{label:"partial or failed",value:s.filter(t=>t.status==="PARTIAL"||t.status==="FAILED").length,icon:W}),e.jsx(l,{label:"active now",value:s.filter(t=>["PENDING","CLAIMED","RUNNING"].includes(t.status)).length,icon:I}),e.jsx(l,{label:"Rogue advisories",value:s.filter(t=>t.rogueStatus==="COMPLETED").length,icon:D})]}),e.jsxs("section",{className:"overflow-hidden rounded border border-ink-700",children:[e.jsxs("div",{className:"grid gap-3 border-b border-ink-700 bg-white px-5 py-4 lg:grid-cols-[1.2fr_0.7fr_0.7fr_0.9fr_1fr]",children:[e.jsx("div",{className:"mono-label",children:"repository / reference"}),e.jsx("div",{className:"mono-label",children:"status"}),e.jsx("div",{className:"mono-label",children:"findings"}),e.jsx("div",{className:"mono-label",children:"progress"}),e.jsx("div",{className:"mono-label",children:"updated"})]}),e.jsx("div",{className:"divide-y divide-ink-700",children:s.map(t=>e.jsxs("div",{className:"grid gap-3 bg-white px-5 py-4 lg:grid-cols-[1.2fr_0.7fr_0.7fr_0.9fr_1fr]",children:[e.jsxs("div",{children:[e.jsx("div",{className:"font-medium text-ink-50",children:t.repositoryFullName??t.label??"GitHub AppSec"}),e.jsx("div",{className:"mt-1 font-mono text-[10px] uppercase text-ink-300",children:t.commitSha?`commit ${t.commitSha}`:u(t.mode??"pipeline_run")}),e.jsx("p",{className:"mt-2 text-sm leading-relaxed text-prose",children:t.statusMessage||"No status message recorded yet."})]}),e.jsx("div",{children:e.jsx(z,{status:t.status})}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-medium text-ink-50",children:t.totalFindings}),e.jsxs("div",{className:"mt-1 font-mono text-[9px] uppercase text-ink-300",children:["SAST ",t.sastFindings," / SCA ",t.dependencyFindings," / secrets ",t.secretFindings," / AI ",t.agenticFindings]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"text-sm font-medium text-ink-50",children:[t.completedRuns,"/",t.totalRuns||1]}),t.agenticStatus?e.jsxs("div",{className:"mt-1 font-mono text-[9px] uppercase text-ink-300",children:["AI ",u(t.agenticStatus)," / ",t.agenticDiscoveryFilesReviewed,"/",t.agenticChangedFiles," changed files / ",t.agenticValidations," verdicts"]}):null,t.rogueStatus?e.jsxs("div",{className:`mt-2 font-mono text-[9px] uppercase ${t.rogueDisagreementCount>0?"text-amber-700":"text-lime-700"}`,children:["Rogue ",u(t.rogueStatus)," / ",t.rogueAgreementCount,"/",t.rogueCandidateCount," aligned / ",t.rogueDisagreementCount," review"]}):null]}),e.jsx("div",{className:"text-sm text-prose",children:J(t)})]},t.jobId))})]})]})}function A({icon:s,title:t,body:r}){return e.jsxs("section",{className:"flex min-h-72 flex-col items-center justify-center rounded border border-dashed border-ink-600 p-8 text-center",children:[e.jsx(s,{className:"h-6 w-6 text-ink-300"}),e.jsx("h2",{className:"mt-4 text-base font-semibold text-ink-50",children:t}),e.jsx("p",{className:"mt-2 max-w-xl text-sm leading-relaxed text-prose",children:r})]})}function k({label:s,value:t,body:r}){return e.jsxs("section",{className:"card p-6",children:[e.jsxs("div",{className:"mono-label mb-3",children:["// ",s]}),e.jsx("div",{className:"text-4xl font-semibold text-ink-50",children:t}),e.jsx("p",{className:"mt-3 text-sm text-prose",children:r})]})}function l({label:s,value:t,icon:r}){return e.jsxs("div",{className:"bg-white p-5",children:[e.jsx(r,{className:"mb-5 h-4 w-4 text-lime-600"}),e.jsx("div",{className:"text-3xl font-semibold text-ink-50",children:t}),e.jsx("div",{className:"mt-1 font-mono text-[10px] uppercase text-ink-300",children:s})]})}function c({label:s,value:t}){return e.jsxs("div",{children:[e.jsxs("div",{className:"font-mono text-[10px] uppercase text-ink-300",children:["// ",s]}),e.jsx("div",{className:"mt-1 text-sm font-medium text-ink-50",children:t})]})}function p({enabled:s,label:t}){return e.jsx("span",{className:`inline-flex items-center border px-2 py-1 font-mono text-[10px] uppercase ${s?"border-lime-500/50 bg-lime-300/20 text-lime-700":"border-ink-600 bg-ink-800 text-ink-200"}`,children:t})}function z({status:s}){const t=s==="COMPLETED"?"border-lime-500/50 bg-lime-300/20 text-lime-700":s==="PARTIAL"||s==="PENDING"||s==="CLAIMED"||s==="RUNNING"?"border-amber-400/60 bg-amber-100 text-amber-800":"border-ink-600 bg-ink-800 text-ink-200";return e.jsx("span",{className:`inline-flex items-center border px-2 py-1 font-mono text-[10px] uppercase ${t}`,children:s})}function u(s){return s.toLowerCase().replace(/_/g," ")}function J(s){const t=s.endedAt??s.startedAt??s.createdAt;
1return t?new Date(t).toLocaleString():"not started"}export{ie 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.