- 
                Notifications
    
You must be signed in to change notification settings  - Fork 29
 
Test PR for dotnet-analyzers-action #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 33 commits
faf588d
              1437956
              6440106
              d31074a
              e586115
              c172fe7
              e8c2e5b
              729f84a
              eaaa72f
              7c1e8c4
              17ffd85
              ae05100
              e2e7a99
              8e809b3
              b4f4180
              f79a17b
              3d903e8
              abb3b28
              6ccf8b3
              f18384b
              5b5d04d
              98647a5
              b7cc458
              4f3b742
              8519309
              c2e5731
              acf4b2b
              a5b8536
              aae06f9
              3bce568
              034fca2
              d43114b
              8dfd6b5
              540902a
              9cf7b9f
              File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,38 +1,39 @@ | ||
| # sample-workflow-windows-latest | ||
| # docs are in the repo | ||
| 
     | 
||
| name: OSSAR on-push-verification windows-latest | ||
| name: .NET Analyzers on-push-verification windows-latest | ||
| on: push | ||
| 
     | 
||
| jobs: | ||
| sample: | ||
| name: Open Source Static Analysis Runner | ||
| name: .NET Analyzers runner | ||
| 
     | 
||
| # OSSAR runs on windows-latest. | ||
| # .NET Analyzers runs on windows-latest. | ||
| # ubuntu-latest and macos-latest supporting coming soon | ||
| runs-on: windows-latest | ||
| 
     | 
||
| # default working directory to the current directory | ||
| defaults: | ||
| run: | ||
| working-directory: . | ||
| 
     | 
||
                
      
                  mavasani marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
         | 
||
| steps: | ||
| 
     | 
||
| # Checkout your code repository to scan | ||
| - uses: actions/checkout@v2 | ||
| 
     | 
||
| # Ensure a compatible version of dotnet is installed. | ||
| # The [Microsoft Security Code Analysis CLI](https://aka.ms/mscadocs) is built with dotnet v3.1.201. | ||
| # The [Microsoft Code Analysis CLI](https://aka.ms/mscadocs) is built with dotnet v3.1.201. | ||
| # A version greater than or equal to v3.1.201 of dotnet must be installed on the agent in order to run this action. | ||
| # Remote agents already have a compatible version of dotnet installed and this step may be skipped. | ||
| # For local agents, ensure dotnet version 3.1.201 or later is installed by including this action: | ||
| # - uses: actions/setup-dotnet@v1 | ||
| # with: | ||
| # dotnet-version: '3.1.x' | ||
| 
     | 
||
| # Run open source static analysis tools | ||
| - name: Run OSSAR | ||
| # Run .NET Analyzers | ||
| - name: Run .NET Analyzers | ||
| uses: ./ | ||
| id: ossar | ||
| 
     | 
||
| # Upload results to the Security tab | ||
| 
         There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure if we want to upload results from .NET analyzers run to security tab or not, as the analyzers are not restricted to just security analyzers. Will have to talk with @mikadumont to decide There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. GitHub would prefer if only security results were in the tab, as noise will make people not pay attention to critical issues. Should likely remove this for now. There may be a way to selectively export security-only rules with Guardian and a policy, although I am unfamiliar if we have that capability now.  | 
||
| - name: Upload results to Security tab | ||
| uses: github/codeql-action/upload-sarif@v1 | ||
| id: dotnet-analyzers | ||
| with: | ||
| sarif_file: ${{ steps.ossar.outputs.sarifFile }} | ||
| projects: samples\ClassLibrary1.sln | ||
                
      
                  mavasani marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
         | 
||
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,17 +1,17 @@ | ||
| # sample-workflow-windows-latest | ||
| # docs are in the repo | ||
| 
     | 
||
| name: OSSAR windows-latest | ||
| name: .NET Analyzers windows-latest | ||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| - main | ||
| 
     | 
||
| jobs: | ||
| sample: | ||
| name: Open Source Static Analysis Runner | ||
| name: .NET Analyzers runner | ||
| 
     | 
||
| # OSSAR runs on windows-latest. | ||
| # .NET Analyzers runs on windows-latest. | ||
| # ubuntu-latest and macos-latest supporting coming soon | ||
| runs-on: windows-latest | ||
| 
     | 
||
| 
        
          
        
         | 
    @@ -21,21 +21,15 @@ jobs: | |
| - uses: actions/checkout@v2 | ||
| 
     | 
||
| # Ensure a compatible version of dotnet is installed. | ||
| # The [Microsoft Security Code Analysis CLI](https://aka.ms/mscadocs) is built with dotnet v3.1.201. | ||
| # The [Microsoft Code Analysis CLI](https://aka.ms/mscadocs) is built with dotnet v3.1.201. | ||
| # A version greater than or equal to v3.1.201 of dotnet must be installed on the agent in order to run this action. | ||
| # GitHub hosted runners already have a compatible version of dotnet installed and this step may be skipped. | ||
| # For self-hosted runners, ensure dotnet version 3.1.201 or later is installed by including this action: | ||
| # - uses: actions/setup-dotnet@v1 | ||
| # with: | ||
| # dotnet-version: '3.1.x' | ||
| 
     | 
||
| # Run open source static analysis tools | ||
| - name: Run OSSAR | ||
| uses: github/ossar-action@v1 | ||
| id: ossar | ||
| 
     | 
