Skip to content

Commit 8541d5e

Browse files
authored
Create ossar-analysis.yml
1 parent 588b281 commit 8541d5e

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# This workflow integrates a collection of open source static analysis tools
2+
# with GitHub code scanning. For documentation, or to provide feedback, visit
3+
# https://github.com/github/ossar-action
4+
name: OSSAR
5+
6+
on:
7+
push:
8+
pull_request:
9+
10+
jobs:
11+
OSSAR-Scan:
12+
# OSSAR runs on windows-latest.
13+
# ubuntu-latest and macos-latest support coming soon
14+
runs-on: windows-latest
15+
16+
steps:
17+
# Checkout your code repository to scan
18+
- name: Checkout repository
19+
uses: actions/checkout@v2
20+
with:
21+
# We must fetch at least the immediate parents so that if this is
22+
# a pull request then we can checkout the head.
23+
fetch-depth: 2
24+
25+
# If this run was triggered by a pull request event, then checkout
26+
# the head of the pull request instead of the merge commit.
27+
- run: git checkout HEAD^2
28+
if: ${{ github.event_name == 'pull_request' }}
29+
30+
# Install dotnet, used by OSSAR
31+
- name: Install .NET
32+
uses: actions/setup-dotnet@v1
33+
with:
34+
dotnet-version: '3.1.201'
35+
36+
# Run open source static analysis tools
37+
- name: Run OSSAR
38+
uses: github/ossar-action@v1
39+
id: ossar
40+
41+
# Upload results to the Security tab
42+
- name: Upload OSSAR results
43+
uses: github/codeql-action/upload-sarif@v1
44+
with:
45+
sarif_file: ${{ steps.ossar.outputs.sarifFile }}

0 commit comments

Comments
 (0)