-
Notifications
You must be signed in to change notification settings - Fork 2
sync #701
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
sync #701
Changes from all commits
e8e04bf
379321b
cbb35b8
e95e178
7d17ce5
32812ac
9d53714
6f9677e
e0a873a
6b31ade
72b6bfb
f6479ba
83bf4f3
e0e5bfc
7061270
b5512e0
c781076
9786805
35a5a4d
e1affdf
1ee969c
bf22ec0
9d46f24
12252a4
8f77a03
8b5d85a
9edc992
7f6c935
33d9557
c588578
8e8be62
6ef2485
8dd828a
4a163c0
985fd3d
4a0c3ee
35f3510
becaa0b
c9dbd3b
503f5f9
b5b8bb9
85d1984
96abade
20933d2
36b68a7
5c05964
f5c1cd8
1511b5a
f44ee69
bb72fea
942bac1
f7801f0
cf700e4
5ffc0d7
e12466e
87bd1de
0e95f2d
5f40d10
32b7f9b
724d3a4
ff54708
c3b7fc5
b86e5b4
145ca6c
75d7b02
34218af
75f9eb6
940f294
cade552
8076ca2
bb14ef8
db1dc59
f1c0bb5
0ad1c88
10007f5
2383e8e
55c75b4
fbd70fe
5173851
156f54e
045b401
0746b5d
f992dc6
544a3c6
27fc5c9
59d9e09
af7bd3c
b5c29f8
bce2386
7f8912a
ab5b367
656b5cc
6ce3830
aa292be
0ea221d
2df4ba1
3596d15
947fc01
fd4fcb2
0ed26b4
cb094db
5dccebc
3791cfd
78ad485
d8c9bf9
107b536
9201870
576839f
56802ab
d5d305d
b100225
4e8bb28
953ecdd
3d00f5d
57e245b
f2e355e
0b6c832
6a21214
d2c6550
c18050c
ba43963
73c61ac
f3f6c85
b6b8523
713eec9
66fd967
d76a814
5d2fcd2
bff1a41
74ee8ec
3965aae
ff8a775
7893a59
597f803
ef39640
a9f6266
3802ecc
cc4288b
364a65b
9bf751f
b23d154
36409b5
712e94f
79bd4d0
f0c8810
e2ed108
7230aa2
297f1f3
d71ecb1
0c2fd45
1af772d
7de2fd3
cbd22a4
d2f0e9a
aaa4b75
6b663ad
0809eaa
abeb907
978dbab
5f7b80a
78eb7e3
de106a9
ce4cf15
c9dd849
decbe73
b254849
ad9aa1d
02492cb
ec7a2f7
c80d1aa
464fd7c
8a71063
477ff08
dc8a404
5b3f706
062642c
7b7db6b
7ce5126
5fa7b86
5ba4d61
484cb8e
66495ab
8fc68c9
41637bb
6196650
7667d66
e57647b
f363e09
ce1415f
f64c5cc
343834a
e89c7a1
8dca38b
afd1fc5
58086d4
c0c3ade
94dbd00
804b070
cbfcf0e
399a763
351f04c
86f995b
1bdec56
d20d4cb
0da9542
68da2a5
2bea44c
1196fac
ecefc5f
f90f245
610e36b
daf7479
357667f
85caffd
99e8568
0d0cfa9
6437cb8
6bac94c
0e4818d
0ae9589
d116b06
e614beb
35e694f
8997527
e5de4a3
fb2c376
1801dd2
c8ccff2
58d9519
8535f86
a470f99
8adbc2a
a9900df
d74d0ba
8b4e963
2c9c92d
e45f4f1
6df03fa
4459efa
4e0a758
e0db6ba
c1db1ac
a81e4d1
13e1d10
3ad828a
d8d4f22
ee05d9d
f50b3af
8c2b01e
9b1ab4e
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,115 +1,51 @@ | ||
| # This workflow uses actions that are not certified by GitHub. | ||
| # They are provided by a third-party and are governed by | ||
| # separate terms of service, privacy policy, and support | ||
| # documentation. | ||
|
|
||
| # This workflow will build, test, sign and package a WPF or Windows Forms desktop application | ||
| # built on .NET Core. | ||
| # To learn how to migrate your existing application to .NET Core, | ||
| # refer to https://docs.microsoft.com/en-us/dotnet/desktop-wpf/migration/convert-project-from-net-framework | ||
| # | ||
| # To configure this workflow: | ||
| # | ||
| # 1. Configure environment variables | ||
| # GitHub sets default environment variables for every workflow run. | ||
| # Replace the variables relative to your project in the "env" section below. | ||
| # | ||
| # 2. Signing | ||
| # Generate a signing certificate in the Windows Application | ||
| # Packaging Project or add an existing signing certificate to the project. | ||
| # Next, use PowerShell to encode the .pfx file using Base64 encoding | ||
| # by running the following Powershell script to generate the output string: | ||
| # | ||
| # $pfx_cert = Get-Content '.\SigningCertificate.pfx' -Encoding Byte | ||
| # [System.Convert]::ToBase64String($pfx_cert) | Out-File 'SigningCertificate_Encoded.txt' | ||
| # | ||
| # Open the output file, SigningCertificate_Encoded.txt, and copy the | ||
| # string inside. Then, add the string to the repo as a GitHub secret | ||
| # and name it "Base64_Encoded_Pfx." | ||
| # For more information on how to configure your signing certificate for | ||
| # this workflow, refer to https://github.com/microsoft/github-actions-for-desktop-apps#signing | ||
| # | ||
| # Finally, add the signing certificate password to the repo as a secret and name it "Pfx_Key". | ||
| # See "Build the Windows Application Packaging project" below to see how the secret is used. | ||
| # | ||
| # For more information on GitHub Actions, refer to https://github.com/features/actions | ||
| # For a complete CI/CD sample to get started with GitHub Action workflows for Desktop Applications, | ||
| # refer to https://github.com/microsoft/github-actions-for-desktop-apps | ||
|
|
||
| name: .NET Core Desktop | ||
| name: CSharpBible CI3 | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ "master" ] | ||
| paths: | ||
| - "CSharpBible/**" | ||
| pull_request: | ||
| branches: [ "master" ] | ||
| paths: | ||
| - "CSharpBible/**" | ||
|
|
||
| jobs: | ||
|
|
||
| build: | ||
|
|
||
| strategy: | ||
| matrix: | ||
| configuration: [Debug, Release] | ||
|
|
||
| runs-on: windows-latest # For a list of available runner types, refer to | ||
| # https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on | ||
|
|
||
| env: | ||
| Solution_Name: CSharpBible.sln # Replace with your solution name, i.e. MyWpfApp.sln. | ||
| Test_Project_Path: Tests\Test.csproj # Replace with the path to your test project, i.e. MyWpfApp.Tests\MyWpfApp.Tests.csproj. | ||
| Wap_Project_Directory: CSharpBible # Replace with the Wap project directory relative to the solution, i.e. MyWpfApp.Package. | ||
| Wap_Project_Path: CSharpBible # Replace with the path to your Wap project, i.e. MyWpf.App.Package\MyWpfApp.Package.wapproj. | ||
|
|
||
| build-test: | ||
| runs-on: windows-latest | ||
| defaults: | ||
| run: | ||
| working-directory: CSharpBible | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v3 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| # Install the .NET Core workload | ||
| - name: Install .NET Core | ||
| uses: actions/setup-dotnet@v3 | ||
| with: | ||
| dotnet-version: 6.0.x | ||
|
|
||
| # Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild | ||
| - name: Setup MSBuild.exe | ||
| uses: microsoft/setup-msbuild@v1.0.2 | ||
|
|
||
| # Execute all unit tests in the solution | ||
| - name: Execute unit tests | ||
| run: dotnet test | ||
|
|
||
| # Restore the application to populate the obj folder with RuntimeIdentifiers | ||
| - name: Restore the application | ||
| run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration | ||
| env: | ||
| Configuration: ${{ matrix.configuration }} | ||
|
|
||
| # Decode the base 64 encoded pfx and save the Signing_Certificate | ||
| - name: Decode the pfx | ||
| run: | | ||
| $pfx_cert_byte = [System.Convert]::FromBase64String("${{ secrets.Base64_Encoded_Pfx }}") | ||
| $certificatePath = Join-Path -Path $env:Wap_Project_Directory -ChildPath GitHubActionsWorkflow.pfx | ||
| [IO.File]::WriteAllBytes("$certificatePath", $pfx_cert_byte) | ||
|
|
||
| # Create the app package by building and packaging the Windows Application Packaging project | ||
| - name: Create the app package | ||
| run: msbuild $env:Wap_Project_Path /p:Configuration=$env:Configuration /p:UapAppxPackageBuildMode=$env:Appx_Package_Build_Mode /p:AppxBundle=$env:Appx_Bundle /p:PackageCertificateKeyFile=GitHubActionsWorkflow.pfx /p:PackageCertificatePassword=${{ secrets.Pfx_Key }} | ||
| env: | ||
| Appx_Bundle: Always | ||
| Appx_Bundle_Platforms: x86|x64 | ||
| Appx_Package_Build_Mode: StoreUpload | ||
| Configuration: ${{ matrix.configuration }} | ||
|
|
||
| # Remove the pfx | ||
| - name: Remove the pfx | ||
| run: Remove-Item -path $env:Wap_Project_Directory\GitHubActionsWorkflow.pfx | ||
|
|
||
| # Upload the MSIX package: https://github.com/marketplace/actions/upload-a-build-artifact | ||
| - name: Upload build artifacts | ||
| uses: actions/upload-artifact@v3 | ||
| with: | ||
| name: MSIX Package | ||
| path: ${{ env.Wap_Project_Directory }}\AppPackages | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup .NET 8.0 | ||
| uses: actions/setup-dotnet@v4 | ||
| with: | ||
| dotnet-version: "8.0.x" | ||
|
|
||
| - name: Remove private projects | ||
| run: | | ||
| dotnet sln CSharpBible.sln remove "Mobile/MauiApp1/MauiApp1.csproj" | ||
| dotnet sln CSharpBible.sln remove "Simulation/AGVFktTests/AGVFktTests.csproj" | ||
| dotnet sln CSharpBible.sln remove "Simulation/AGVFkt/AGVFkt.csproj" | ||
| dotnet sln CSharpBible.sln remove "DB/ADO_Test/ADO_Test.csproj" | ||
| dotnet sln CSharpBible.sln remove "Libraries/CSFreeVision_/CSFreeVision.csproj" | ||
| dotnet sln CSharpBible.sln remove "Mobile/DXMauiApp1/DXMauiApp1.csproj" | ||
| dotnet sln CSharpBible.sln remove "Web/MyComponent/Client/MyComponent.Client.csproj" | ||
| dotnet sln CSharpBible.sln remove "Web/MyComponent/Server/MyComponent.Server.csproj" | ||
| dotnet sln CSharpBible.sln remove "Web/MyComponent/Shared/MyComponent.csproj" | ||
| dotnet sln CSharpBible.sln remove "WinUI/App1/App1/App1.csproj" | ||
| dotnet sln CSharpBible.sln remove "App2/App2.csproj" | ||
| dotnet sln CSharpBible.sln remove "../PackageDwnLd.csproj" | ||
| dotnet sln CSharpBible.sln remove "Web/BlazorApp1/BlazorApp1.csproj" | ||
| dotnet sln CSharpBible.sln remove "Web/WebApp1/BlazorApp2/BlazorApp2.csproj" | ||
| dotnet sln CSharpBible.sln remove "Web/WebApp1/WebApplication1/WebApplication1/WebApplication1.csproj" | ||
|
|
||
| - name: Restore | ||
| run: dotnet restore CSharpBible.sln -p:TargetFramework=net8.0-windows | ||
|
|
||
| - name: Build | ||
| run: dotnet build CSharpBible.sln --configuration Release --no-restore -p:TargetFramework=net8.0-windows | ||
|
|
||
| - name: Test | ||
| run: dotnet test CSharpBible.sln --configuration Release --no-build --verbosity normal -p:TargetFramework=net8.0-windows | ||
| Original file line number | Diff line number | Diff line change | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,35 @@ | |||||||||||||||||||||||||||||
| name: TestStatemens CI0 | |||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| on: | |||||||||||||||||||||||||||||
| push: | |||||||||||||||||||||||||||||
| paths: | |||||||||||||||||||||||||||||
| - "TestStatements/**" | |||||||||||||||||||||||||||||
| pull_request: | |||||||||||||||||||||||||||||
| paths: | |||||||||||||||||||||||||||||
| - "TestStatements/**" | |||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| jobs: | |||||||||||||||||||||||||||||
| build-test: | |||||||||||||||||||||||||||||
| runs-on: windows-latest | |||||||||||||||||||||||||||||
| defaults: | |||||||||||||||||||||||||||||
| run: | |||||||||||||||||||||||||||||
| working-directory: TestStatements | |||||||||||||||||||||||||||||
| steps: | |||||||||||||||||||||||||||||
| - name: Checkout | |||||||||||||||||||||||||||||
| uses: actions/checkout@v4 | |||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| - name: Setup .NET 8.0 | |||||||||||||||||||||||||||||
| uses: actions/setup-dotnet@v4 | |||||||||||||||||||||||||||||
| with: | |||||||||||||||||||||||||||||
| dotnet-version: "8.0.x" | |||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| - name: Remove private projects | |||||||||||||||||||||||||||||
| run: | | |||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| - name: Restore | |||||||||||||||||||||||||||||
| run: dotnet restore TestStatements.sln -p:TargetFramework=net8.0-windows | |||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| - name: Build | |||||||||||||||||||||||||||||
| run: dotnet build TestStatements.sln --configuration Release --no-restore -p:TargetFramework=net8.0-windows | |||||||||||||||||||||||||||||
| - name: Test | |||||||||||||||||||||||||||||
| run: dotnet test TestStatements.sln --configuration Release --no-build --verbosity normal -p:TargetFramework=net8.0-windows | |||||||||||||||||||||||||||||
|
Comment on lines
+13
to
+35
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Copilot AutofixAI 3 months ago In general, the fix is to add an explicit Concretely, in
Suggested changeset
1
.github/workflows/Teststatements.yml
Copilot is powered by AI and may make mistakes. Always verify output.
Refresh and try again.
|
|||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,37 @@ | ||
| .vs | ||
| .gitignore | ||
| bin | ||
| obj | ||
| *.db | ||
| *.cache | ||
| *.bin | ||
| *.dll | ||
| *.bak | ||
| *.user | ||
| /obj.net | ||
| /CSharpBible/Data/obj.net | ||
| /CSharpBible/obj.net | ||
| *.log | ||
| *.suo | ||
| *.snk | ||
| **/vs | ||
| **/obj | ||
| **/obj.net | ||
| **/bin | ||
| **/Help | ||
| /CSharpBible/App2 | ||
| /CSharpBible/Mobile | ||
| /CSharpBible/Web | ||
| /CSharpBible/packages | ||
| /CSharpBible/Simulation | ||
| /CSharpBible/DB/ADO_Test | ||
| /CSharpBible/Libraries/CSFreeVision_ | ||
| /CSharpBible/Libraries/MathLibraryTests/TestResults | ||
| /CSharpBible/Graphics/PermutationTests/TestResults | ||
| /CSharpBible/MVVM_Tutorial | ||
| /CSharpBible/WinUI/App1 | ||
| /TestStatements/Help | ||
| /CSharpBible/Games/SharpHack.Wpf/tiles.png | ||
| /CSharpBible/Games/SharpHack.Wpf/tiles2.png | ||
| /CSharpBible/Resources/t10k-images.idx3-ubyte | ||
| /CSharpBible/Resources/t10k-labels.idx1-ubyte | ||
| /CSharpBible/Resources/train-images.idx3-ubyte | ||
| /CSharpBible/Resources/train-labels.idx1-ubyte | ||
| /CSharpBible/Games/Sokoban_Base/Version.svn |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| <Project> | ||
| <Import Project="..\Application.props" /> | ||
|
|
||
| <PropertyGroup> | ||
| <OutputType>WinExe</OutputType> | ||
| <TargetFrameworks>net8.0</TargetFrameworks> | ||
| <Nullable>enable</Nullable> | ||
| <ImplicitUsings>enable</ImplicitUsings> | ||
| <AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault> | ||
| <RootNamespace>AA20a_CommonDialogs</RootNamespace> | ||
| </PropertyGroup> | ||
| <Import Sdk="Microsoft.NET.Sdk" Project="Sdk.props" /> | ||
| <Import Sdk="Microsoft.NET.Sdk" Project="Sdk.targets" /> | ||
| <PropertyGroup Condition="$([MSBuild]::VersionGreaterThanOrEquals('$(NETCoreSdkVersion)', '9.0.100'))"> | ||
| <TargetFrameworks>$(TargetFrameworks);net9.0</TargetFrameworks> | ||
| </PropertyGroup> | ||
| <PropertyGroup Condition="$([MSBuild]::VersionGreaterThanOrEquals('$(NETCoreSdkVersion)', '10.0.100'))"> | ||
| <TargetFrameworks>$(TargetFrameworks);net10.0</TargetFrameworks> | ||
| </PropertyGroup> | ||
| <ItemGroup> | ||
| <Compile Remove="obj\**" /> | ||
| <EmbeddedResource Remove="obj\**" /> | ||
| <None Remove="obj\**" /> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <None Remove="App.xaml" /> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <PackageReference Include="Avalonia" /> | ||
| <PackageReference Include="Avalonia.Desktop" /> | ||
| <PackageReference Include="Avalonia.Themes.Fluent" /> | ||
| <PackageReference Include="Avalonia.Fonts.Inter" /> | ||
| <PackageReference Include="Microsoft.Extensions.DependencyInjection" /> | ||
| <PackageReference Include="CommunityToolkit.Mvvm" /> | ||
| <PackageReference Include="Avalonia.Diagnostics" Condition="'$(Configuration)' == 'Debug'" /> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <ProjectReference Include="..\..\Libraries\Avln_CommonDialogs.Avalonia\Avln_CommonDialogs.Avalonia.csproj" /> | ||
| <ProjectReference Include="..\..\Libraries\Avln_CommonDialogs.Base\Avln_CommonDialogs.Base.csproj" /> | ||
| <ProjectReference Include="..\..\Libraries\Avln_BaseLib\Avln_BaseLib.csproj" /> | ||
| </ItemGroup> | ||
|
|
||
| </Project> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| <Application xmlns="https://github.com/avaloniaui" | ||
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
| x:Class="AA20a_CommonDialogs.App" | ||
| RequestedThemeVariant="Default"> | ||
| <Application.Styles> | ||
| <FluentTheme /> | ||
| </Application.Styles> | ||
| </Application> |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Copilot Autofix
AI 3 months ago
In general, the fix is to define an explicit
permissionsblock for the workflow or individual jobs, granting only the minimal scopes required. For this workflow, the job only needs to read repository contents to allowactions/checkoutto fetch the code; it does not appear to need any write permissions or additional scopes.The single best fix with no functional change is to add a root-level
permissionssection that applies to all jobs, immediately below thename(oron) block. Setcontents: readas recommended by CodeQL. No imports or additional methods are needed; this is purely a YAML configuration change within.github/workflows/CSharpBible.yml.Concretely: in
.github/workflows/CSharpBible.yml, after line 1 (name: CSharpBible CI3) insert apermissions:block specifyingcontents: read. This will constrain theGITHUB_TOKENfor thebuild-testjob (and any future jobs without their ownpermissionsblock) to read-only access to repository contents.