Prevent path traversal in tool config names #4245
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copyright 2026 OpenC3, Inc. | |
| # All Rights Reserved. | |
| # | |
| # This program is distributed in the hope that it will be useful, | |
| # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
| # See LICENSE.md for more details. | |
| # This file may also be used under the terms of a commercial license | |
| # if purchased from OpenC3, Inc. | |
| name: Python Unit Tests | |
| # Only run on a push to main to avoid running for all the dependabot PRs | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - "**" | |
| env: | |
| OPENC3_CLOUD: local | |
| OPENC3_REDIS_HOSTNAME: localhost | |
| jobs: | |
| unit-test: | |
| if: ${{ github.actor != 'dependabot[bot]' }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.12", "3.13"] | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7 | |
| with: | |
| enable-cache: true | |
| cache-suffix: ${{ matrix.python-version }} | |
| working-directory: openc3/python | |
| - name: Set up Python ${{ matrix.python-version }} | |
| run: uv python install ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: uv sync --frozen | |
| working-directory: openc3/python | |
| - name: Run unit tests | |
| run: | | |
| uv run --frozen coverage run -m pytest ./test/ | |
| uv run --frozen coverage xml -i | |
| working-directory: openc3/python | |
| - uses: codecov/codecov-action@v5 | |
| with: | |
| working-directory: openc3/python | |
| flags: python # See codecov.yml | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| # - name: SonarQube Scan | |
| # uses: SonarSource/sonarqube-scan-action@v5 | |
| # with: | |
| # projectBaseDir: openc3/python | |
| # args: > | |
| # -Dsonar.organization=openc3 | |
| # -Dsonar.projectKey=OpenC3_cosmos | |
| # -Dsonar.python.coverage.reportPaths=coverage.xml | |
| # -Dsonar.sources=openc3/ | |
| # -Dsonar.tests=test/ | |
| # env: | |
| # SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |