import type * as s3Assets from 'aws-cdk-lib/aws-s3-assets'; import { Construct } from 'constructs'; import * as datadogv2 from '../datadogv2'; /** * Enum to specify which license policy should applied. * * @beta */ export declare enum LicensePolicy { NONE = "none", JVM_BACKEND = "jvm-backend", NPM_BACKEND = "npm-backend", NPM_FRONTEND = "npm-frontend" } /** * Notification configuration for an SBOM catalog vulnerability monitor. * * @beta */ export interface SbomCatalogVulnerabilityMonitorProps { /** Notification sent when the vulnerability monitor changes state. */ readonly notification: datadogv2.INotification; } /** * Properties for {@link StandaloneSbomCatalogProject}. * * @beta */ export interface StandaloneSbomCatalogProjectProps { /** Must be non-empty and must not contain `/`. */ readonly name: string; /** Project version. Defaults to `main`. */ readonly version?: string; /** * Additional project tags using the `key:value` format. * * `team_identifier` is always added from the RIO Landing Zone configuration. Do not provide `team_identifier` or * `account_id`; both are managed tag keys. */ readonly additionalTags?: string[]; /** JSON SBOM file asset to upload. */ readonly sbom: s3Assets.Asset; /** Optional JSON VEX file asset to upload. */ readonly vex?: s3Assets.Asset; /** * Optional vulnerability monitor configuration. * * When omitted, the monitor uses {@link datadogv2.DefaultSlackNotification}. * * @defaultValue A vulnerability monitor using {@link datadogv2.DefaultSlackNotification} */ readonly vulnerabilityMonitorProps?: SbomCatalogVulnerabilityMonitorProps; /** * Specifies the mandatory license policy to be applied to this project. * * Use `LicensePolicy.NONE` in exceptional cases only! */ readonly licensePolicy: LicensePolicy; } /** * A child project in an SBOM catalog collection. * * @beta */ export interface SbomCatalogProjectChild { /** * Must be non-empty, unique within the collection, and must not contain `/`. */ readonly name: string; /** Child project version. Defaults to `main`. */ readonly version?: string; /** * Tags added to this child, using the `key:value` format. * * Child tags override shared tags with the same key. `team_identifier` is always inherited from the RIO Landing Zone * configuration. Do not provide `team_identifier` or `account_id`; both are managed tag keys. */ readonly additionalTags?: string[]; /** JSON SBOM file asset to upload. */ readonly sbom: s3Assets.Asset; /** Optional JSON VEX file asset to upload. */ readonly vex?: s3Assets.Asset; /** * Specifies the mandatory license policy to be applied to this project. * * Use `LicensePolicy.NONE` in exceptional cases only! */ readonly licensePolicy: LicensePolicy; } /** * Properties for {@link SbomCatalogProject}. * * @beta */ export interface SbomCatalogProjectProps { /** Collection name stored in the manifest and used in the destination key. */ readonly collectionName: string; /** Collection version. Defaults to `main`. */ readonly collectionVersion?: string; /** * Tags inherited by every child, using the `key:value` format. * * A child's additional tags override shared tags with the same key. `team_identifier` is always added from the RIO * Landing Zone configuration. Do not provide `team_identifier` or `account_id`; both are managed tag keys. */ readonly sharedTags?: string[]; /** Child catalog projects. Must contain between one and three projects. */ readonly children: SbomCatalogProjectChild[]; /** * Optional vulnerability monitor configuration shared by all child monitors. * * When omitted, the monitors use {@link datadogv2.DefaultSlackNotification}. * * @defaultValue Vulnerability monitors using {@link datadogv2.DefaultSlackNotification} */ readonly vulnerabilityMonitorProps?: SbomCatalogVulnerabilityMonitorProps; } /** * Registers one project's SBOM and optional VEX in the central SBOM catalog. * * Use this construct when a stack owns one independently versioned project. The files are uploaded after the stack * reaches `CREATE_COMPLETE` or `UPDATE_COMPLETE`. The EventBridge event time and ID identify the upload. * * The construct automatically adds the RIO Landing Zone `team_identifier` tag and grants the generated upload Lambda * permission to read the source assets and write them to the central catalog bucket. All SBOM catalog constructs in * the same stack reuse one upload Lambda. * * Example: * ```ts * const sbom = new s3Assets.Asset(this, 'SbomAsset', { * path: 'build/sbom.json', * }); * const vex = new s3Assets.Asset(this, 'VexAsset', { * path: 'build/vex.json', * }); * * new StandaloneSbomCatalogProject(this, 'CatalogUpload', { * name: 'billing-api', * version: '1.4.0', * additionalTags: ['component:backend'], * sbom, * vex, * vulnerabilityMonitorProps: { * notification: new datadogv2.DefaultSlackNotification(), * }, * licensePolicy: licensePolicy.JVM_BACKEND, * }); * ``` * * @beta */ export declare class StandaloneSbomCatalogProject extends Construct { constructor(scope: Construct, id: string, props: StandaloneSbomCatalogProjectProps); } /** * Registers a collection of related project SBOMs and optional VEX files in the central SBOM catalog. * * Use this construct when one stack produces between one and three related projects that should share a catalog * collection. Shared tags are inherited by every child, while child tags with the same key override them. The RIO * Landing Zone `team_identifier` tag is always included. * * The files are uploaded after the stack reaches `CREATE_COMPLETE` or `UPDATE_COMPLETE`. The EventBridge event time * and ID identify the upload. All SBOM catalog constructs in the same stack reuse one upload Lambda. * * Example: * ```ts * const apiSbom = new s3Assets.Asset(this, 'ApiSbomAsset', { * path: 'build/api-sbom.json', * }); * const infrastructureSbom = new s3Assets.Asset(this, 'InfrastructureSbomAsset', { * path: 'build/infrastructure-sbom.json', * }); * * new SbomCatalogProject(this, 'CatalogUpload', { * collectionName: 'billing', * collectionVersion: '1.4.0', * sharedTags: ['domain:billing'], * children: [ * { * name: 'api', * sbom: apiSbom, * additionalTags: ['component:backend'], * licensePolicy: LicensePolicy.JVM_BACKEND, * }, * { * name: 'infrastructure', * sbom: infrastructureSbom, * additionalTags: ['component:infrastructure'], * * licensePolicy: LicensePolicy.NPM_BACKEND, * }, * ], * vulnerabilityMonitorProps: { * notification: new datadogv2.DefaultSlackNotification(), * }, * }); * ``` * * @beta */ export declare class SbomCatalogProject extends Construct { constructor(scope: Construct, id: string, props: SbomCatalogProjectProps); }