||
| # Upload results to the Security tab | ||
| - name: Upload results to Security tab | ||
| uses: github/codeql-action/upload-sarif@v1 | ||
| with: | ||
| sarif_file: ${{ steps.ossar.outputs.sarifFile }} | ||
| # Run .NET Analyzers | ||
| - name: Run .NET Analyzers | ||
| uses: github/dotnet-analyzers-action@v1 | ||
| 
         There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will likely be the new repo URL, but have to confirm with @mikadumont There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldnt it be called code-analysis? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep, I will fix it up in the cloned repo.  | 
||
| id: dotnet-analyzers | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,17 +1,61 @@ | ||
| name: 'ossar-action' | ||
| description: 'Run open source security static analysis tools without the added complexity with OSSAR (Open Source Static Analysis Runner)' | ||
| name: 'dotnet-analyzers-action' | ||
| description: 'Run .NET code quality and code style analyzers shipping with .NET SDK' | ||
| author: 'GitHub' | ||
| branding: | ||
| icon: 'shield' | ||
| color: 'black' | ||
| inputs: | ||
| config: | ||
| description: A file path to a .gdnconfig file. | ||
| policy: | ||
| description: The name of the well known policy to use. If empty, defaults to the policy/github.gdnpolicy file in the action repo. | ||
| projects: | ||
| description: 'Semi-colon separated list of projects or solutions to analyze' | ||
| required: true | ||
| analysis-level: # AnalysisLevel: https://docs.microsoft.com/dotnet/core/project-sdk/msbuild-props#analysislevel | ||
| description: 'Default analysis level for all rules' | ||
| required: false | ||
| default: 'latest-minimum' | ||
| style: # AnalysisLevelStyle: https://docs.microsoft.com/dotnet/core/project-sdk/msbuild-props#analysislevel | ||
| description: 'Overridden analysis level for code style rules: https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/' | ||
| required: false | ||
| default: 'latest-minimum' | ||
| design: # AnalysisLevelDesign: https://docs.microsoft.com/dotnet/core/project-sdk/msbuild-props#analysislevel | ||
| description: 'Overridden analysis level for sesign rules: https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/design-warnings' | ||
| required: false | ||
| default: 'latest-minimum' | ||
| documentation: # AnalysisLevelDocumentation: https://docs.microsoft.com/dotnet/core/project-sdk/msbuild-props#analysislevel | ||
| description: 'Overridden analysis level for documentation rules: https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/documentation-warnings' | ||
| required: false | ||
| default: 'latest-minimum' | ||
| globalization: # AnalysisLevelGlobalization: https://docs.microsoft.com/dotnet/core/project-sdk/msbuild-props#analysislevel | ||
| description: 'Overridden analysis level for globalization rules: https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/globalization-warnings' | ||
| required: false | ||
| default: 'latest-minimum' | ||
| interoperability: # AnalysisLevelInteroperability: https://docs.microsoft.com/dotnet/core/project-sdk/msbuild-props#analysislevel | ||
| description: 'Overridden analysis level for portability and interoperability rules: https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/interoperability-warnings' | ||
| required: false | ||
| default: 'latest-minimum' | ||
| maintainability: # AnalysisLevelMaintainability: https://docs.microsoft.com/dotnet/core/project-sdk/msbuild-props#analysislevel | ||
| description: 'Overridden analysis level for maintainability rules: https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/maintainability-warnings' | ||
| required: false | ||
| default: 'latest-minimum' | ||
| naming: # AnalysisLevelNaming: https://docs.microsoft.com/dotnet/core/project-sdk/msbuild-props#analysislevel | ||
| description: 'Overridden analysis level for naming rules: https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/naming-warnings' | ||
| required: false | ||
| default: 'latest-minimum' | ||
| performance: # AnalysisLevelPerformance: https://docs.microsoft.com/dotnet/core/project-sdk/msbuild-props#analysislevel | ||
| description: 'Overridden analysis level for performance rules: https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/performance-warnings' | ||
| required: false | ||
| default: 'latest-minimum' | ||
| reliability: # AnalysisLevelReliability: https://docs.microsoft.com/dotnet/core/project-sdk/msbuild-props#analysislevel | ||
| description: 'Overridden analysis level for reliability rules: https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/reliability-warnings' | ||
| required: false | ||
| default: 'latest-minimum' | ||
| security: # AnalysisLevelSecurity: https://docs.microsoft.com/dotnet/core/project-sdk/msbuild-props#analysislevel | ||
| description: 'Overridden analysis level for security rules https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/security-warnings' | ||
| required: false | ||
| default: 'latest-minimum' | ||
| usage: # AnalysisLevelPerformance: https://docs.microsoft.com/dotnet/core/project-sdk/msbuild-props#analysislevel | ||
| description: 'Overridden analysis level for usage rules: https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/usage-warnings' | ||
| required: false | ||
| default: 'latest-minimum' | ||
| outputs: | ||
| sarifFile: | ||
| description: A file path to a SARIF results file. | ||
| description: A file path to a SARIF file with analysis results. | ||
| runs: | ||
| using: 'node12' | ||
| main: 'lib/action.js' | 
Uh oh!
There was an error while loading. Please reload this page.