Skip to content

Commit b4c0179

Browse files
authored
Create ossar-analysis.yml
1 parent 1a6fb9b commit b4c0179

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/ossar-analysis.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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+
# Ensure a compatible version of dotnet is installed.
31+
# The [Microsoft Security Code Analysis CLI](https://aka.ms/mscadocs) is built with dotnet v3.1.201.
32+
# A version greater than or equal to v3.1.201 of dotnet must be installed on the agent in order to run this action.
33+
# GitHub hosted runners already have a compatible version of dotnet installed and this step may be skipped.
34+
# For self-hosted runners, ensure dotnet version 3.1.201 or later is installed by including this action:
35+
# - name: Install .NET
36+
# uses: actions/setup-dotnet@v1
37+
# with:
38+
# dotnet-version: '3.1.x'
39+
40+
# Run open source static analysis tools
41+
- name: Run OSSAR
42+
uses: github/ossar-action@v1
43+
id: ossar
44+
45+
# Upload results to the Security tab
46+
- name: Upload OSSAR results
47+
uses: github/codeql-action/upload-sarif@v1
48+
with:
49+
sarif_file: ${{ steps.ossar.outputs.sarifFile }}

0 commit comments

Comments
 (0)