Skip to content

Conversation

@pseusys
Copy link
Owner

@pseusys pseusys commented Nov 2, 2025

No description provided.

@pseusys pseusys self-assigned this Nov 2, 2025
Comment on lines 77 to 125
name: Test Viridian Reef Standalone Executable
runs-on: ${{ matrix.os }}-latest
env:
TARGET_ADDRESS: 1.1.1.1
TARGET_LOWER_PORT: 44442
TARGET_HIGHER_PORT: 44446
SEASIDE_LOG_LEVEL: reeflib=DEBUG,INFO
WINDIVERT_PATH: ${{ github.workspace }}/viridian/reef/windivert-bin
SUDO: ${{ matrix.os == 'ubuntu' && 'sudo -E env "PATH=$PATH"' || '' }}
TEST_COMMAND: ${{ matrix.os == 'ubuntu' && 'curl' || '& curl.exe' }} -v -I --fail --max-time 15 https://1.1.1.1
strategy:
fail-fast: false
matrix:
os: [ubuntu, windows]

steps:
- name: Checkout 🛎️
uses: actions/checkout@v4

- name: Setup Rust 🦀
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
toolchain: "1.89.0"
target: ${{ matrix.os == 'ubuntu' && 'x86_64-unknown-linux-gnu' || 'x86_64-pc-windows-msvc' }}
rust-src-dir: viridian/reef
override: true

- name: Download Dependencies 🔮
if: runner.os == 'Windows'
working-directory: viridian/reef
shell: bash
run: make dependencies runtime

- name: Test Viridian Reef (unit) 🧪
working-directory: viridian/reef
run: ${{ env.SUDO }} cargo test --package SeasideVPN-Reef --lib -- --nocapture --show-output
run: ${{ env.SUDO }} cargo test --workspace -- --nocapture --show-output

- name: Setup VPN Server 🖴
id: setup-test-server
uses: ./.github/actions/setup-server
with:
target: ${{ env.TARGET_ADDRESS }}
lower_port: ${{ env.TARGET_LOWER_PORT }}
higher_port: ${{ env.TARGET_HIGHER_PORT }}
lower-port: ${{ env.TARGET_LOWER_PORT }}
higher-port: ${{ env.TARGET_HIGHER_PORT }}
test-command: ${{ env.TEST_COMMAND }} --local-port 44443

- name: Test Viridian Reef PORT (integration) 🧪
id: test-viridian-reef-port
working-directory: viridian/reef
run: ${{ env.SUDO }} cargo run --features cli-exec --bin cli -- -m port -f "${{ steps.setup-test-server.outputs.connection-certificate }}" --capture-ports ${{ env.TARGET_LOWER_PORT }}-${{ env.TARGET_HIGHER_PORT }} -c "${{ env.TEST_COMMAND }} --local-port 44444"
run: ${{ env.SUDO }} cargo run --bin seaside_standalone -- -m port -f "${{ steps.setup-test-server.outputs.connection-certificate }}" --capture-ports ${{ env.TARGET_LOWER_PORT }}-${{ env.TARGET_HIGHER_PORT }} -c "${{ env.TEST_COMMAND }} --local-port 44444"

- name: Test Viridian Reef TYPHOON (integration) 🧪
id: test-viridian-reef-typhoon
working-directory: viridian/reef
run: ${{ env.SUDO }} cargo run --features cli-exec --bin cli -- -m typhoon -f "${{ steps.setup-test-server.outputs.connection-certificate }}" --capture-ports ${{ env.TARGET_LOWER_PORT }}-${{ env.TARGET_HIGHER_PORT }} -c "${{ env.TEST_COMMAND }} --local-port 44445"
run: ${{ env.SUDO }} cargo run --bin seaside_standalone -- -m typhoon -f "${{ steps.setup-test-server.outputs.connection-certificate }}" --capture-ports ${{ env.TARGET_LOWER_PORT }}-${{ env.TARGET_HIGHER_PORT }} -c "${{ env.TEST_COMMAND }} --local-port 44445"

viridian-reef-platform-plugin-test:
name: Test Viridian Reef Platform Plugin
runs-on: ${{ matrix.os }}-latest
env:
TARGET_ADDRESS: 1.1.1.1
TEST_COMMAND: ${{ matrix.os == 'ubuntu' && 'curl' || '& curl.exe' }} -v -I --fail --max-time 15 https://1.1.1.1
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu
dir: nm_plugin

steps:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium test

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 about 8 hours ago

To address the issue, we should explicitly set the minimal required permissions for the GITHUB_TOKEN at the top (root) of the .github/workflows/test.yml workflow file. According to the steps shown, none of the jobs appear to require write access to repository contents or other elevated permissions; they install dependencies and run tests. Best practice is to restrict all jobs to contents: read unless a more permissive setting is justified for a specific job. Thus, add the following block near the top of the workflow file, right after the name and before the on: trigger:

permissions:
  contents: read

No other code modifications, imports, or dependencies are needed since this change only applies to workflow configuration.


Suggested changeset 1
.github/workflows/test.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/test.yml b/.github/workflows/test.yml
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -1,6 +1,9 @@
 name: TEST
 # TODO: fix 'install poethepoet[poetry_plugin]' once windows issue is resolved: https://github.com/python-poetry/poetry/issues/10028
 
+permissions:
+  contents: read
+
 on:
   push:
 
EOF
@@ -1,6 +1,9 @@
name: TEST
# TODO: fix 'install poethepoet[poetry_plugin]' once windows issue is resolved: https://github.com/python-poetry/poetry/issues/10028

permissions:
contents: read

on:
push:

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants