Skip to content

fix path to Bridge CLI #20

fix path to Bridge CLI

fix path to Bridge CLI #20

# example workflow for Polaris scans using the Bridge CLI
name: polaris-bridge-cli
on:
push:
branches: [ main, master, develop, stage, release ]
pull_request:
branches: [ main, master, develop, stage, release ]
workflow_dispatch:
jobs:
polaris:
runs-on: ubuntu-latest
env:
BRIDGE_POLARIS_SERVERURL: ${{ vars.POLARIS_SERVERURL }}
BRIDGE_POLARIS_ACCESSTOKEN: ${{ secrets.POLARIS_ACCESSTOKEN }}
BRIDGE_POLARIS_ASSESSMENT_TYPES: 'SAST,SCA'
BRIDGE_POLARIS_APPLICATION_NAME: chuckaude-${{ github.event.repository.name }}
BRIDGE_POLARIS_PROJECT_NAME: ${{ github.event.repository.name }}
BRIDGE_POLARIS_BRANCH_NAME: ${{ github.event.ref_name }}
BRIDGE_GITHUB_USER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRIDGE_GITHUB_REPOSITORY_OWNER_NAME: ${{ github.repository_owner }}
BRIDGE_GITHUB_REPOSITORY_NAME: ${{ github.event.repository.name }}
BRIDGE_GITHUB_REPOSITORY_BRANCH_NAME: ${{ github.ref_name }}
# INCLUDE_DIAGNOSTICS: 'true'
steps:
- name: Checkout Source
uses: actions/checkout@v4
- name: Setup Java JDK
uses: actions/setup-java@v4
with:
java-version: 17
distribution: microsoft
cache: maven
- name: Polaris Full Scan
if: ${{ github.event_name != 'pull_request' }}
run: |
curl -fLsS -o bridge.zip ${{ vars.BRIDGECLI_LINUX64 }} && unzip -qo -d ${{ runner.temp }} bridge.zip && rm -f bridge.zip
${{ runner.temp }}/bridge-cli-bundle-linux64/bridge-cli --stage polaris \
polaris.reports.sarif.create='true'
- name: Polaris PR Scan
if: ${{ github.event_name == 'pull_request' }}
run: |
curl -fLsS -o bridge.zip ${{ vars.BRIDGECLI_LINUX64 }} && unzip -qo -d ${{ runner.temp }} bridge.zip && rm -f bridge.zip
${{ runner.temp }}/bridge-cli-bundle-linux64/bridge-cli --stage polaris \
polaris.prcomment.enabled='true' \
polaris.branch.parent.name=${{ github.event.base_ref }} \
github.repository.pull.number=${{ github.event.number }}
# - name: Save Logs
# if: always()
# uses: actions/upload-artifact@v4
# with:
# name: bridge-logs
# path: ${{ github.workspace }}/.bridge
# include-hidden-files: true