Skip to main content

CodePipeline action to integrate Anchore Engine into your pipeline

Project description

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

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

File details

Details for the file cloudcomponents.cdk-codepipeline-anchore-inline-scan-action-2.3.0.tar.gz.

File metadata

File hashes

Hashes for cloudcomponents.cdk-codepipeline-anchore-inline-scan-action-2.3.0.tar.gz
Algorithm Hash digest
SHA256 7ec81f42f7655ebf17e681f6ee5400b6d4be9e4f099faa0bf143257f1e735e6f
MD5 ecfe02c6ef741ece23c1d69a718c7c7b
BLAKE2b-256 77f1c4eeac3d5b679ea32b7ded4b9bcd2d92f4c63534e454a797166f52834534

See more details on using hashes here.

File details

Details for the file cloudcomponents.cdk_codepipeline_anchore_inline_scan_action-2.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for cloudcomponents.cdk_codepipeline_anchore_inline_scan_action-2.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dea6c51e76978772f13580f1da94c711b8e4fe2bfb617eff04ab34984d112034
MD5 790b563d0422bee9cea38f8b14698bc8
BLAKE2b-256 316b7ce6fbe1d476af0234cedb40bee44208107da172a03fd7c829c0d2bccfb7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page