Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/test-action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Test Log4shell cpatch Action
on:
push:
branches: ['main']
pull_request:
branches: ['main']

jobs:
use-action:
Expand All @@ -15,18 +17,19 @@ jobs:
- uses: engineerd/setup-kind@v0.5.0
with:
version: "v0.11.1"
config: tekton/kind-config.yaml

- name: Install Tekton Pipelines
run: kubectl apply -f https://storage.googleapis.com/tekton-releases/pipeline/previous/v0.24.1/release.yaml

- uses: jerop/tkn@v0.1.0

- name: Test non-vulnerable image
uses: mgreau/log4shell-cpatch@main
uses: mgreau/log4shell-cpatch
with:
image: alpine

- name: Test vulnerable image
uses: mgreau/log4shell-cpatch@main
uses: mgreau/log4shell-cpatch
with:
image: mlinarik/log4j-log4shell-vulnerable-app:latest
5 changes: 5 additions & 0 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,8 @@ runs:
PR=$(tkn pipelinerun list -o name --limit 1)
PR_NAME=$(echo "${PR#*/}")
tkn pipelinerun describe ${PR_NAME}

- uses: actions/upload-artifact@v2
with:
name: my-artifact
path: /tmp/
7 changes: 7 additions & 0 deletions tekton/kind-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: kind.x-k8s.io/v1alpha4
kind: Cluster
nodes:
- role: control-plane
extraMounts:
- hostPath: /tmp/
containerPath: /ws/
15 changes: 15 additions & 0 deletions tekton/pvc.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: pv
spec:
storageClassName: standard
accessModes:
- ReadWriteOnce
capacity:
storage: 2Gi
hostPath:
path: /ws/
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pvc
spec:
volumeName: pv
accessModes:
- ReadWriteOnce
resources:
Expand Down