UNPKG

@cyclonedx/webpack-plugin

Version:

Creates CycloneDX Software Bill of Materials (SBoM) from webpack projects

54 lines (49 loc) 2.61 kB
/*! This file is part of CycloneDX Webpack plugin. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. SPDX-License-Identifier: Apache-2.0 Copyright (c) OWASP Foundation. All Rights Reserved. */ import * as CDX from '@cyclonedx/cyclonedx-library'; import { type Compiler } from 'webpack'; export interface CycloneDxWebpackPluginOptions { specVersion?: CycloneDxWebpackPlugin['specVersion']; reproducibleResults?: CycloneDxWebpackPlugin['reproducibleResults']; validateResults?: CycloneDxWebpackPlugin['validateResults']; outputLocation?: string; includeWellknown?: boolean; wellknownLocation?: string; rootComponentAutodetect?: CycloneDxWebpackPlugin['rootComponentAutodetect']; rootComponentType?: CycloneDxWebpackPlugin['rootComponentType']; rootComponentName?: CycloneDxWebpackPlugin['rootComponentName']; rootComponentVersion?: CycloneDxWebpackPlugin['rootComponentVersion']; rootComponentBuildSystem?: CycloneDxWebpackPlugin['rootComponentBuildSystem']; rootComponentVCS?: CycloneDxWebpackPlugin['rootComponentVCS']; collectEvidence?: CycloneDxWebpackPlugin['collectEvidence']; } export declare class CycloneDxWebpackPlugin { #private; specVersion: CDX.Spec.Version; reproducibleResults: boolean; validateResults: boolean; resultXml: string; resultJson: string; resultWellknown: string | undefined; rootComponentAutodetect: boolean; rootComponentType: CDX.Models.Component['type']; rootComponentName: CDX.Models.Component['name'] | undefined; rootComponentVersion: CDX.Models.Component['version'] | undefined; rootComponentBuildSystem: CDX.Models.ExternalReference['url'] | undefined; rootComponentVCS: CDX.Models.ExternalReference['url'] | undefined; collectEvidence: boolean; constructor({ specVersion, reproducibleResults, validateResults, outputLocation, includeWellknown, wellknownLocation, rootComponentAutodetect, rootComponentType, rootComponentName, rootComponentVersion, rootComponentBuildSystem, rootComponentVCS, collectEvidence }?: CycloneDxWebpackPluginOptions); apply(compiler: Compiler): void; }