CodePipeline action to integrate Anchore Engine into your pipeline
Project description
@cloudcomponents/cdk-codepipeline-anchore-inline-scan-action
CodePipeline action to integrate Anchore Engine into your pipeline
Install
TypeScript/JavaScript:
npm i @cloudcomponents/cdk-codepipeline-anchore-inline-scan-action
Python:
pip install cloudcomponents.cdk-codepipeline-anchore-inline-scan-action
How to use
import { CodePipelineAnchoreInlineScanAction } from '@cloudcomponents/cdk-codepipeline-anchore-inline-scan-action';
import { CodePipelineDockerfileLinterAction } from '@cloudcomponents/cdk-codepipeline-dockerfile-linter-action';
import { Stack, StackProps } from 'aws-cdk-lib';
import { Repository } from 'aws-cdk-lib/aws-codecommit';
import { Pipeline, Artifact } from 'aws-cdk-lib/aws-codepipeline';
import { CodeCommitSourceAction } from 'aws-cdk-lib/aws-codepipeline-actions';
import { Construct } from 'constructs';
export class ContainerAuditStack extends Stack {
constructor(scope: Construct, id: string, props?: StackProps) {
super(scope, id, props);
const repository = new Repository(this, 'Repository', {
repositoryName: 'container-audit-repository',
});
const sourceArtifact = new Artifact();
const sourceAction = new CodeCommitSourceAction({
actionName: 'CodeCommit',
repository,
output: sourceArtifact,
branch: 'master',
});
const linterAction = new CodePipelineDockerfileLinterAction({
actionName: 'Linter',
input: sourceArtifact,
});
const vulnScanAction = new CodePipelineAnchoreInlineScanAction({
actionName: 'VulnScan',
input: sourceArtifact,
});
new Pipeline(this, 'Pipeline', {
pipelineName: 'container-audit-pipeline',
stages: [
{
stageName: 'Source',
actions: [sourceAction],
},
{
stageName: 'Audit',
actions: [linterAction, vulnScanAction],
},
],
});
}
}
API Reference
See API.md.
Example
See more complete examples.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for cloudcomponents.cdk-codepipeline-anchore-inline-scan-action-2.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0d09813834a2d709fe1f0c6bae918a7c784254434252297f8d68561c778acc6 |
|
MD5 | dca7e44f0dcd18cc002fbd7dc2ce5f96 |
|
BLAKE2b-256 | dd44ef89a83337b6c17abcf5163280c9b34a7bcb8ce76a8f6e8379cce391afde |
Close
Hashes for cloudcomponents.cdk_codepipeline_anchore_inline_scan_action-2.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73fd3692caa2f8425c9aefbb6d28bc952b6e3bdd97e5a3ac2382a181ca4e7a75 |
|
MD5 | e5e6c0a9d85b3db055cd77d4aa3a75e6 |
|
BLAKE2b-256 | 3ea1bb1049a09a89ab6a428f5cd7fdaa1b0b1c0e45b213775a343ffb5196620b |