-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yaml
33 lines (30 loc) · 1011 Bytes
/
action.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: 'Log4shell Container Patch'
author: '@mgreau'
description: 'Scan and patch against Log4shell, then publish a container image - no rebuild.'
branding:
icon: shield
color: blue
inputs:
image:
description: 'Public image to scan and patch'
required: true
default: 'mgreau/log4shell-cpatch-demo:1.0'
runs:
using: "composite"
steps:
- shell: bash
name: Log4shell - Scan and Patch container image
run: |
# Install the Tasks and Pipeline
kubectl apply -f ${{ github.action_path }}/tekton/log4shell-cpatch.yaml
# Scan the image and patch it if nedded
# Push the patched image to ttl.sh
tkn pipeline start log4shell-cpatch \
--param image=${{ inputs.image }} \
--workspace name=storage,volumeClaimTemplateFile=${{ github.action_path }}/tekton/pvc.yaml --showlog
- shell: bash
name: Result
run: |
PR=$(tkn pipelinerun list -o name --limit 1)
PR_NAME=$(echo "${PR#*/}")
tkn pipelinerun describe ${PR_NAME}