From e2d9b3aea93e2323cf2f6641436e1f23159d6261 Mon Sep 17 00:00:00 2001 From: Jordan Wages Date: Wed, 14 Apr 2021 10:02:05 -0500 Subject: [PATCH 1/7] Create codeql-analysis.yml Creating this automated security scan. --- .github/workflows/codeql-analysis.yml | 67 +++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000..3c5be13 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,67 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ master ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ master ] + schedule: + - cron: '31 15 * * 5' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + language: [ 'csharp' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] + # Learn more: + # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v1 + + # â„šī¸ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # âœī¸ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 From 7bb60e61bfd1899bda34227a2848ed2b86ef8695 Mon Sep 17 00:00:00 2001 From: Jordan Wages Date: Wed, 14 Apr 2021 10:06:00 -0500 Subject: [PATCH 2/7] Update codeql-analysis.yml Removing the auto-build. Builds are checked locally before release anyway, so this should be fine. --- .github/workflows/codeql-analysis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 3c5be13..bab77ac 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -49,8 +49,8 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v1 + #- name: Autobuild + # uses: github/codeql-action/autobuild@v1 # â„šī¸ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl From 1c5a971bb5b713ae4ad9ae4571ab03618572b2b1 Mon Sep 17 00:00:00 2001 From: Jordan Wages Date: Wed, 14 Apr 2021 10:20:07 -0500 Subject: [PATCH 3/7] Update codeql-analysis.yml Trying to fix the build. --- .github/workflows/codeql-analysis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index bab77ac..26c3cac 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -51,6 +51,11 @@ jobs: # If this step fails, then you should remove it and run the build manually (see below) #- name: Autobuild # uses: github/codeql-action/autobuild@v1 + - uses: actions/checkout@main + - uses: actions/setup-dotnet@v1 + with: + dotnet-version: '4.7.x' # SDK Version to use; x will use the latest version of the 3.1 channel + - run: dotnet build butterflow-ui # â„šī¸ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl From b6bb2abe2599ac27b2330ffca25ddb123151e8b3 Mon Sep 17 00:00:00 2001 From: Jordan Wages Date: Wed, 14 Apr 2021 11:00:24 -0500 Subject: [PATCH 4/7] Update codeql-analysis.yml This testing thing is turning out to be more trouble than its worth. --- .github/workflows/codeql-analysis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 26c3cac..d1e85ae 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -51,11 +51,11 @@ jobs: # If this step fails, then you should remove it and run the build manually (see below) #- name: Autobuild # uses: github/codeql-action/autobuild@v1 - - uses: actions/checkout@main - - uses: actions/setup-dotnet@v1 + - name: Build with .Net 4.7 + uses: actions/setup-dotnet@v1 with: dotnet-version: '4.7.x' # SDK Version to use; x will use the latest version of the 3.1 channel - - run: dotnet build butterflow-ui + run: dotnet build butterflow-ui.csproj # â„šī¸ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl From e9fd6eff5889a0ce10f69ce549df7643db30341c Mon Sep 17 00:00:00 2001 From: Jordan Wages Date: Wed, 14 Apr 2021 11:02:16 -0500 Subject: [PATCH 5/7] Update codeql-analysis.yml Dude, c'mon. I should have created a different branch, but it's too late now. --- .github/workflows/codeql-analysis.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index d1e85ae..0159af4 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -51,11 +51,13 @@ jobs: # If this step fails, then you should remove it and run the build manually (see below) #- name: Autobuild # uses: github/codeql-action/autobuild@v1 - - name: Build with .Net 4.7 + - name: Setup .Net 4.7 uses: actions/setup-dotnet@v1 with: dotnet-version: '4.7.x' # SDK Version to use; x will use the latest version of the 3.1 channel - run: dotnet build butterflow-ui.csproj + + - name : Build + run: dotnet build butterflow-ui.csproj # â„šī¸ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl From e1abf6c6146d6e646e19a9096f850451ad536eef Mon Sep 17 00:00:00 2001 From: Jordan Wages Date: Wed, 14 Apr 2021 11:03:34 -0500 Subject: [PATCH 6/7] Update codeql-analysis.yml i dunno i might just remove this workflow... --- .github/workflows/codeql-analysis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 0159af4..656368c 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -51,10 +51,10 @@ jobs: # If this step fails, then you should remove it and run the build manually (see below) #- name: Autobuild # uses: github/codeql-action/autobuild@v1 - - name: Setup .Net 4.7 + - name: Setup .Net uses: actions/setup-dotnet@v1 with: - dotnet-version: '4.7.x' # SDK Version to use; x will use the latest version of the 3.1 channel + dotnet-version: '3.1.x' # SDK Version to use; x will use the latest version of the 3.1 channel - name : Build run: dotnet build butterflow-ui.csproj From 7d0607157f0bc31c21c7b8df363c39ae05af8faa Mon Sep 17 00:00:00 2001 From: Jordan Wages Date: Wed, 14 Apr 2021 11:04:55 -0500 Subject: [PATCH 7/7] Update codeql-analysis.yml i feel like i'm getting closer. --- .github/workflows/codeql-analysis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 656368c..a484e18 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -57,7 +57,7 @@ jobs: dotnet-version: '3.1.x' # SDK Version to use; x will use the latest version of the 3.1 channel - name : Build - run: dotnet build butterflow-ui.csproj + run: dotnet build butterflow-ui/butterflow-ui.csproj # â„šī¸ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl