Skip to content

Update workflow.yml #20

Update workflow.yml

Update workflow.yml #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
environment: POLARIS_SERVERURL
env:
BRIDGE_POLARIS_SERVERURL: ${{ vars.POLARIS_SERVERURL }}
# BRIDGE_POLARIS_ACCESSTOKEN: ${{ secrets.POLARIS_ACCESSTOKEN }}
BRIDGE_POLARIS_ACCESSTOKEN: 'rvb1uibn0h59d9e6tnba154883488j3qpls4n3dksmvmeoqbphvme53c42lgra1c0a2fh9k0so7ds'
BRIDGE_POLARIS_ASSESSMENT_TYPES: 'SAST'
BRIDGE_POLARIS_APPLICATION_NAME: havnoor-${{ 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 }}
PR_NUMBER: ${{ github.event.number }}
steps:
- name: Checkout Source
uses: actions/checkout@v4
#- name: Polaris Full Scan
# if: ${{ github.event_name != 'pull_request' }}
# run: |
# curl -fLsS -o bridge.zip https://sig-repo.synopsys.com/artifactory/bds-integrations-release/com/synopsys/integration/synopsys-bridge/latest/synopsys-bridge-linux64.zip && unzip -qo -d ${{ runner.temp }} bridge.zip && rm -f bridge.zip
# ${{ runner.temp }}/synopsys-bridge --stage polaris \
# polaris.reports.sarif.create='true'

Check failure on line 32 in .github/workflows/polaris-bridge-cli.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/polaris-bridge-cli.yml

Invalid workflow file

You have an error in your yaml syntax on line 32
- name: Polaris PR Scan
uses: synopsys-sig/[email protected]
# if: ${{ github.event_name == 'pull_request' }}
# run: |
#echo ${{ github.event.base_ref }}
#echo ${{ github.repository_owner }}
#echo ${{ github.event.repository.name }}
#echo ${{ github.ref_name }}
#echo ${{ github.event.number }}
#curl -fLsS -o bridge.zip https://sig-repo.synopsys.com/artifactory/bds-integrations-release/com/synopsys/integration/synopsys-bridge/latest/synopsys-bridge-linux64.zip && unzip -qo -d ${{ runner.temp }} bridge.zip && rm -f bridge.zip
#${{ runner.temp }}/synopsys-bridge --stage polaris \
# polaris.prcomment.enabled='true' \
# polaris.serverUrl='https://poc.polaris.synopsys.com/' \
# github.repository.owner.name=${{ github.repository_owner }} \
# github.repository.name=${{ github.event.repository.name }} \
# github.repository.branch.name=${{ github.ref_name }} \
# github.repository.pull.number=$PR_NUMBER
with:
polaris_server_url: 'https://poc.polaris.synopsys.com/'
polaris_access_token: 'rvb1uibn0h59d9e6tnba154883488j3qpls4n3dksmvmeoqbphvme53c42lgra1c0a2fh9k0so7ds'
polaris_assessment_types: 'SAST'
polaris_application_name: ${{ github.event.repository.name }}
polaris_project_name: ${{ github.event.repository.name }}
polaris_prComment_enabled: true
github_token: ${{ secrets.GITHUB_TOKEN }}
# - name: Save Logs
# if: always()
# uses: actions/upload-artifact@v4
# with:
# name: bridge-logs
# path: ${{ github.workspace }}/.bridge