JSPM

  • Created
  • Published
  • Downloads 1359
  • Score
    100M100P100Q96422F
  • License MIT

CodePipeline action to integrate Anchore Engine into your pipeline

Package Exports

  • @cloudcomponents/cdk-codepipeline-anchore-inline-scan-action
  • @cloudcomponents/cdk-codepipeline-anchore-inline-scan-action/lib/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@cloudcomponents/cdk-codepipeline-anchore-inline-scan-action) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

cloudcomponents Logo

@cloudcomponents/cdk-codepipeline-anchore-inline-scan-action

Build Status cdkdx typescript python

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

MIT