Archisman Karmakar commited on
Commit
0b19c18
·
unverified ·
1 Parent(s): 3bc6b36

Update ossar.yml

Browse files
Files changed (1) hide show
  1. .github/workflows/ossar.yml +26 -34
.github/workflows/ossar.yml CHANGED
@@ -12,7 +12,6 @@ on:
12
  push:
13
  branches: [ "main" ]
14
  pull_request:
15
- # The branches below must be a subset of the branches above
16
  branches: [ "main" ]
17
  schedule:
18
  - cron: '0 0 * * *'
@@ -22,48 +21,41 @@ permissions:
22
 
23
  jobs:
24
  OSSAR-Scan:
25
- # OSSAR runs on windows-latest.
26
- # ubuntu-latest and macos-latest support coming soon
27
  permissions:
28
- contents: read # for actions/checkout to fetch code
29
- security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
30
- actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
31
  runs-on: windows-latest
32
 
33
  steps:
 
 
34
 
35
- - name: Enable long paths in Git
36
- run: git config --system core.longpaths true
 
 
 
37
 
38
- - name: Checkout repository
39
- uses: actions/checkout@v4
40
- with:
41
- clean: true
42
- fetch-depth: 1 # Fetch only the latest commit
43
-
44
- # Ensure a compatible version of dotnet is installed.
45
- # The [Microsoft Security Code Analysis CLI](https://aka.ms/mscadocs) is built with dotnet v3.1.201.
46
- # A version greater than or equal to v3.1.201 of dotnet must be installed on the agent in order to run this action.
47
- # GitHub hosted runners already have a compatible version of dotnet installed and this step may be skipped.
48
- # For self-hosted runners, ensure dotnet version 3.1.201 or later is installed by including this action:
49
- # - name: Install .NET
50
- # uses: actions/setup-dotnet@v4
51
- # with:
52
- # dotnet-version: '3.1.x'
53
 
54
  # Run open source static analysis tools
55
- - name: Run OSSAR
56
- uses: github/ossar-action@v1
57
- id: ossar
58
 
59
  # Upload results to the Security tab
60
- - name: Upload OSSAR results
61
- uses: github/codeql-action/upload-sarif@v3
62
- with:
63
- sarif_file: ${{ steps.ossar.outputs.sarifFile }}
64
 
 
 
 
 
65
 
66
- # Added this to protect failed checks
67
- - name: Fail on findings
68
- if: steps.ossar.outputs.exit_code != '0'
69
- run: exit 1
 
12
  push:
13
  branches: [ "main" ]
14
  pull_request:
 
15
  branches: [ "main" ]
16
  schedule:
17
  - cron: '0 0 * * *'
 
21
 
22
  jobs:
23
  OSSAR-Scan:
 
 
24
  permissions:
25
+ contents: read # for actions/checkout to fetch code
26
+ security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
27
+ actions: read # required for a private repository by github/codeql-action/upload-sarif
28
  runs-on: windows-latest
29
 
30
  steps:
31
+ - name: Enable long paths in Git
32
+ run: git config --system core.longpaths true
33
 
34
+ - name: Checkout repository
35
+ uses: actions/checkout@v4
36
+ with:
37
+ clean: true
38
+ fetch-depth: 1 # Fetch only the latest commit
39
 
40
+ # Uncomment the next step if you are using a self-hosted runner that does not have a compatible .NET version installed.
41
+ # - name: Install .NET
42
+ # uses: actions/setup-dotnet@v4
43
+ # with:
44
+ # dotnet-version: '3.1.x'
 
 
 
 
 
 
 
 
 
 
45
 
46
  # Run open source static analysis tools
47
+ - name: Run OSSAR
48
+ uses: github/ossar-action@v1
49
+ id: ossar
50
 
51
  # Upload results to the Security tab
52
+ - name: Upload OSSAR results
53
+ uses: github/codeql-action/upload-sarif@v3
54
+ with:
55
+ sarif_file: ${{ steps.ossar.outputs.sarifFile }}
56
 
57
+ # Added this to protect failed checks
58
+ - name: Fail on findings
59
+ if: steps.ossar.outputs.exit_code != '0'
60
+ run: exit 1
61