polaris Submodule
Constructs
PolarisCoverity
Manages coverity.yml, the configuration file for Coverity on Polaris (Black Duck's SAST scanning tool).
https://docs.blackduck.com/r/cov_polaris/latest/coverity-on-polaris/configuration-file-schema.html
Initializers
import { polaris } from 'projen'
new polaris.PolarisCoverity(project: Project, options: PolarisCoverityOptions)
| Name | Type | Description |
|---|---|---|
| projen.Project | No description. |
| | No description. |
projectRequired
- Type: projen.Project
optionsRequired
- Type: PolarisCoverityOptions
Methods
| Name | Description |
|---|---|
| Returns a string representation of this construct. |
| Applies one or more mixins to this construct. |
| Called once, right after postSynthesize(), only when the project is created for the first time. |
| Called after synthesis. |
| Called before synthesis. |
| Called once, right after synthesize(), only when the project is created for the first time. |
| Synthesizes files to the project output directory. |
toString
public toString(): string
Returns a string representation of this construct.
with
public with(mixins: ...IMixin[]): IConstruct
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple with() calls if subsequent mixins should apply to added
constructs.
mixinsRequired
- Type: ...constructs.IMixin[]
The mixins to apply.
postProjectCreation
public postProjectCreation(initProject: InitProject): void
Called once, right after postSynthesize(), only when the project is created for the first time.
It does not run on later projen invocations. It only fires for projen new (or Projects.createProject).
It is also skipped when post-synthesis steps are disabled, e.g. --no-post or PROJEN_DISABLE_POST.
Use it for one-off setup that can be turned off by the user, like running a task to give the user immediate
feedback on their new project. Order across components is not guaranteed.
initProjectRequired
- Type: projen.InitProject
Details about how the project was created, e.g. its type and the original CLI args.
postSynthesize
public postSynthesize(): void
Called after synthesis.
Order is not guaranteed.
preSynthesize
public preSynthesize(): void
Called before synthesis.
projectCreation
public projectCreation(initProject: InitProject): void
Called once, right after synthesize(), only when the project is created for the first time.
It does not run on later projen invocations. It only fires for projen new (or Projects.createProject).
Use it for deterministic, one-off file generation. Order across components is not guaranteed.
initProjectRequired
- Type: projen.InitProject
Details about how the project was created, e.g. its type and the original CLI args.
synthesize
public synthesize(): void
Synthesizes files to the project output directory.
Static Functions
| Name | Description |
|---|---|
| Checks if x is a construct. |
| Test whether the given construct is a component. |
isConstruct
import { polaris } from 'projen'
polaris.PolarisCoverity.isConstruct(x: any)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired
- Type: any
Any object.
isComponent
import { polaris } from 'projen'
polaris.PolarisCoverity.isComponent(x: any)
Test whether the given construct is a component.
xRequired
- Type: any
Properties
| Name | Type | Description |
|---|---|---|
| constructs.Node | The tree node. |
| projen.Project | No description. |
| projen.YamlFile | The YAML file for the Coverity on Polaris configuration. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
projectRequired
public readonly project: Project;
- Type: projen.Project
fileRequired
public readonly file: YamlFile;
- Type: projen.YamlFile
The YAML file for the Coverity on Polaris configuration.
PolarisGoCoverity
A Coverity on Polaris configuration preset for Go projects.
Provides sensible defaults for Go analysis:
capture.languages.include=[go]capture.buildCapture.buildCommand=go build .capture.compilerConfiguration.covConfigure=[["--go"]]capture.files.excludeRegexexcludesvendor,binand other conventional Go build artifacts
All defaults can be overridden via options. Nested options (e.g.
capture) are deep-merged with the defaults, so overriding one nested
field does not drop the other defaults in that subtree.
Example
new PolarisGoCoverity(project, {
commit: {},
});
Initializers
import { polaris } from 'projen'
new polaris.PolarisGoCoverity(project: Project, options: PolarisCoverityGoOptions)
| Name | Type | Description |
|---|---|---|
| projen.Project | No description. |
| | No description. |
projectRequired
- Type: projen.Project
optionsRequired
- Type: PolarisCoverityGoOptions
Methods
| Name | Description |
|---|---|
| Returns a string representation of this construct. |
| Applies one or more mixins to this construct. |
| Called once, right after postSynthesize(), only when the project is created for the first time. |
| Called after synthesis. |
| Called before synthesis. |
| Called once, right after synthesize(), only when the project is created for the first time. |
| Synthesizes files to the project output directory. |
toString
public toString(): string
Returns a string representation of this construct.
with
public with(mixins: ...IMixin[]): IConstruct
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple with() calls if subsequent mixins should apply to added
constructs.
mixinsRequired
- Type: ...constructs.IMixin[]
The mixins to apply.
postProjectCreation
public postProjectCreation(initProject: InitProject): void
Called once, right after postSynthesize(), only when the project is created for the first time.
It does not run on later projen invocations. It only fires for projen new (or Projects.createProject).
It is also skipped when post-synthesis steps are disabled, e.g. --no-post or PROJEN_DISABLE_POST.
Use it for one-off setup that can be turned off by the user, like running a task to give the user immediate
feedback on their new project. Order across components is not guaranteed.
initProjectRequired
- Type: projen.InitProject
Details about how the project was created, e.g. its type and the original CLI args.
postSynthesize
public postSynthesize(): void
Called after synthesis.
Order is not guaranteed.
preSynthesize
public preSynthesize(): void
Called before synthesis.
projectCreation
public projectCreation(initProject: InitProject): void
Called once, right after synthesize(), only when the project is created for the first time.
It does not run on later projen invocations. It only fires for projen new (or Projects.createProject).
Use it for deterministic, one-off file generation. Order across components is not guaranteed.
initProjectRequired
- Type: projen.InitProject
Details about how the project was created, e.g. its type and the original CLI args.
synthesize
public synthesize(): void
Synthesizes files to the project output directory.
Static Functions
| Name | Description |
|---|---|
| Checks if x is a construct. |
| Test whether the given construct is a component. |
isConstruct
import { polaris } from 'projen'
polaris.PolarisGoCoverity.isConstruct(x: any)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired
- Type: any
Any object.
isComponent
import { polaris } from 'projen'
polaris.PolarisGoCoverity.isComponent(x: any)
Test whether the given construct is a component.
xRequired
- Type: any
Properties
| Name | Type | Description |
|---|---|---|
| constructs.Node | The tree node. |
| projen.Project | No description. |
| projen.YamlFile | The YAML file for the Coverity on Polaris configuration. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
projectRequired
public readonly project: Project;
- Type: projen.Project
fileRequired
public readonly file: YamlFile;
- Type: projen.YamlFile
The YAML file for the Coverity on Polaris configuration.
PolarisJavaCoverity
A Coverity on Polaris configuration preset for Java projects.
Provides sensible defaults for Java analysis:
capture.languages.include=[java]capture.buildCapture.buildCommand=mvn packagecapture.buildCapture.cleanCommand=mvn cleancapture.compilerConfiguration.covConfigure=[["--java"]]capture.files.excludeRegexexcludestarget,dist/javaand other conventional Maven/Gradle build artifacts
All defaults can be overridden via options. Nested options (e.g.
capture) are deep-merged with the defaults, so overriding one nested
field does not drop the other defaults in that subtree.
Example
new PolarisJavaCoverity(project, {
commit: {},
});
Initializers
import { polaris } from 'projen'
new polaris.PolarisJavaCoverity(project: Project, options: PolarisCoverityJavaOptions)
| Name | Type | Description |
|---|---|---|
| projen.Project | No description. |
| | No description. |
projectRequired
- Type: projen.Project
optionsRequired
Methods
| Name | Description |
|---|---|
| Returns a string representation of this construct. |
| Applies one or more mixins to this construct. |
| Called once, right after postSynthesize(), only when the project is created for the first time. |
| Called after synthesis. |
| Called before synthesis. |
| Called once, right after synthesize(), only when the project is created for the first time. |
| Synthesizes files to the project output directory. |
toString
public toString(): string
Returns a string representation of this construct.
with
public with(mixins: ...IMixin[]): IConstruct
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple with() calls if subsequent mixins should apply to added
constructs.
mixinsRequired
- Type: ...constructs.IMixin[]
The mixins to apply.
postProjectCreation
public postProjectCreation(initProject: InitProject): void
Called once, right after postSynthesize(), only when the project is created for the first time.
It does not run on later projen invocations. It only fires for projen new (or Projects.createProject).
It is also skipped when post-synthesis steps are disabled, e.g. --no-post or PROJEN_DISABLE_POST.
Use it for one-off setup that can be turned off by the user, like running a task to give the user immediate
feedback on their new project. Order across components is not guaranteed.
initProjectRequired
- Type: projen.InitProject
Details about how the project was created, e.g. its type and the original CLI args.
postSynthesize
public postSynthesize(): void
Called after synthesis.
Order is not guaranteed.
preSynthesize
public preSynthesize(): void
Called before synthesis.
projectCreation
public projectCreation(initProject: InitProject): void
Called once, right after synthesize(), only when the project is created for the first time.
It does not run on later projen invocations. It only fires for projen new (or Projects.createProject).
Use it for deterministic, one-off file generation. Order across components is not guaranteed.
initProjectRequired
- Type: projen.InitProject
Details about how the project was created, e.g. its type and the original CLI args.
synthesize
public synthesize(): void
Synthesizes files to the project output directory.
Static Functions
| Name | Description |
|---|---|
| Checks if x is a construct. |
| Test whether the given construct is a component. |
isConstruct
import { polaris } from 'projen'
polaris.PolarisJavaCoverity.isConstruct(x: any)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired
- Type: any
Any object.
isComponent
import { polaris } from 'projen'
polaris.PolarisJavaCoverity.isComponent(x: any)
Test whether the given construct is a component.
xRequired
- Type: any
Properties
| Name | Type | Description |
|---|---|---|
| constructs.Node | The tree node. |
| projen.Project | No description. |
| projen.YamlFile | The YAML file for the Coverity on Polaris configuration. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
projectRequired
public readonly project: Project;
- Type: projen.Project
fileRequired
public readonly file: YamlFile;
- Type: projen.YamlFile
The YAML file for the Coverity on Polaris configuration.
PolarisJavascriptCoverity
A Coverity on Polaris configuration preset for JavaScript/TypeScript projects.
Provides sensible defaults for JavaScript/TypeScript analysis:
capture.languages.include=[javascript]capture.files.excludeRegexexcludesnode_modules,lib,dist,coverageand other build artifacts, based on the paths projen'sTypeScriptProjectexcludes from git by default
All defaults can be overridden via options. Nested options (e.g.
capture) are deep-merged with the defaults, so overriding one nested
field does not drop the other defaults in that subtree.
Example
new PolarisJavascriptCoverity(project, {
commit: {},
});
Initializers
import { polaris } from 'projen'
new polaris.PolarisJavascriptCoverity(project: Project, options: PolarisCoverityJavascriptOptions)
| Name | Type | Description |
|---|---|---|
| projen.Project | No description. |
| | No description. |
projectRequired
- Type: projen.Project
optionsRequired
Methods
| Name | Description |
|---|---|
| Returns a string representation of this construct. |
| Applies one or more mixins to this construct. |
| Called once, right after postSynthesize(), only when the project is created for the first time. |
| Called after synthesis. |
| Called before synthesis. |
| Called once, right after synthesize(), only when the project is created for the first time. |
| Synthesizes files to the project output directory. |
toString
public toString(): string
Returns a string representation of this construct.
with
public with(mixins: ...IMixin[]): IConstruct
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple with() calls if subsequent mixins should apply to added
constructs.
mixinsRequired
- Type: ...constructs.IMixin[]
The mixins to apply.
postProjectCreation
public postProjectCreation(initProject: InitProject): void
Called once, right after postSynthesize(), only when the project is created for the first time.
It does not run on later projen invocations. It only fires for projen new (or Projects.createProject).
It is also skipped when post-synthesis steps are disabled, e.g. --no-post or PROJEN_DISABLE_POST.
Use it for one-off setup that can be turned off by the user, like running a task to give the user immediate
feedback on their new project. Order across components is not guaranteed.
initProjectRequired
- Type: projen.InitProject
Details about how the project was created, e.g. its type and the original CLI args.
postSynthesize
public postSynthesize(): void
Called after synthesis.
Order is not guaranteed.
preSynthesize
public preSynthesize(): void
Called before synthesis.
projectCreation
public projectCreation(initProject: InitProject): void
Called once, right after synthesize(), only when the project is created for the first time.
It does not run on later projen invocations. It only fires for projen new (or Projects.createProject).
Use it for deterministic, one-off file generation. Order across components is not guaranteed.
initProjectRequired
- Type: projen.InitProject
Details about how the project was created, e.g. its type and the original CLI args.
synthesize
public synthesize(): void
Synthesizes files to the project output directory.
Static Functions
| Name | Description |
|---|---|
| Checks if x is a construct. |
| Test whether the given construct is a component. |
isConstruct
import { polaris } from 'projen'
polaris.PolarisJavascriptCoverity.isConstruct(x: any)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired
- Type: any
Any object.
isComponent
import { polaris } from 'projen'
polaris.PolarisJavascriptCoverity.isComponent(x: any)
Test whether the given construct is a component.
xRequired
- Type: any
Properties
| Name | Type | Description |
|---|---|---|
| constructs.Node | The tree node. |
| projen.Project | No description. |
| projen.YamlFile | The YAML file for the Coverity on Polaris configuration. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
projectRequired
public readonly project: Project;
- Type: projen.Project
fileRequired
public readonly file: YamlFile;
- Type: projen.YamlFile
The YAML file for the Coverity on Polaris configuration.
Structs
AnalysisConfiguration
Specifies how the project should be analyzed.
Initializer
import { polaris } from 'projen'
const analysisConfiguration: polaris.AnalysisConfiguration = { ... }
Properties
| Name | Type | Description |
|---|---|---|
| | Specifies the aggressiveness level for the analysis. |
| boolean | Enables callgraph metrics output in the intermediate directory. |
| boolean | Enables analysis of calls to function pointers for defects. |
| boolean | Enables full virtual-call resolution for C++. |
| | If no checker configuration is specified, the CLI will enable a set of checkers based on the files that were captured. |
| | If specified, the analysis will scan the code for compliance according to the given coding standard configuration. |
| | Coverity Connect configuration to use when performing analysis in Coverity Connect. |
| boolean | Enables additional filtering of defects by using an additional false-path pruner. |
| string[] | Additional arguments to pass to cov-analyze when doing analysis. |
| string[] | Additional arguments to pass to cov-collect-models following analysis when "output-model-file" is specified. |
| | Specifies directives to use for the analysis, including for web application security analysis. |
| | Specifies which files to analyze when the "analyze.mode" setting is "hfi". Analysis will be performed for only these files. |
| | Specifies analysis worker parallelism. |
| | Specifies whether the analysis should be done locally, in Coverity Connect, or in Software Risk Manager. |
| | Analysis mode: "pfi" (perfect fidelity incremental) for complete analysis; |
| string | File containing function models. |
| boolean | If set to to true, only one TU (translation unit) will be analyzed per source file name. |
| string | Output file to which function models for the project should be written following analysis. |
| | Specifies how parse warnings are handled. |
| boolean | Specifies whether to enable the collection of scan transparency data for analysis. |
| | Specifies options for Sigma analysis. |
| any | This is a map from trust option name to boolean to indicate whether the particular trust property should be trusted or distrusted. |
aggressivenessLevelOptional
public readonly aggressivenessLevel: AnalysisConfigurationAggressivenessLevel;
Specifies the aggressiveness level for the analysis.
The aggressiveness level causes the analysis to make more or less aggressive assumptions during the analysis where the higher the aggressiveness level the more defects are reported.
callgraphMetricsOptional
public readonly callgraphMetrics: boolean;
- Type: boolean
Enables callgraph metrics output in the intermediate directory.
cCppFnptrOptional
public readonly cCppFnptr: boolean;
- Type: boolean
Enables analysis of calls to function pointers for defects.
cCppVirtualOptional
public readonly cCppVirtual: boolean;
- Type: boolean
Enables full virtual-call resolution for C++.
checkersOptional
public readonly checkers: CheckerConfiguration;
- Type: CheckerConfiguration
If no checker configuration is specified, the CLI will enable a set of checkers based on the files that were captured.
codingStandardsOptional
public readonly codingStandards: CodingStandardConfiguration;
If specified, the analysis will scan the code for compliance according to the given coding standard configuration.
If this configuration is present, the capture "emit-complementary-info" flag will be set to true.
connectOptional
public readonly connect: AnalyzeConnectConfiguration;
Coverity Connect configuration to use when performing analysis in Coverity Connect.
constraintFppOptional
public readonly constraintFpp: boolean;
- Type: boolean
Enables additional filtering of defects by using an additional false-path pruner.
If set to true, the constraint FPP is enabled.
covAnalyzeArgsOptional
public readonly covAnalyzeArgs: string[];
- Type: string[]
Additional arguments to pass to cov-analyze when doing analysis.
covCollectModelsArgsOptional
public readonly covCollectModelsArgs: string[];
- Type: string[]
Additional arguments to pass to cov-collect-models following analysis when "output-model-file" is specified.
directivesOptional
public readonly directives: DirectivesConfiguration[];
- Type: DirectivesConfiguration[]
Specifies directives to use for the analysis, including for web application security analysis.
filesOptional
public readonly files: AnalyzeFilesConfiguration;
Specifies which files to analyze when the "analyze.mode" setting is "hfi". Analysis will be performed for only these files.
jobsOptional
public readonly jobs: JobsConfiguration[];
- Type: JobsConfiguration[]
Specifies analysis worker parallelism.
locationOptional
public readonly location: AnalysisConfigurationLocation;
Specifies whether the analysis should be done locally, in Coverity Connect, or in Software Risk Manager.
The possible values are as follows: connect - Run the analysis in the Coverity Connect job farm; srm - Run the analysis in the Software Risk Manager job farm; local - Run the analysis locally
modeOptional
public readonly mode: AnalysisConfigurationMode;
Analysis mode: "pfi" (perfect fidelity incremental) for complete analysis;
or "hfi" (high fidelity incremental) for analysis of only specific files specified by analyze.files settings, omitting any other files which may have been incidentally captured by the build. An "hfi" analysis can be faster but may produce results which are incomplete or inconsistent, due to the lack of context, and should be used only when speed is more important than accuracy.
modelFileOptional
public readonly modelFile: string;
- Type: string
File containing function models.
This overrides models specified in the default location of "config/user_models.xmldb".
oneTuPerPsfOptional
public readonly oneTuPerPsf: boolean;
- Type: boolean
If set to to true, only one TU (translation unit) will be analyzed per source file name.
If set to false, all translation units will be analyzed.
outputModelFileOptional
public readonly outputModelFile: string;
- Type: string
Output file to which function models for the project should be written following analysis.
parseWarningsOptional
public readonly parseWarnings: ParseWarningsConfiguration;
Specifies how parse warnings are handled.
scanTransparencyOptional
public readonly scanTransparency: boolean;
- Type: boolean
Specifies whether to enable the collection of scan transparency data for analysis.
This setting must be enabled if the Coverity Connect instance has 'scan.transparency.enabled=true' in its configuration.
sigmaOptional
public readonly sigma: SigmaConfiguration;
- Type: SigmaConfiguration
Specifies options for Sigma analysis.
trustOptional
public readonly trust: any;
- Type: any
This is a map from trust option name to boolean to indicate whether the particular trust property should be trusted or distrusted.
The trust option "all" controls whether all trust options should be trusted or distrusted.
AnalyzeConnectConfiguration
Initializer
import { polaris } from 'projen'
const analyzeConnectConfiguration: polaris.AnalyzeConnectConfiguration = { ... }
Properties
| Name | Type | Description |
|---|---|---|
| string | Absolute URL of where to perform Coverity Connect analysis. |
| string | The authentication key file to use when authenticating to Coverity Connect to perform analysis. |
| string | File containing additional certificates to trust in addition to the ones in the system certificate store and the Coverity TFT store. |
| string | File containing the client certificate in PEM format, that should be presented to the proxy when making a request. |
| string | File containing the client certificate private key in PEM format, for the proxy-client-cert-file. |
| string | URL for a forward proxy to use when communicating with Coverity Connect. |
| | Artifacts to upload following analysis when the analysis location is Connect. |
urlRequired
public readonly url: string;
- Type: string
Absolute URL of where to perform Coverity Connect analysis.
authKeyFileOptional
public readonly authKeyFile: string;
- Type: string
The authentication key file to use when authenticating to Coverity Connect to perform analysis.
By default, the file located at $HOME/.coverity/ak-
caCertsFileOptional
public readonly caCertsFile: string;
- Type: string
File containing additional certificates to trust in addition to the ones in the system certificate store and the Coverity TFT store.
By default system CA certificates are used.
proxyClientCertFileOptional
public readonly proxyClientCertFile: string;
- Type: string
File containing the client certificate in PEM format, that should be presented to the proxy when making a request.
proxyClientKeyFileOptional
public readonly proxyClientKeyFile: string;
- Type: string
File containing the client certificate private key in PEM format, for the proxy-client-cert-file.
proxyUrlOptional
public readonly proxyUrl: string;
- Type: string
URL for a forward proxy to use when communicating with Coverity Connect.
Must be an https URL.
uploadArtifactsOptional
public readonly uploadArtifacts: AnalyzeConnectConfigurationUploadArtifacts;
Artifacts to upload following analysis when the analysis location is Connect.
AnalyzeFilesConfiguration
Initializer
import { polaris } from 'projen'
const analyzeFilesConfiguration: polaris.AnalyzeFilesConfiguration = { ... }
Properties
| Name | Type | Description |
|---|---|---|
| string | Glob pattern that specifies the set of source files to exclude from analysis. |
| string | Regular expression that specifies the set of source files to exclude from analysis. |
| string | Paths of source files to analyze. |
| string | Glob pattern that specifies the set of source files to analyze. |
| string | File containing the paths of source files to analyze, one per line. |
| string | Regular expression that specifies the set of source files to analyze. |
excludeGlobOptional
public readonly excludeGlob: string;
- Type: string
Glob pattern that specifies the set of source files to exclude from analysis.
Note that any include glob patterns and regular expressions are processed prior to handling exclude glob patterns and regular expressions.
excludeRegexOptional
public readonly excludeRegex: string;
- Type: string
Regular expression that specifies the set of source files to exclude from analysis.
Note that any include glob patterns and regular expressions are processed prior to handling exclude glob patterns and regular expressions.
includeFilesOptional
public readonly includeFiles: string;
- Type: string
Paths of source files to analyze.
Include and exclude glob patterns and regular expressions are applied to determine which of these files are actually analyzed.
includeGlobOptional
public readonly includeGlob: string;
- Type: string
Glob pattern that specifies the set of source files to analyze.
includeListFileOptional
public readonly includeListFile: string;
- Type: string
File containing the paths of source files to analyze, one per line.
Include and exclude glob patterns and regular expressions are applied to determine which of these files are actually analyzed.
includeRegexOptional
public readonly includeRegex: string;
- Type: string
Regular expression that specifies the set of source files to analyze.
BuildConfiguration
Specifies that build capture should be used to capture the project and provides the build configuration to use.
If not specified and the project directory contains compiled source files then automatic build capture will be used to capture compiled source files in the project directory.
Initializer
import { polaris } from 'projen'
const buildConfiguration: polaris.BuildConfiguration = { ... }
Properties
| Name | Type | Description |
|---|---|---|
| string | The build command will be invoked to use build capture to capture the project. |
| boolean | Specifies whether to enable or disable the automatic invocation of Aspnet_compiler.exe for any ASP.NET 4 and earlier Web applications that are detected in the build. The output of Aspnet_compiler.exe is required by the C# and Visual Basic security checkers. |
| boolean | Specifies whether to enable Bazel capture. |
| string | The clean command will be invoked prior to doing build capture to capture the project. |
| string[] | Additional arguments to pass to cov-build when doing build capture. |
| boolean | Specifies whether the build should only record the decompilations of byte code during the build and not attempt to decompile and emit the byte code. |
| boolean | Specifies whether to use the instrumentation mode instead of the debugger. |
| | Specifies how to parallelize translation of C and C++ code. |
| boolean | Specifies whether to enable the collection of scan transparency data for build capture. |
buildCommandRequired
public readonly buildCommand: string;
- Type: string
The build command will be invoked to use build capture to capture the project.
A build command specified on the command-line will override this setting.
aspnetCompilerOptional
public readonly aspnetCompiler: boolean;
- Type: boolean
Specifies whether to enable or disable the automatic invocation of Aspnet_compiler.exe for any ASP.NET 4 and earlier Web applications that are detected in the build. The output of Aspnet_compiler.exe is required by the C# and Visual Basic security checkers.
bazelOptional
public readonly bazel: boolean;
- Type: boolean
Specifies whether to enable Bazel capture.
cleanCommandOptional
public readonly cleanCommand: string;
- Type: string
The clean command will be invoked prior to doing build capture to capture the project.
covBuildArgsOptional
public readonly covBuildArgs: string[];
- Type: string[]
Additional arguments to pass to cov-build when doing build capture.
deferDecompOptional
public readonly deferDecomp: boolean;
- Type: boolean
Specifies whether the build should only record the decompilations of byte code during the build and not attempt to decompile and emit the byte code.
During the analysis phase, cov-build will be rerun with --replay-decomp to decompile and emit the byte code.
instrumentOptional
public readonly instrument: boolean;
- Type: boolean
Specifies whether to use the instrumentation mode instead of the debugger.
For certain builds, this configuration can significantly improve build times. This setting is applicable only on Windows.
parallelTranslateOptional
public readonly parallelTranslate: ParallelTranslateConfiguration;
Specifies how to parallelize translation of C and C++ code.
scanTransparencyOptional
public readonly scanTransparency: boolean;
- Type: boolean
Specifies whether to enable the collection of scan transparency data for build capture.
This setting must be enabled if the Coverity Connect instance has 'scan.transparency.enabled=true' in its configuration.
CachingConfiguration
Specifies how the CLI should handle caching when performing capture/analysis.
Initializer
import { polaris } from 'projen'
const cachingConfiguration: polaris.CachingConfiguration = { ... }
Properties
| Name | Type | Description |
|---|---|---|
| boolean | A true value indicates caching will be used when performing remote analysis. |
enabledOptional
public readonly enabled: boolean;
- Type: boolean
A true value indicates caching will be used when performing remote analysis.
CaptureConfiguration
Specifies how the project should be captured.
Initializer
import { polaris } from 'projen'
const captureConfiguration: polaris.CaptureConfiguration = { ... }
Properties
| Name | Type | Description |
|---|---|---|
| | No description. |
| boolean | Specifies whether to enable or disable build command inference. |
| | Specifies which compilers to configure. |
| | No description. |
| boolean | Records additional information during the emit process needed for the compliance checkers. |
| string | Specifies the encoding to use when parsing and emitting the source files. |
| number | Specifies the minimum percentage of files that must be captured in order to proceed with the analysis. |
| | Specifies which non-compiled files to capture. |
| boolean | Force resolution of Maven, Gradle and MSBuild dependencies even if this is not needed based on the detected source languages in the project. |
| | Specifies how to import data about source file changes from the source control management system. |
| | Specifies which languages to include or exclude for capture. |
| boolean | Specifies whether to limit the group of emitted JAR files to those needed for compilation of the Java files. |
| boolean | Specifies whether to do a complete capture or a record with source capture. |
| boolean | Enables or disables security dynamic analysis. |
buildCaptureOptional
public readonly buildCapture: BuildConfiguration;
- Type: BuildConfiguration
buildCommandInferenceOptional
public readonly buildCommandInference: boolean;
- Type: boolean
Specifies whether to enable or disable build command inference.
If build command inference is disabled and no build command is provided then no attempt at build capture will be made.
compilerConfigurationOptional
public readonly compilerConfiguration: CompilerConfiguration;
- Type: CompilerConfiguration
Specifies which compilers to configure.
By default, template compilers are configured.
covTranslateOptional
public readonly covTranslate: CovTranslateConfiguration;
emitComplementaryInfoOptional
public readonly emitComplementaryInfo: boolean;
- Type: boolean
Records additional information during the emit process needed for the compliance checkers.
If a "coding-standards" configuration is present then this flag will automatically be set to true.
encodingOptional
public readonly encoding: string;
- Type: string
Specifies the encoding to use when parsing and emitting the source files.
failureThresholdPercentOptional
public readonly failureThresholdPercent: number;
- Type: number
Specifies the minimum percentage of files that must be captured in order to proceed with the analysis.
filesOptional
public readonly files: FilesConfiguration;
- Type: FilesConfiguration
Specifies which non-compiled files to capture.
By default, all files are captured.
forceDependencyResolutionOptional
public readonly forceDependencyResolution: boolean;
- Type: boolean
Force resolution of Maven, Gradle and MSBuild dependencies even if this is not needed based on the detected source languages in the project.
importScmOptional
public readonly importScm: ImportScmConfiguration;
- Type: ImportScmConfiguration
Specifies how to import data about source file changes from the source control management system.
languagesOptional
public readonly languages: LanguagesConfiguration;
- Type: LanguagesConfiguration
Specifies which languages to include or exclude for capture.
By default, all languages are captured.
minimalClasspathEmitOptional
public readonly minimalClasspathEmit: boolean;
- Type: boolean
Specifies whether to limit the group of emitted JAR files to those needed for compilation of the Java files.
The default behavior without this option is to emit all the JAR files in the classpath regardless of whether they are referenced by a Java file in the compilation.
recordWithSourceOptional
public readonly recordWithSource: boolean;
- Type: boolean
Specifies whether to do a complete capture or a record with source capture.
securityDaOptional
public readonly securityDa: boolean;
- Type: boolean
Enables or disables security dynamic analysis.
If set to true (the default), security dynamic analysis is run as part of the capture step. If set to false, security dynamic analysis is not run.
CheckerConfiguration
Initializer
import { polaris } from 'projen'
const checkerConfiguration: polaris.CheckerConfiguration = { ... }
Properties
| Name | Type | Description |
|---|---|---|
| boolean | Indicates whether all checkers should be enabled. |
| boolean | Indicates whether all security checkers should be enabled. |
| boolean | If set to true, enables android security checkers. |
| boolean | Enables audit checkers. |
| boolean | Indicates whether the brakeman checkers should be enabled or disabled. |
| boolean | Enables C, C++, Objective-C, Objective-C++ security-related checkers that are disabled by default. |
| any | Map from checker name to configuration for the checker. |
| string[] | Specifies CodeXM (.cxm) files to use in the analysis. |
| boolean | Enables C, C++ concurrency checkers that are disabled by default. |
| boolean | Specifies whether to enable the default set of checkers. |
| boolean | Enables or disables PMD for Apex analysis. |
| boolean | Enables or disables recommended security checkers. |
| boolean | Enables C, C++ rule checkers. |
| | Specifies how web application security analysis should be done. |
allOptional
public readonly all: boolean;
- Type: boolean
Indicates whether all checkers should be enabled.
allSecurityOptional
public readonly allSecurity: boolean;
- Type: boolean
Indicates whether all security checkers should be enabled.
This includes the Security, Android Security, and Web App Security categories, and other security checkers that require explicit enablement.
androidSecurityOptional
public readonly androidSecurity: boolean;
- Type: boolean
If set to true, enables android security checkers.
auditOptional
public readonly audit: boolean;
- Type: boolean
Enables audit checkers.
brakemanOptional
public readonly brakeman: boolean;
- Type: boolean
Indicates whether the brakeman checkers should be enabled or disabled.
cFamilySecurityOptional
public readonly cFamilySecurity: boolean;
- Type: boolean
Enables C, C++, Objective-C, Objective-C++ security-related checkers that are disabled by default.
checkerConfigOptional
public readonly checkerConfig: any;
- Type: any
Map from checker name to configuration for the checker.
The configuration indicates whether the checker should be enabled or not and allows users to set options used to configure the checker.
codexmOptional
public readonly codexm: string[];
- Type: string[]
Specifies CodeXM (.cxm) files to use in the analysis.
concurrencyOptional
public readonly concurrency: boolean;
- Type: boolean
Enables C, C++ concurrency checkers that are disabled by default.
defaultOptional
public readonly default: boolean;
- Type: boolean
Specifies whether to enable the default set of checkers.
If set to true, the default set of checkers is enabled. Set to false to get more control over which checkers are enabled.
pmdOptional
public readonly pmd: boolean;
- Type: boolean
Enables or disables PMD for Apex analysis.
recommendedSecurityCheckersOptional
public readonly recommendedSecurityCheckers: boolean;
- Type: boolean
Enables or disables recommended security checkers.
ruleOptional
public readonly rule: boolean;
- Type: boolean
Enables C, C++ rule checkers.
webappSecurityOptional
public readonly webappSecurity: CheckerConfigurationWebappSecurity;
Specifies how web application security analysis should be done.
CheckerConfigurationWebappSecurity
Specifies how web application security analysis should be done.
Initializer
import { polaris } from 'projen'
const checkerConfigurationWebappSecurity: polaris.CheckerConfigurationWebappSecurity = { ... }
Properties
| Name | Type | Description |
|---|---|---|
| | Sets the web application checkers aggressiveness level. |
| boolean | Enables the checkers that are used for web application security analysis. |
aggressivenessLevelOptional
public readonly aggressivenessLevel: CheckerConfigurationWebappSecurityAggressivenessLevel;
Sets the web application checkers aggressiveness level.
enabledOptional
public readonly enabled: boolean;
- Type: boolean
Enables the checkers that are used for web application security analysis.
CodingStandardConfiguration
Initializer
import { polaris } from 'projen'
const codingStandardConfiguration: polaris.CodingStandardConfiguration = { ... }
Properties
| Name | Type | Description |
|---|---|---|
| | Enables AUTOSAR code compliance checking according to the given configuration. |
| | Enables CERT-C code compliance checking according to the given configuration. |
| | Enables CERT-CPP code compliance checking according to the given configuration. |
| | Enables CERT-C Recommendation code compliance checking according to the given configuration. |
| | Enables CERT-Java code compliance checking according to the given configuration. |
| | Enables HYUNDAI-C code compliance checking according to the given configuration. |
| | Enables HYUNDAI-CPP code compliance checking according to the given configuration. |
| | Enables HYUNDAI-Java code compliance checking according to the given configuration. |
| boolean | If set to true, any defects found in code annotated using the #pragma Coverity compliance directive will not be reported in Coverity Connect. |
| | Enables ISO TS 17961 code compliance checking according to the given configuration. |
| | Enables MISRA C 2004 code compliance checking according to the given configuration. |
| | Enables MISRA C 2012 code compliance checking according to the given configuration. |
| | Enables MISRA C 2023 code compliance checking according to the given configuration. |
| | Enables MISRA C++ 2008 code compliance checking according to the given configuration. |
| | Enables MISRA C++ 2023 code compliance checking according to the given configuration. |
autosarcpp14Optional
public readonly autosarcpp14: SpecificCodingStandardConfiguration;
Enables AUTOSAR code compliance checking according to the given configuration.
certCOptional
public readonly certC: SpecificCodingStandardConfiguration;
Enables CERT-C code compliance checking according to the given configuration.
certCppOptional
public readonly certCpp: SpecificCodingStandardConfiguration;
Enables CERT-CPP code compliance checking according to the given configuration.
certCRecommendationOptional
public readonly certCRecommendation: SpecificCodingStandardConfiguration;
Enables CERT-C Recommendation code compliance checking according to the given configuration.
certJavaOptional
public readonly certJava: SpecificCodingStandardConfiguration;
Enables CERT-Java code compliance checking according to the given configuration.
hyundaiCOptional
public readonly hyundaiC: SpecificCodingStandardConfiguration;
Enables HYUNDAI-C code compliance checking according to the given configuration.
hyundaiCppOptional
public readonly hyundaiCpp: SpecificCodingStandardConfiguration;
Enables HYUNDAI-CPP code compliance checking according to the given configuration.
hyundaiJavaOptional
public readonly hyundaiJava: SpecificCodingStandardConfiguration;
Enables HYUNDAI-Java code compliance checking according to the given configuration.
ignoreDeviatedFindingsOptional
public readonly ignoreDeviatedFindings: boolean;
- Type: boolean
If set to true, any defects found in code annotated using the #pragma Coverity compliance directive will not be reported in Coverity Connect.
Information about the defects that were suppressed can then be found in two files: deviations.txt deviations-warnings.txt
isoTs17961Optional
public readonly isoTs17961: SpecificCodingStandardConfiguration;
Enables ISO TS 17961 code compliance checking according to the given configuration.
misrac2004Optional
public readonly misrac2004: SpecificCodingStandardConfiguration;
Enables MISRA C 2004 code compliance checking according to the given configuration.
misrac2012Optional
public readonly misrac2012: SpecificCodingStandardConfiguration;
Enables MISRA C 2012 code compliance checking according to the given configuration.
misrac2023Optional
public readonly misrac2023: SpecificCodingStandardConfiguration;
Enables MISRA C 2023 code compliance checking according to the given configuration.
misracpp2008Optional
public readonly misracpp2008: SpecificCodingStandardConfiguration;
Enables MISRA C++ 2008 code compliance checking according to the given configuration.
misracpp2023Optional
public readonly misracpp2023: SpecificCodingStandardConfiguration;
Enables MISRA C++ 2023 code compliance checking according to the given configuration.
CodingStandardDeviation
Initializer
import { polaris } from 'projen'
const codingStandardDeviation: polaris.CodingStandardDeviation = { ... }
Properties
| Name | Type | Description |
|---|---|---|
| string | The name of the rule to deviate from. |
| string | The reason that the rule is being deviated from. |
deviationRequired
public readonly deviation: string;
- Type: string
The name of the rule to deviate from.
reasonRequired
public readonly reason: string;
- Type: string
The reason that the rule is being deviated from.
CommitConfiguration
Specifies where the analysis results should be sent.
Initializer
import { polaris } from 'projen'
const commitConfiguration: polaris.CommitConfiguration = { ... }
Properties
| Name | Type | Description |
|---|---|---|
| | Coverity Connect configuration to use when committing defects to Coverity Connect. |
| | Local configuration to use when saving defects to the local file system. |
| | Software Risk Manager configuration to use when storing defects in Software Risk Manager. |
connectOptional
public readonly connect: CommitConfigurationConnect;
Coverity Connect configuration to use when committing defects to Coverity Connect.
localOptional
public readonly local: CommitConfigurationLocal;
- Type: CommitConfigurationLocal
Local configuration to use when saving defects to the local file system.
srmOptional
public readonly srm: CommitConfigurationSrm;
- Type: CommitConfigurationSrm
Software Risk Manager configuration to use when storing defects in Software Risk Manager.
CommitConfigurationConnect
Coverity Connect configuration to use when committing defects to Coverity Connect.
Initializer
import { polaris } from 'projen'
const commitConfigurationConnect: polaris.CommitConfigurationConnect = { ... }
Properties
| Name | Type | Description |
|---|---|---|
| string | The name of the stream to commit the results to. |
| string | Absolute URL of where to commit the Coverity Connect results. |
| string | The authentication key file to use when authenticating to Coverity Connect to commit defects. |
| string | File containing additional certificates to trust in addition to the ones in the system certificate store and the Coverity TFT store. |
| boolean | If true, analysis results will not be committed to Coverity Connect. |
| string | Output file to which analysis results should be written instead of being committed to Coverity Connect. |
| string[] | Additional arguments to pass to "cov-commit-defects" during the commit phase. |
| string | A description for the committed snapshot. |
| | Indicates whether to trust self-signed certificates presented by Coverity Connect that are not currently trusted. |
| string | The name of the project to use when creating a new stream. |
| string | File containing the client certificate in PEM format, that should be presented to the proxy when making a request. |
| string | File containing the client certificate private key in PEM format, for the proxy-client-cert-file. |
| string | URL for a forward proxy to use when communicating with Coverity Connect. |
| | The name of the source control management system. |
| | Specifies how to select a reference snapshot to use for a comparison report. |
| | Specifies how new defects should be handled. |
| | Artifacts to upload following analysis when the analysis location is Connect. |
| string | A project version for the committed snapshot. |
streamRequired
public readonly stream: string;
- Type: string
The name of the stream to commit the results to.
urlRequired
public readonly url: string;
- Type: string
Absolute URL of where to commit the Coverity Connect results.
authKeyFileOptional
public readonly authKeyFile: string;
- Type: string
The authentication key file to use when authenticating to Coverity Connect to commit defects.
By default, the file located at $HOME/.coverity/ak-
caCertsFileOptional
public readonly caCertsFile: string;
- Type: string
File containing additional certificates to trust in addition to the ones in the system certificate store and the Coverity TFT store.
By default system CA certificates are used.
comparisonOnlyOptional
public readonly comparisonOnly: boolean;
- Type: boolean
If true, analysis results will not be committed to Coverity Connect.
Instead, results compared to a reference snapshot may be saved locally as specified by the "commit.local" settings.
comparisonReportOptional
public readonly comparisonReport: string;
- Type: string
Output file to which analysis results should be written instead of being committed to Coverity Connect.
The output includes a comparison against the latest snapshot for the specified stream.
covCommitDefectsArgsOptional
public readonly covCommitDefectsArgs: string[];
- Type: string[]
Additional arguments to pass to "cov-commit-defects" during the commit phase.
descriptionOptional
public readonly description: string;
- Type: string
A description for the committed snapshot.
onNewCertOptional
public readonly onNewCert: CommitConfigurationConnectOnNewCert;
Indicates whether to trust self-signed certificates presented by Coverity Connect that are not currently trusted.
projectOptional
public readonly project: string;
- Type: string
The name of the project to use when creating a new stream.
Ignored when stream creation is not needed. By default the stream name is used.
proxyClientCertFileOptional
public readonly proxyClientCertFile: string;
- Type: string
File containing the client certificate in PEM format, that should be presented to the proxy when making a request.
proxyClientKeyFileOptional
public readonly proxyClientKeyFile: string;
- Type: string
File containing the client certificate private key in PEM format, for the proxy-client-cert-file.
proxyUrlOptional
public readonly proxyUrl: string;
- Type: string
URL for a forward proxy to use when communicating with Coverity Connect.
Must be an https URL.
scmOptional
public readonly scm: CommitConfigurationConnectScm;
The name of the source control management system.
snapshotOptional
public readonly snapshot: SnapshotConfiguration;
- Type: SnapshotConfiguration
Specifies how to select a reference snapshot to use for a comparison report.
triageOptional
public readonly triage: CommitConfigurationConnectTriage;
Specifies how new defects should be handled.
uploadArtifactsOptional
public readonly uploadArtifacts: CommitConfigurationConnectUploadArtifacts;
Artifacts to upload following analysis when the analysis location is Connect.
versionOptional
public readonly version: string;
- Type: string
A project version for the committed snapshot.
CommitConfigurationConnectTriage
Specifies how new defects should be handled.
Initializer
import { polaris } from 'projen'
const commitConfigurationConnectTriage: polaris.CommitConfigurationConnectTriage = { ... }
Properties
| Name | Type | Description |
|---|---|---|
| string | User to whom any new defects will be assigned. |
| number | Limit on the number of defects to assign to the specified user. |
| boolean | If true, the owner for newly detected defects that exist locally is set to the specified user. |
newDefectOwnerOptional
public readonly newDefectOwner: string;
- Type: string
User to whom any new defects will be assigned.
The specified user must already exist in the Coverity Connect database. The default is the current user.
newDefectOwnerLimitOptional
public readonly newDefectOwnerLimit: number;
- Type: number
Limit on the number of defects to assign to the specified user.
If the number of discovered defects is more than the limit, then no assignment is done.
setNewDefectOwnerOptional
public readonly setNewDefectOwner: boolean;
- Type: boolean
If true, the owner for newly detected defects that exist locally is set to the specified user.
CommitConfigurationLocal
Local configuration to use when saving defects to the local file system.
Initializer
import { polaris } from 'projen'
const commitConfigurationLocal: polaris.CommitConfigurationLocal = { ... }
Properties
| Name | Type | Description |
|---|---|---|
| string | Directory (for "html" format) or file (for "json" format) in which to save defects. |
| | Format in which to save defects. |
pathRequired
public readonly path: string;
- Type: string
Directory (for "html" format) or file (for "json" format) in which to save defects.
formatOptional
public readonly format: CommitConfigurationLocalFormat;
Format in which to save defects.
Either "html" or "json".
CommitConfigurationSrm
Software Risk Manager configuration to use when storing defects in Software Risk Manager.
Initializer
import { polaris } from 'projen'
const commitConfigurationSrm: polaris.CommitConfigurationSrm = { ... }
Properties
| Name | Type | Description |
|---|---|---|
| string | The URL of the Software Risk Manager to use for the analysis (if doing a remote analysis) and the analysis results. |
| string | The name of the branch to associate the analysis results with in Software Risk Manager. |
| string | The name of the parent branch of the actual branch. |
| number | The ID of the project to associate the analysis results with in Software Risk Manager. |
| string | The name of the project to associate the analysis results with in Software Risk Manager. |
| string | The name of the file to read the Software Risk Manager API key from. |
urlRequired
public readonly url: string;
- Type: string
The URL of the Software Risk Manager to use for the analysis (if doing a remote analysis) and the analysis results.
branchOptional
public readonly branch: string;
- Type: string
The name of the branch to associate the analysis results with in Software Risk Manager.
parentBranchOptional
public readonly parentBranch: string;
- Type: string
The name of the parent branch of the actual branch.
projectIdOptional
public readonly projectId: number;
- Type: number
The ID of the project to associate the analysis results with in Software Risk Manager.
projectNameOptional
public readonly projectName: string;
- Type: string
The name of the project to associate the analysis results with in Software Risk Manager.
tokenFileOptional
public readonly tokenFile: string;
- Type: string
The name of the file to read the Software Risk Manager API key from.
By default, the file located at $HOME/.bridge/srm-token.txt is used.
CompilerConfiguration
Initializer
import { polaris } from 'projen'
const compilerConfiguration: polaris.CompilerConfiguration = { ... }
Properties
| Name | Type | Description |
|---|---|---|
| string[][] | Specifies a list of arguments to pass to "cov-configure" to generate the compiler configuration to use during capture. |
| string | Specifies a pre-generated compiler configuration file to use. |
covConfigureOptional
public readonly covConfigure: string[][];
- Type: string[][]
Specifies a list of arguments to pass to "cov-configure" to generate the compiler configuration to use during capture.
This key is mutually exclusive with the "file" key.
fileOptional
public readonly file: string;
- Type: string
Specifies a pre-generated compiler configuration file to use.
This key is mutually exclusive with the "cov-configure" key.
CovTranslateConfiguration
Command to invoke that will invoke "cov-translate" to capture the project.
Initializer
import { polaris } from 'projen'
const covTranslateConfiguration: polaris.CovTranslateConfiguration = { ... }
Properties
| Name | Type | Description |
|---|---|---|
| string | This key specifies a command to invoke that will invoke "cov-translate" in the case where the user is doing a "cov-translate" capture. |
| string[] | Additional arguments to pass to cov-build when invoking the provided command. |
| boolean | Specifies whether the build should only record the decompilations of byte code during the build and not attempt to decompile and emit the byte code. |
| | Specifies how to parallelize translation of C and C++ code. |
| boolean | Specifies whether to enable the collection of scan transparency data for cov-translate capture. |
commandRequired
public readonly command: string;
- Type: string
This key specifies a command to invoke that will invoke "cov-translate" in the case where the user is doing a "cov-translate" capture.
covBuildArgsOptional
public readonly covBuildArgs: string[];
- Type: string[]
Additional arguments to pass to cov-build when invoking the provided command.
deferDecompOptional
public readonly deferDecomp: boolean;
- Type: boolean
Specifies whether the build should only record the decompilations of byte code during the build and not attempt to decompile and emit the byte code.
During the analysis phase, cov-build will be rerun with --replay-decomp to decompile and emit the byte code.
parallelTranslateOptional
public readonly parallelTranslate: ParallelTranslateConfiguration;
Specifies how to parallelize translation of C and C++ code.
scanTransparencyOptional
public readonly scanTransparency: boolean;
- Type: boolean
Specifies whether to enable the collection of scan transparency data for cov-translate capture.
This setting must be enabled if the Coverity Connect instance has 'scan.transparency.enabled=true' in its configuration.
DirectivesConfiguration
Initializer
import { polaris } from 'projen'
const directivesConfiguration: polaris.DirectivesConfiguration = { ... }
Properties
| Name | Type | Description |
|---|---|---|
| | Security directives configuration to use during the analysis. |
| string | File containing security directives to use during the analysis. |
configOptional
public readonly config: DirectivesConfigurationConfig;
Security directives configuration to use during the analysis.
This key is mutually exclusive with the "file" key and is specified in the case where the user wants to in-line the security directives configuration in the file.
fileOptional
public readonly file: string;
- Type: string
File containing security directives to use during the analysis.
This key is mutually exclusive with the "config" key.
DirectivesConfigurationConfig
Security directives configuration to use during the analysis.
This key is mutually exclusive with the "file" key and is specified in the case where the user wants to in-line the security directives configuration in the file.
Initializer
import { polaris } from 'projen'
const directivesConfigurationConfig: polaris.DirectivesConfigurationConfig = { ... }
Properties
| Name | Type | Description |
|---|---|---|
| any[] | Specify a particular analysis behavior. |
| string | Language or language family to which directives apply. |
| number | Version of the directives format. |
| | Must be the string "Coverity analysis configuration". |
directivesRequired
public readonly directives: any[];
- Type: any[]
Specify a particular analysis behavior.
languageRequired
public readonly language: string;
- Type: string
Language or language family to which directives apply.
formatVersionOptional
public readonly formatVersion: number;
- Type: number
Version of the directives format.
typeOptional
public readonly type: DirectivesConfigurationConfigType;
Must be the string "Coverity analysis configuration".
FilesConfiguration
Initializer
import { polaris } from 'projen'
const filesConfiguration: polaris.FilesConfiguration = { ... }
Properties
| Name | Type | Description |
|---|---|---|
| boolean | Specifies whether to enable capture of minified JavaScript files. |
| string | Glob pattern that specifies the set of source files to exclude from capture. |
| string | Regular expression that specifies the set of source files to exclude from capture. |
| string[] | List of directory basenames to include for capture, which would normally have been excluded. |
| string | Glob pattern that specifies the set of source files to capture. |
| string | File containing the paths of source files to capture, one per line. |
| string | Regular expression that specifies the set of source files to capture. |
| string | Specifies the Java version to use when parsing and emitting Java source files with buildless capture. |
| string[] | List of directories to look in for dependencies to use during capture. |
| string[] | List of file dependencies to use during capture. |
| | Specifies information about which web-application archives should be captured. |
emitMinifiedJsOptional
public readonly emitMinifiedJs: boolean;
- Type: boolean
Specifies whether to enable capture of minified JavaScript files.
excludeGlobOptional
public readonly excludeGlob: string;
- Type: string
Glob pattern that specifies the set of source files to exclude from capture.
Note that any include glob patterns and regular expressions are processed prior to handling exclude glob patterns and regular expressions.
excludeRegexOptional
public readonly excludeRegex: string;
- Type: string
Regular expression that specifies the set of source files to exclude from capture.
Note that any include glob patterns and regular expressions are processed prior to handling exclude glob patterns and regular expressions.
includeDirsOptional
public readonly includeDirs: string[];
- Type: string[]
List of directory basenames to include for capture, which would normally have been excluded.
By default, directories named "vendor" or "node_modules" are excluded, as are directories whose names begin with "."
includeGlobOptional
public readonly includeGlob: string;
- Type: string
Glob pattern that specifies the set of source files to capture.
includeListFileOptional
public readonly includeListFile: string;
- Type: string
File containing the paths of source files to capture, one per line.
Include and exclude glob patterns and regular expressions are applied to determine which of these files are actually captured.
includeRegexOptional
public readonly includeRegex: string;
- Type: string
Regular expression that specifies the set of source files to capture.
javaVersionOptional
public readonly javaVersion: string;
- Type: string
Specifies the Java version to use when parsing and emitting Java source files with buildless capture.
libraryDirsOptional
public readonly libraryDirs: string[];
- Type: string[]
List of directories to look in for dependencies to use during capture.
libraryFilesOptional
public readonly libraryFiles: string[];
- Type: string[]
List of file dependencies to use during capture.
webappArchivesOptional
public readonly webappArchives: WebappArchiveConfiguration[];
- Type: WebappArchiveConfiguration[]
Specifies information about which web-application archives should be captured.
By default all webapp archives are captured.
ImportScmConfiguration
Initializer
import { polaris } from 'projen'
const importScmConfiguration: polaris.ImportScmConfiguration = { ... }
Properties
| Name | Type | Description |
|---|---|---|
| string[] | Additional arguments to pass to cov-import-scm following capture. |
| string | Regular expression that specifies the set of files for which to import change information. |
| number | Delay in milliseconds between calls to the underlying SCM. |
| string | The name of the source control management system. |
covImportScmArgsOptional
public readonly covImportScmArgs: string[];
- Type: string[]
Additional arguments to pass to cov-import-scm following capture.
filenameRegexOptional
public readonly filenameRegex: string;
- Type: string
Regular expression that specifies the set of files for which to import change information.
msDelayOptional
public readonly msDelay: number;
- Type: number
Delay in milliseconds between calls to the underlying SCM.
scmOptional
public readonly scm: string;
- Type: string
The name of the source control management system.
JobsConfiguration
Initializer
import { polaris } from 'projen'
const jobsConfiguration: polaris.JobsConfiguration = { ... }
Properties
| Name | Type | Description |
|---|---|---|
| boolean | If true, the number of analysis workers to run in parallel is based on the amount of memory and number of logical processors in the machine. |
| number | Number of analysis workers to run in parallel. |
| number | Maximum number of analysis worker to run in parallel, subject to limits on the amount of memory and number of logical processors in the machine. |
| boolean | Allows the number of analysis workers to exceed the recommended value. |
autoOptional
public readonly auto: boolean;
- Type: boolean
If true, the number of analysis workers to run in parallel is based on the amount of memory and number of logical processors in the machine.
This is the default for a non-Flexnet license. This key is mutually exclusive with the "count" and "max" keys.
countOptional
public readonly count: number;
- Type: number
Number of analysis workers to run in parallel.
This key is mutually exclusive with the "auto" and "max" keys.
maxOptional
public readonly max: number;
- Type: number
Maximum number of analysis worker to run in parallel, subject to limits on the amount of memory and number of logical processors in the machine.
A value of 8 is the default for a Flexnet license. This key is mutually exclusive with the "auto" and "count" keys.
overrideWorkerLimitOptional
public readonly overrideWorkerLimit: boolean;
- Type: boolean
Allows the number of analysis workers to exceed the recommended value.
This key may only be used with the "count" key.
LanguagesConfiguration
Initializer
import { polaris } from 'projen'
const languagesConfiguration: polaris.LanguagesConfiguration = { ... }
Properties
| Name | Type | Description |
|---|---|---|
| | Specifies the languages for which the source code should be excluded in the capture. |
| | Specifies the languages for which the source code should be included in the capture. |
excludeOptional
public readonly exclude: LanguagesConfigurationExclude[];
- Type: LanguagesConfigurationExclude[]
Specifies the languages for which the source code should be excluded in the capture.
This key is mutually exclusive with the "include" key.
includeOptional
public readonly include: LanguagesConfigurationInclude[];
- Type: LanguagesConfigurationInclude[]
Specifies the languages for which the source code should be included in the capture.
This key is mutually exclusive with the "exclude" key.
ParallelTranslateConfiguration
Initializer
import { polaris } from 'projen'
const parallelTranslateConfiguration: polaris.ParallelTranslateConfiguration = { ... }
Properties
| Name | Type | Description |
|---|---|---|
| boolean | Specifies whether cov-translate parallelization should be enabled. |
| number | Specifies the number of cov-emit processes to be run in parallel by cov-translate when multiple files are seen on a single native compiler invocation. |
enabledOptional
public readonly enabled: boolean;
- Type: boolean
Specifies whether cov-translate parallelization should be enabled.
processesOptional
public readonly processes: number;
- Type: number
Specifies the number of cov-emit processes to be run in parallel by cov-translate when multiple files are seen on a single native compiler invocation.
A value of 0 will use the number of logical processors in the machine.
ParseWarningsConfiguration
Initializer
import { polaris } from 'projen'
const parseWarningsConfiguration: polaris.ParseWarningsConfiguration = { ... }
Properties
| Name | Type | Description |
|---|---|---|
| boolean | Enables parse warnings, recovery warnings, and semantic warnings that are produced by the cov-build command so that they appear as defects in Coverity Connect. |
enabledOptional
public readonly enabled: boolean;
- Type: boolean
Enables parse warnings, recovery warnings, and semantic warnings that are produced by the cov-build command so that they appear as defects in Coverity Connect.
By default, this is disabled if the aggressiveness level is low, and enabled if the aggressiveness level is medium or high.
PolarisCoverityGoOptions
Options for PolarisCoverityGo.
Extends base options with Go-specific defaults.
Initializer
import { polaris } from 'projen'
const polarisCoverityGoOptions: polaris.PolarisCoverityGoOptions = { ... }
Properties
| Name | Type | Description |
|---|---|---|
| | No description. |
| | No description. |
| | No description. |
| | No description. |
| number | Specifies the version of the configuration file in use. |
commitRequired
public readonly commit: CommitConfiguration;
- Type: CommitConfiguration
analyzeOptional
public readonly analyze: AnalysisConfiguration;
- Type: AnalysisConfiguration
cachingOptional
public readonly caching: CachingConfiguration;
- Type: CachingConfiguration
captureOptional
public readonly capture: CaptureConfiguration;
- Type: CaptureConfiguration
versionOptional
public readonly version: number;
- Type: number
Specifies the version of the configuration file in use.
PolarisCoverityJavaOptions
Options for PolarisCoverityJava.
Extends base options with Java-specific defaults.
Initializer
import { polaris } from 'projen'
const polarisCoverityJavaOptions: polaris.PolarisCoverityJavaOptions = { ... }
Properties
| Name | Type | Description |
|---|---|---|
| | No description. |
| | No description. |
| | No description. |
| | No description. |
| number | Specifies the version of the configuration file in use. |
commitRequired
public readonly commit: CommitConfiguration;
- Type: CommitConfiguration
analyzeOptional
public readonly analyze: AnalysisConfiguration;
- Type: AnalysisConfiguration
cachingOptional
public readonly caching: CachingConfiguration;
- Type: CachingConfiguration
captureOptional
public readonly capture: CaptureConfiguration;
- Type: CaptureConfiguration
versionOptional
public readonly version: number;
- Type: number
Specifies the version of the configuration file in use.
PolarisCoverityJavascriptOptions
Options for PolarisCoverityJavascript.
Extends base options with JavaScript/TypeScript-specific defaults.
Initializer
import { polaris } from 'projen'
const polarisCoverityJavascriptOptions: polaris.PolarisCoverityJavascriptOptions = { ... }
Properties
| Name | Type | Description |
|---|---|---|
| | No description. |
| | No description. |
| | No description. |
| | No description. |
| number | Specifies the version of the configuration file in use. |
commitRequired
public readonly commit: CommitConfiguration;
- Type: CommitConfiguration
analyzeOptional
public readonly analyze: AnalysisConfiguration;
- Type: AnalysisConfiguration
cachingOptional
public readonly caching: CachingConfiguration;
- Type: CachingConfiguration
captureOptional
public readonly capture: CaptureConfiguration;
- Type: CaptureConfiguration
versionOptional
public readonly version: number;
- Type: number
Specifies the version of the configuration file in use.
PolarisCoverityOptions
Options for PolarisCoverity.
Initializer
import { polaris } from 'projen'
const polarisCoverityOptions: polaris.PolarisCoverityOptions = { ... }
Properties
| Name | Type | Description |
|---|---|---|
| | No description. |
| | No description. |
| | No description. |
| | No description. |
| number | Specifies the version of the configuration file in use. |
commitRequired
public readonly commit: CommitConfiguration;
- Type: CommitConfiguration
analyzeOptional
public readonly analyze: AnalysisConfiguration;
- Type: AnalysisConfiguration
cachingOptional
public readonly caching: CachingConfiguration;
- Type: CachingConfiguration
captureOptional
public readonly capture: CaptureConfiguration;
- Type: CaptureConfiguration
versionOptional
public readonly version: number;
- Type: number
Specifies the version of the configuration file in use.
PolarisCoveritySchema
Initializer
import { polaris } from 'projen'
const polarisCoveritySchema: polaris.PolarisCoveritySchema = { ... }
Properties
| Name | Type | Description |
|---|---|---|
| | No description. |
| | No description. |
| | No description. |
| | No description. |
| number | Specifies the version of the configuration file in use. |
commitRequired
public readonly commit: CommitConfiguration;
- Type: CommitConfiguration
analyzeOptional
public readonly analyze: AnalysisConfiguration;
- Type: AnalysisConfiguration
cachingOptional
public readonly caching: CachingConfiguration;
- Type: CachingConfiguration
captureOptional
public readonly capture: CaptureConfiguration;
- Type: CaptureConfiguration
versionOptional
public readonly version: number;
- Type: number
Specifies the version of the configuration file in use.
ResolvedCodingStandardConfiguration
Initializer
import { polaris } from 'projen'
const resolvedCodingStandardConfiguration: polaris.ResolvedCodingStandardConfiguration = { ... }
Properties
| Name | Type | Description |
|---|---|---|
| string | Name of this code compliance configuration. |
| | List of deviations for this standard. |
| string | Version of this code compliance configuration. |
titleRequired
public readonly title: string;
- Type: string
Name of this code compliance configuration.
deviationsOptional
public readonly deviations: CodingStandardDeviation[];
- Type: CodingStandardDeviation[]
List of deviations for this standard.
versionOptional
public readonly version: string;
- Type: string
Version of this code compliance configuration.
SigmaConfiguration
Initializer
import { polaris } from 'projen'
const sigmaConfiguration: polaris.SigmaConfiguration = { ... }
Properties
| Name | Type | Description |
|---|---|---|
| | List of check sets to enable. |
| string[] | List of files containing malicious URL patterns. |
enableCheckSetOptional
public readonly enableCheckSet: SigmaConfigurationEnableCheckSet[];
- Type: SigmaConfigurationEnableCheckSet[]
List of check sets to enable.
maliciousUrlPatternsFileOptional
public readonly maliciousUrlPatternsFile: string[];
- Type: string[]
List of files containing malicious URL patterns.
SnapshotConfiguration
Initializer
import { polaris } from 'projen'
const snapshotConfiguration: polaris.SnapshotConfiguration = { ... }
Properties
| Name | Type | Description |
|---|---|---|
| string | Date and time of snapshot to use for comparison report. |
| number | ID of snapshot to use for comparison report. |
| any | One of "idir", "latest", or "scm". |
dateOptional
public readonly date: string;
- Type: string
Date and time of snapshot to use for comparison report.
The value should be of the form "YYYY-MM-DDThh:mm:ss" where date and time are separated by a "T", optionally followed by a time zone specification consisting of either "Z" denoting UTC or a "+" or "-" character followed by colon-separated hours and minutes east of UTC. Example: "2023-12-27T13:21:05-08:00". If no time zone is specified, the local time zone is assumed. This key is mutually exclusive with the "id" and "reference" keys.
idOptional
public readonly id: number;
- Type: number
ID of snapshot to use for comparison report.
This key is mutually exclusive with the "date" and "reference" keys.
referenceOptional
public readonly reference: any;
- Type: any
One of "idir", "latest", or "scm".
"idir" will use the snapshot created closest to, but not after, the creation date of the intermediate directory. "latest" will use the snapshot with the latest code-version date in the specified stream. "scm" will query the SCM to determine the version that was most recently checked out or updated, and then use the closest snapshot. This key is mutually exclusive with the "date" and "id" keys.
SpecificCodingStandardConfiguration
Initializer
import { polaris } from 'projen'
const specificCodingStandardConfiguration: polaris.SpecificCodingStandardConfiguration = { ... }
Properties
| Name | Type | Description |
|---|---|---|
| | This key specifies the coding standard configuration for the given coding standard. |
| string | This specifies the filename containing the configuration to use for the corresponding coding standard. |
| string | This key specifies the name of a "pre-canned" coding standard configuration to use. |
configOptional
public readonly config: ResolvedCodingStandardConfiguration;
This key specifies the coding standard configuration for the given coding standard.
The actual type of this key is specific to the particular coding standard. This key is mutually exclusive with the "file" key. A temporary configuration file will be generated containing the in-line configuration and then passed to "cov-analyze" using the "--coding-standard-config <config_file>" option.
fileOptional
public readonly file: string;
- Type: string
This specifies the filename containing the configuration to use for the corresponding coding standard.
This key is mutually exclusive with the "config" key.
preCannedOptional
public readonly preCanned: string;
- Type: string
This key specifies the name of a "pre-canned" coding standard configuration to use.
The available pre-canned coding standard configurations depend on the coding standard in question. Refer to Coverity's documentation for details on the "pre-canned" configurations.
WebappArchiveConfiguration
Initializer
import { polaris } from 'projen'
const webappArchiveConfiguration: polaris.WebappArchiveConfiguration = { ... }
Properties
| Name | Type | Description |
|---|---|---|
| string | Specifies the path to the web application archive file or path to the directory containing the exploded web application. |
| boolean | Indicates whether the web-app should be checked to see if it is valid during capture. |
pathOptional
public readonly path: string;
- Type: string
Specifies the path to the web application archive file or path to the directory containing the exploded web application.
validateWebappOptional
public readonly validateWebapp: boolean;
- Type: boolean
Indicates whether the web-app should be checked to see if it is valid during capture.
The validation check checks that there is a "/WEB-INF/web.xml" file and that > 20% of classes for the web application were captured.
Enums
AnalysisConfigurationAggressivenessLevel
Specifies the aggressiveness level for the analysis.
The aggressiveness level causes the analysis to make more or less aggressive assumptions during the analysis where the higher the aggressiveness level the more defects are reported.
Members
| Name | Description |
|---|---|
| low. |
| medium. |
| high. |
LOW
low.
MEDIUM
medium.
HIGH
high.
AnalysisConfigurationLocation
Specifies whether the analysis should be done locally, in Coverity Connect, or in Software Risk Manager.
The possible values are as follows: connect - Run the analysis in the Coverity Connect job farm; srm - Run the analysis in the Software Risk Manager job farm; local - Run the analysis locally
Members
| Name | Description |
|---|---|
| local. |
| connect. |
| srm. |
LOCAL
local.
CONNECT
connect.
SRM
srm.
AnalysisConfigurationMode
Analysis mode: "pfi" (perfect fidelity incremental) for complete analysis;
or "hfi" (high fidelity incremental) for analysis of only specific files specified by analyze.files settings, omitting any other files which may have been incidentally captured by the build. An "hfi" analysis can be faster but may produce results which are incomplete or inconsistent, due to the lack of context, and should be used only when speed is more important than accuracy.
Members
| Name | Description |
|---|---|
| hfi. |
| pfi. |
HFI
hfi.
PFI
pfi.
AnalyzeConnectConfigurationUploadArtifacts
Artifacts to upload following analysis when the analysis location is Connect.
Members
| Name | Description |
|---|---|
| All. |
| LogsOnly. |
| None. |
| OnFailure. |
ALL
All.
LOGS_ONLY
LogsOnly.
NONE
None.
ON_FAILURE
OnFailure.
CheckerConfigurationWebappSecurityAggressivenessLevel
Sets the web application checkers aggressiveness level.
Members
| Name | Description |
|---|---|
| low. |
| medium. |
| high. |
LOW
low.
MEDIUM
medium.
HIGH
high.
CommitConfigurationConnectOnNewCert
Indicates whether to trust self-signed certificates presented by Coverity Connect that are not currently trusted.
Members
| Name | Description |
|---|---|
| trust. |
| distrust. |
TRUST
trust.
DISTRUST
distrust.
CommitConfigurationConnectScm
The name of the source control management system.
Members
| Name | Description |
|---|---|
| ads. |
| clearcase. |
| cvs. |
| git. |
| hg. |
| perforce. |
| plastic. |
| plastic-distributed. |
| svn. |
| tfs. |
ADS
ads.
CLEARCASE
clearcase.
CVS
cvs.
GIT
git.
HG
hg.
PERFORCE
perforce.
PLASTIC
plastic.
PLASTIC_HYPHEN_DISTRIBUTED
plastic-distributed.
SVN
svn.
TFS
tfs.
CommitConfigurationConnectUploadArtifacts
Artifacts to upload following analysis when the analysis location is Connect.
Members
| Name | Description |
|---|---|
| All. |
| LogsOnly. |
| None. |
| OnFailure. |
ALL
All.
LOGS_ONLY
LogsOnly.
NONE
None.
ON_FAILURE
OnFailure.
CommitConfigurationLocalFormat
Format in which to save defects.
Either "html" or "json".
Members
| Name | Description |
|---|---|
| html. |
| json. |
HTML
html.
JSON
json.
DirectivesConfigurationConfigType
Must be the string "Coverity analysis configuration".
Members
| Name | Description |
|---|---|
| Coverity analysis configuration. |
COVERITY_ANALYSIS_CONFIGURATION
Coverity analysis configuration.
LanguagesConfigurationExclude
Members
| Name | Description |
|---|---|
| apex. |
| c-family. |
| csharp. |
| dart. |
| go. |
| java. |
| javascript. |
| kotlin. |
| php. |
| python. |
| ruby. |
| swift. |
| vb. |
| configuration. |
APEX
apex.
C_HYPHEN_FAMILY
c-family.
CSHARP
csharp.
DART
dart.
GO
go.
JAVA
java.
JAVASCRIPT
javascript.
KOTLIN
kotlin.
PHP
php.
PYTHON
python.
RUBY
ruby.
SWIFT
swift.
VB
vb.
CONFIGURATION
configuration.
LanguagesConfigurationInclude
Members
| Name | Description |
|---|---|
| apex. |
| c-family. |
| csharp. |
| dart. |
| go. |
| java. |
| javascript. |
| kotlin. |
| php. |
| python. |
| ruby. |
| swift. |
| vb. |
| configuration. |
APEX
apex.
C_HYPHEN_FAMILY
c-family.
CSHARP
csharp.
DART
dart.
GO
go.
JAVA
java.
JAVASCRIPT
javascript.
KOTLIN
kotlin.
PHP
php.
PYTHON
python.
RUBY
ruby.
SWIFT
swift.
VB
vb.
CONFIGURATION
configuration.
SigmaConfigurationEnableCheckSet
Members
| Name | Description |
|---|---|
| all. |
| cis. |
| default. |
| empty. |
ALL
all.
CIS
cis.
DEFAULT
default.
EMPTY
empty.