Version 2.1.0 with support for Shapeshifer 3.1.0#20
Conversation
fe0c34d to
3737341
Compare
318aa7c to
b1ad9fa
Compare
| name: python | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| python-version: | ||
| - "3.11" | ||
| - "3.12" | ||
| - "3.13" | ||
| steps: | ||
| - name: Checkout Source | ||
| uses: actions/checkout@v4 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: 3.11 | ||
| - name: Install Dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install . | ||
| pip install .[dev] | ||
| - name: Run Tests | ||
| run: | | ||
| pip install pytest pytest-cov | ||
| pytest No newline at end of file | ||
| - uses: actions/checkout@v5 | ||
| - name: Install uv and set the Python version | ||
| uses: astral-sh/setup-uv@v6 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| - name: Install the project | ||
| run: uv sync --locked --all-extras --dev | ||
| - name: Run tests |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium test
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 5 months ago
To fix this problem, you should explicitly set the least privileges needed by the workflow job. In this specific workflow, the job only needs to check out the code and install dependencies to run tests; it does not need write access. Thus, adding a permissions block at the job level (inside python-test:) or at the workflow root (top-level, for all jobs) with contents: read suffices. Since there is currently only one job, either location is fine, but including it at the job level gives you flexibility for future jobs.
Edit the .github/workflows/test.yml file:
Add the following keys within the python-test: job, just after runs-on: ubuntu-latest (e.g., after line 10):
permissions:
contents: readNo new methods, imports, or definitions are required since this is a YAML workflow configuration.
| @@ -8,6 +8,8 @@ | ||
| python-test: | ||
| name: python | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| strategy: | ||
| matrix: | ||
| python-version: |
This version adds support for the upcoming Shapeshifter 3.1.0, as requested in #19.