name: "unpm check"
description: "Verify vendored dependencies: SHA integrity and CVE scanning"
branding:
icon: "shield"
color: "green"
inputs:
allow-vulnerable:
description: "Allow known vulnerabilities (not recommended)"
required: false
default: "false"
version:
description: "unpm version to use"
required: false
default: "latest"
runs:
using: "composite"
steps:
- name: Install unpm
shell: bash
env:
VERSION: ${{ inputs.version }}
run: |
ARCH=$(uname -m)
case "$ARCH" in
x86_64) PLATFORM="linux-x86_64" ;;
aarch64) PLATFORM="linux-aarch64" ;;
*) echo "Unsupported architecture: $ARCH" && exit 1 ;;
esac
if [ "$VERSION" = "latest" ]; then
URL=$(curl -s https://api.github.com/repos/JamesGuthrie/unpm/releases/latest \
| grep browser_download_url \
| grep "unpm-${PLATFORM}" \
| cut -d '"' -f 4)
else
URL="https://github.com/JamesGuthrie/unpm/releases/download/v${VERSION}/unpm-${PLATFORM}"
fi
curl -sSL "$URL" -o /usr/local/bin/unpm
- name: Verify attestation
shell: bash
run: gh attestation verify /usr/local/bin/unpm --repo JamesGuthrie/unpm
- name: Make unpm executable
shell: bash
run: chmod +x /usr/local/bin/unpm
- name: Run unpm check
shell: bash
env:
ALLOW_VULNERABLE: ${{ inputs.allow-vulnerable }}
run: |
ARGS="check"
if [ "$ALLOW_VULNERABLE" = "true" ]; then
ARGS="$ARGS --allow-vulnerable"
fi
unpm $ARGS