Skip to content

Changes related to compliance scan for Mend #29

Changes related to compliance scan for Mend

Changes related to compliance scan for Mend #29

Workflow file for this run

name: Mend
on:
push:
branches:
- main
paths-ignore:
- site/**
- examples/**
workflow_dispatch:
inputs:
branch:
type: string
required: true
default: main
workflow_call:
secrets:
WS_APIKEY_NGINX:
required: true
inputs:
product_name:
type: string
required: true
project_name:
required: true
type: string
concurrency:
group: ${{ github.ref_name }}-mend
cancel-in-progress: true
permissions:
contents: read
jobs:
scan:
name: Mend
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
# with:
# ref: ${{ inputs.branch && inputs.branch || github.ref }}
- name: Download agent
run: curl -fsSLJO https://github.com/whitesource/unified-agent-distribution/releases/latest/download/wss-unified-agent.jar
- name: Verify JAR
run: jarsigner -verify wss-unified-agent.jar
- name: Scan and upload
env:
WS_URL: "https://f5.whitesourcesoftware.com/agent"
WS_APIKEY_NGINX: ${{ inputs.WS_APIKEY_NGINX }}
PRODUCT_NAME: ${{ inputs.product_name}}
PROJECT_NAME: ${{ inputs.project_name}}
run: |
if [ -z "$WS_APIKEY_NGINX" ]; then
echo "Secret is empty"
exit 1
else
echo "Secret is available"
fi
java -jar wss-unified-agent.jar -noConfig true -wss.url $WS_URL -apiKey $WS_APIKEY_NGINX -product $PRODUCT_NAME -project $PROJECT_NAME -d ./
exit_code=$?
echo -e "\nEXIT CODE is - $exit_code\n"
exit 1
# file=$(find . -type f -regex ".*/$WS_PROJECT.*scan_report\.json" | head -n 1)
# echo -e "\nFound Mend scan log file - $file\n"
# exit_code=$?