CodePipeline action to lint dockerfiles with hadolint
Project description
@cloudcomponents/cdk-codepipeline-dockerfile-linter-action
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
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
File details
Details for the file cloudcomponents.cdk-codepipeline-dockerfile-linter-action-2.3.0.tar.gz
.
File metadata
- Download URL: cloudcomponents.cdk-codepipeline-dockerfile-linter-action-2.3.0.tar.gz
- Upload date:
- Size: 74.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f3651f6147d23e9636be72a18206dadfde1e049bfa496fa84584308db1ee00a |
|
MD5 | ada8779b485ad9d490c2fdae4a7e14c7 |
|
BLAKE2b-256 | 9ce74baacdb0d13b6c806798a41645d33141c4e4597c30a0107597025a1c35a7 |
File details
Details for the file cloudcomponents.cdk_codepipeline_dockerfile_linter_action-2.3.0-py3-none-any.whl
.
File metadata
- Download URL: cloudcomponents.cdk_codepipeline_dockerfile_linter_action-2.3.0-py3-none-any.whl
- Upload date:
- Size: 73.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c8136ec90f2e6cc20bfdbbd4caf933543bc90e576ae3443d2559865bf161ef4 |
|
MD5 | 44fb64298ec490859f8e4ec60b4eda9d |
|
BLAKE2b-256 | ddcc43147b056d528ff683fc9c5fe408a0d4a7df03211a655bd35a2d7b0b467a |