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.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76ed57e2211007d3616ad740575266b96e2c8c13312266a6dc76b2f6bd09dee9 |
|
MD5 | 091733f90800cea04f7a3fcb29efd422 |
|
BLAKE2b-256 | f89877707da75b10420260f7161f71130f9465dc6c62645478880b627151ec4b |
Close
Hashes for cloudcomponents.cdk_codepipeline_anchore_inline_scan_action-2.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa233ba4a62a5f1922fe5ae7ccedb52ec6dc9bc88deb8883d0ff6b3cb21137f6 |
|
MD5 | 0cc82530cac79570393ef9ef11f3ae50 |
|
BLAKE2b-256 | 20bd1f30cb26e37e21f7f1bc5be4421be17539ce71d59b72f658c7caa32556b0 |