Skip to content
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

Create codeql.yml #42

Merged
merged 22 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# A CodeQL query for the S7-1500 WebserverApi Client library project
name: "CodeQL"

on:
push:
branches: [ master, main, release/* ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master, main ]
paths:
- '**.cs'
schedule:
- cron: '40 7 * * 4'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
analyze:
name: Analyze
runs-on: windows-2022

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@v4
with:
fetch-depth: 0

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
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

- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'

# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild.exe
uses: microsoft/[email protected]


- name: Restore Packages
run: |
nuget restore "WebserverApi.sln"
- name: Build Solution
run: |
msbuild.exe "WebserverAPI.sln" /p:configuration="Release" /p:UseSharedCompilation=false

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,4 +285,4 @@ See Also:
## SIMATIC S7-1200:
- SIMATIC S7-1200: https://new.siemens.com/global/en/products/automation/systems/industrial/plc/s7-1200.html
- SIMATIC S7-1200 Manual: https://support.industry.siemens.com/cs/ch/en/view/109797241
- SIMATIC S7-1200 Manual: https://support.industry.siemens.com/cs/us/en/view/91696622/45063671307
- SIMATIC S7-1200 Manual: https://support.industry.siemens.com/cs/us/en/view/91696622/45063671307
4 changes: 4 additions & 0 deletions scripts/buildscript.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#$currentFolder = $MyInvocation.MyCommand.Path | Split-Path -Parent;
#$currentFolder = (Get-Location).Path
#echo $currentFolder
dotnet build ../src/Webserver.API/Webserver.API.csproj
1 change: 1 addition & 0 deletions scripts/buildscript.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dotnet build ../src/Webserver.API/Webserver.API.csproj