-
Notifications
You must be signed in to change notification settings - Fork 0
Linux network manager plugin #34
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
base: main
Are you sure you want to change the base?
Conversation
| 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
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 11 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: readNo other code modifications, imports, or dependencies are needed since this change only applies to workflow configuration.
-
Copy modified lines R4-R6
| @@ -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: | ||
|
|
No description provided.