Skip to content

Improve error reporting when starting gateway service#72

Open
eliabieri wants to merge 4 commits into
developfrom
feature/gateway_service_improve_error_handling
Open

Improve error reporting when starting gateway service#72
eliabieri wants to merge 4 commits into
developfrom
feature/gateway_service_improve_error_handling

Conversation

@eliabieri
Copy link
Copy Markdown
Member

No description provided.

@eliabieri eliabieri self-assigned this May 27, 2025
@eliabieri eliabieri added the enhancement New feature or request label May 27, 2025
Comment thread .github/workflows/build_release.yml Fixed
Comment on lines +8 to +38
runs-on: windows-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- name: Set up Python (32-bit)
uses: actions/setup-python@v5
with:
python-version: 3.8
architecture: x86
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.3.2
- name: Register gbda_aut.dll
run: |
Copy-Item .\lib\gbda_aut.dll C:\Windows\System32\
regsvr32 /s C:\Windows\System32\gbda_aut.dll
shell: pwsh
- name: Install dependencies
run: poetry install
- name: Build executables
run: scripts/build_executables.ps1
- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
artifacts: |
dist/OpenOpcCli.exe
dist/OpenOpcServer.exe
dist/OpenOpcService.exe No newline at end of file

Check warning

Code 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 Autofix

AI 12 months ago

To fix the issue, we will add a permissions block at the workflow level to explicitly define the least privileges required for the workflow. Based on the steps in the workflow:

  • The actions/checkout step requires contents: read to check out the repository.
  • The ncipollo/release-action step requires contents: read and contents: write to create a GitHub release and upload artifacts.

We will add the following permissions block at the root of the workflow:

permissions:
  contents: write

This ensures that the workflow has only the necessary permissions to perform its tasks.


Suggested changeset 1
.github/workflows/build_release.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml
--- a/.github/workflows/build_release.yml
+++ b/.github/workflows/build_release.yml
@@ -1,2 +1,4 @@
 name: Build Release
+permissions:
+  contents: write
 on:
EOF
@@ -1,2 +1,4 @@
name: Build Release
permissions:
contents: write
on:
Copilot is powered by AI and may make mistakes. Always verify output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants