.github/workflows/security.yml
{
name: Security,
on:
{
push: { branches: [main, releases/**] },
pull_request: { branches: [main] },
schedule: [{ cron: '0 11 * * 2' }],
},
jobs:
{
ossar:
{
name: OSSAR Scan,
runs-on: windows-latest,
steps:
[
{ uses: actions/checkout@v2, with: { fetch-depth: 2 } },
{
run: git checkout HEAD^2,
if: "${{ github.event_name == 'pull_request' }}",
},
{ uses: github/ossar-action@v1, id: ossar },
{
uses: github/codeql-action/upload-sarif@v1,
with: { sarif_file: '${{ steps.ossar.outputs.sarifFile }}' },
},
],
},
},
}