GitHub Fixer for Polaris
Last updated
# Mobb/Polaris Fixer
# This workflow runs a Polaris SAST scan and sends the results to Mobb Fixer.
#
# Secrets in use (add your missing ones):
# POLARIS_ACCESS_TOKEN - your Polaris access token
# MOBB_API_TOKEN - your Mobb API token
#
# Variables in use:
# POLARIS_SERVER_URL - your Polaris server URL
name: "Mobb/Polaris Full Scan"
on:
workflow_dispatch:
push:
branches: [main, master, develop, stage, release]
jobs:
scan-and-fix:
name: Scan with Polaris and fix with Mobb
runs-on: ubuntu-latest
timeout-minutes: 360
permissions:
contents: read
pull-requests: write
statuses: write
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run Polaris SAST scan
uses: blackduck-inc/black-duck-security-scan@v2
with:
polaris_server_url: ${{ vars.POLARIS_SERVER_URL }}
polaris_access_token: ${{ secrets.POLARIS_ACCESS_TOKEN }}
polaris_assessment_types: "SAST"
polaris_application_name: ${{ github.event.repository.name }}
polaris_project_name: ${{ github.event.repository.name }}
polaris_reports_sarif_create: true
- name: Upload SARIF file
if: always()
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: .blackduck/integrations/polaris/sarif/report.sarif.json
category: polaris-sast
- name: Run Mobb on the findings and get fixes
if: always()
uses: mobb-dev/action@v1.1
with:
report-file: ".blackduck/integrations/polaris/sarif/report.sarif.json"
api-key: ${{ secrets.MOBB_API_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}