diff --git a/src/types/eol-scan.test.ts b/src/types/eol-scan.test.ts index 6c4c375..a4c3d8d 100644 --- a/src/types/eol-scan.test.ts +++ b/src/types/eol-scan.test.ts @@ -1,4 +1,8 @@ -import type { DependencySummary, EolScanComponent } from './eol-scan.js'; +import type { + DependencySummary, + EolScanComponent, + NesRemediation, +} from './eol-scan.js'; type Equal = (() => Value extends Left ? 1 : 2) extends < @@ -32,3 +36,11 @@ export type ComponentDependencySummaryIsRequired = Assert< false > >; + +export type NesRemediationCarriesTheFederationKey = Assert< + Equal +>; + +export type ComponentNesRemediationIsTheCatalogStub = Assert< + Equal +>; diff --git a/src/types/eol-scan.ts b/src/types/eol-scan.ts index 6245baf..8a4a0db 100644 --- a/src/types/eol-scan.ts +++ b/src/types/eol-scan.ts @@ -47,7 +47,15 @@ export function isUnknownReason(v: unknown): v is UnknownReason { ); } +/** + * The catalog remediation attached to a scan component as clients see it through + * the gateway. The scan service only emits the federation key (`target`, the + * component purl it was given); the catalog subgraph owns and resolves + * `remediations`. A GraphQL client receives only the fields it selects, so + * `target` is optional: clients that select only `remediations` never see it. + */ export interface NesRemediation { + target?: string; remediations: { purls: { nes: string; oss: string }; urls: { main: string };