33 lines
1018 B
YAML

apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: phpsecuritycheck
spec:
description: Check PHP security issues
workspaces:
- name: source
steps:
- name: exec
image: alpine:latest
script: |
#!/bin/sh
#set -e
echo ""
echo "== INSTALL PHP-SECURITY-CHECKER =========================="
export PHP_SECURITY_CHECKER_VERSION=1.0.0
export ARG JQ_VERSION=1.6
wget -O /usr/local/bin/local-php-security-checker https://github.com/fabpot/local-php-security-checker/releases/download/v${PHP_SECURITY_CHECKER_VERSION}/local-php-security-checker_${PHP_SECURITY_CHECKER_VERSION}_linux_amd64 \
&& chmod +x /usr/local/bin/local-php-security-checker
echo ""
echo "== RUN PHP-SECURITY-CHECKER =============================="
cd $(workspaces.source.path)
local-php-security-checker --format=markdown > temp_phpsecuritychecker.txt 2>&1
RESULT=$(cat temp_phpsecuritychecker.txt)
echo "${RESULT}"
echo ""
echo ""