Skip to content
This repository was archived by the owner on Nov 10, 2019. It is now read-only.

Commit 896b40e

Browse files
author
Anton Weiss
committed
refactor paclair plugin
1 parent dbf8269 commit 896b40e

File tree

3 files changed

+73
-0
lines changed

3 files changed

+73
-0
lines changed
File renamed without changes.

plugins/paclair/example.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
version: '1.0'
2+
steps:
3+
BuildingDockerImage:
4+
title: Building Docker Image
5+
type: build
6+
image_name: codefresh/demochat # Replace with your Docker image name
7+
working_directory: ./
8+
dockerfile: Dockerfile
9+
tag: '${{CF_BRANCH_TAG_NORMALIZED}}'
10+
CheckClair:
11+
image: codefresh/cfstep-paclair:3.1.0
12+
environment:
13+
- IMAGE=${{BuildingDockerImage}}
14+
- TAG=${{CF_BRANCH_TAG_NORMALIZED}}
15+
on_success:
16+
metadata:
17+
set:
18+
- ${{BuildingDockerImage.imageId}}:
19+
- SECURITY_SCAN: true
20+
on_fail:
21+
metadata:
22+
set:
23+
- ${{BuildingDockerImage.imageId}}:
24+
- SECURITY_SCAN: false
25+
ArchiveReport:
26+
image: mesosphere/aws-cli
27+
commands:
28+
- aws s3 cp ./reports/${{BuildingDockerImage}}-${{CF_BRANCH_TAG_NORMALIZED}}.html s3://${{S3_BUCKETNAME}}/${{CF_BUILD_ID}}/${{BuildingDockerImage}}-${{CF_BRANCH_TAG_NORMALIZED}}.html
29+
on_success:
30+
metadata:
31+
set:
32+
- ${{BuildingDockerImage.imageId}}:
33+
- CLAIR_REPORT: "https://s3.amazonaws.com/${{S3_BUCKETNAME}}/${{CF_BUILD_ID}}/${{BuildingDockerImage}}-${{CF_BRANCH_TAG_NORMALIZED}}.html"

plugins/paclair/plugin.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
title: paclair
2+
image: codefresh/cfstep-paclair
3+
category:
4+
- Security
5+
version: 0.1.0
6+
description: "Scan docker images with Clair - https://github.com/coreos/clair"
7+
keywords:
8+
- docker
9+
- clair
10+
- security
11+
source: https://github.com/codefresh-contrib/cfstep-paclair
12+
maintainers:
13+
- name: Dustin Van Buskirk
14+
email: dustinb@codefresh.io
15+
logo: https://cloud.githubusercontent.com/assets/343539/21630811/c5081e5c-d202-11e6-92eb-919d5999c77a.png
16+
envs:
17+
- name: API_PREFIX
18+
description: "Prefix for API to Docker Registry"
19+
- name: CLAIR_URL
20+
description: https://clair.domain.com:6060
21+
- name: IMAGE
22+
description: "Docker Image Name"
23+
- name: PROTOCOL
24+
description: "Docker Registry Protocol"
25+
- name: REGISTRY
26+
description: "For ECR use `ecr` else use domain name for Docker Registry"
27+
- name: REGISTRY_PASSWORD
28+
description: Docker Registry Password
29+
- name: REGISTRY_USERNAME
30+
description: Docker Registry Username
31+
- name: SEVERITY_THRESHOLD
32+
description: "critical, high, medium, low, negligible, unknown"
33+
- name: TOKEN
34+
description: "Docker Registry Auth Token"
35+
- name: TOKEN_TYPE
36+
description: "Docker Registry Auth Token Type"
37+
- name: TOKEN_URL
38+
description: "Docker Registry Auth Token URL"
39+
- name: TAG
40+
description: "Docker Image Tag"

0 commit comments

Comments
 (0)