Skip to main content

CodePipeline action to lint dockerfiles with hadolint

Project description

cloudcomponents Logo

@cloudcomponents/cdk-codepipeline-dockerfile-linter-action

Build Status typescript python

CodePipeline action to lint dockerfiles with hadolint

Install

TypeScript/JavaScript:

npm i @cloudcomponents/cdk-codepipeline-dockerfile-linter-action

Python:

pip install cloudcomponents.cdk-codepipeline-dockerfile-linter-action

How to use

# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
from aws_cdk.core import Construct, Stack, StackProps
from aws_cdk.aws_codecommit import Repository
from aws_cdk.aws_codepipeline import Pipeline, Artifact
from aws_cdk.aws_codepipeline_actions import CodeCommitSourceAction
from cloudcomponents.cdk_codepipeline_dockerfile_linter_action import CodePipelineDockerfileLinterAction
from cloudcomponents.cdk_codepipeline_anchore_inline_scan_action import CodePipelineAnchoreInlineScanAction
class ContainerAuditStack(Stack):
    def __init__(self, scope, id, *, description=None, env=None, stackName=None, tags=None, synthesizer=None, terminationProtection=None):
        super().__init__(scope, id, description=description, env=env, stackName=stackName, tags=tags, synthesizer=synthesizer, terminationProtection=terminationProtection)

        repository = Repository(self, "Repository",
            repository_name="container-audit-repository"
        )

        source_artifact = Artifact()

        source_action = CodeCommitSourceAction(
            action_name="CodeCommit",
            repository=repository,
            output=source_artifact,
            branch="master"
        )

        linter_action = CodePipelineDockerfileLinterAction(
            action_name="Linter",
            input=source_artifact
        )

        vuln_scan_action = CodePipelineAnchoreInlineScanAction(
            action_name="VulnScan",
            input=source_artifact
        )

        Pipeline(self, "Pipeline",
            pipeline_name="container-audit-pipeline",
            stages=[StageProps(
                stage_name="Source",
                actions=[source_action]
            ), StageProps(
                stage_name="Audit",
                actions=[linter_action, vuln_scan_action]
            )
            ]
        )

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

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file cloudcomponents.cdk-codepipeline-dockerfile-linter-action-1.0.14.tar.gz.

File metadata

File hashes

Hashes for cloudcomponents.cdk-codepipeline-dockerfile-linter-action-1.0.14.tar.gz
Algorithm Hash digest
SHA256 8aa384a6ef453ec3522a6d7d73e292c7a265a0c8bad1e412ce1d0a41d9fe0aed
MD5 6d75014edce1b7f5de57bbca412b63ec
BLAKE2b-256 6cafcb4fc1d5f72ec9d4ebee63a8d75b9d102d5cba316178f6515f0d7e1d5a16

See more details on using hashes here.

File details

Details for the file cloudcomponents.cdk_codepipeline_dockerfile_linter_action-1.0.14-py3-none-any.whl.

File metadata

File hashes

Hashes for cloudcomponents.cdk_codepipeline_dockerfile_linter_action-1.0.14-py3-none-any.whl
Algorithm Hash digest
SHA256 71188669475ad1a47d4c411deef4a2c78051d6e8fda2606ebb68445afdcb112f
MD5 8bdc29656d91d599e7c35d90c5de36d1
BLAKE2b-256 5f8e5ea49e50bbdccb27f8e4391380972006503453234abe4d5e2a9137a01377

See more details on using hashes here.

Supported by

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