security-code-scan / security-code-scan-results-action

GitHub Action to integrate https://github.com/security-code-scan/security-code-scan into CI/CD process.
9 stars 11 forks source link

"You cannot call a method on a null-valued expression." on "Set up projects for analysis" #1

Closed paulomorgado closed 3 years ago

paulomorgado commented 3 years ago

I'm getting this error on "Set up projects for analysis"

InvalidOperation: D:\a\_temp\238bcc4a-d7dd-49be-9a75-f51f8f0d60ab.ps1:94
Line |
  94 |    $propertyGroups[0].AppendChild($errorLog)
     |    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | You cannot call a method on a null-valued expression.

Error: Process completed with exit code 1.

Repo is this: https://github.com/paulomorgado/Microsoft.Extensions.AspNet

securitycodescan-analysis.yml file:

# This workflow integrates SecurityCodeScan with GitHub's Code Scanning feature
# SecurityCodeScan is a vulnerability patterns detector for C# and VB.NET

name: SecurityCodeScan

on:
  push:
    branches: [ main ]
  pull_request:
    # The branches below must be a subset of the branches above
    branches: [ main ]
  schedule:
    - cron: '31 23 * * 6'

jobs:
  SCS:
    runs-on: windows-latest
    steps:
      - uses: actions/checkout@v2
      - uses: nuget/setup-nuget@v1.0.5
      - uses: microsoft/setup-msbuild@v1.0.2

      - name: Set up projects for analysis
        uses: security-code-scan/security-code-scan-add-action@main

      - name: Restore dependencies  
        run: dotnet restore

      - name: Build
        run: dotnet build --no-restore

      - name: Convert sarif for uploading to GitHub
        uses: security-code-scan/security-code-scan-results-action@main

      - name: Upload sarif
        uses: github/codeql-action/upload-sarif@v1

How can I diagnose this?

paulomorgado commented 3 years ago

Wrong repo!

Replaced by https://github.com/security-code-scan/security-code-scan-add-action/issues/1