Skip to content

ci: Migrate to Hatch project manager + uv package manager and static anal… - #150

Closed
rolandriver wants to merge 1 commit into
mainfrom
rg/migrate-project-manager
Closed

ci: Migrate to Hatch project manager + uv package manager and static anal…#150
rolandriver wants to merge 1 commit into
mainfrom
rg/migrate-project-manager

Conversation

@rolandriver

Copy link
Copy Markdown
Collaborator

…ysis workflow.

🔗 Closed Issues

Closes #145.


📝 Description

Simplify the project and package management by using hatch and uv.


🚦 Status

WIP


@rolandriver
rolandriver requested a review from nelimee as a code owner December 17, 2025 13:48
@rolandriver rolandriver self-assigned this Dec 17, 2025
@github-actions github-actions Bot added the dev Changes that affect development tools/configuration (e.g. pixi, sphinx, pytest, mypy, ruff, CI) label Dec 17, 2025
@rolandriver
rolandriver removed the request for review from nelimee December 17, 2025 13:48
Comment on lines +20 to +41
name: Run static analysis tools (Ubuntu)
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.10"]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout deltakit
uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install Hatch
run: |
pip install hatch
- name: Run linter (ruff)
run: |
hatch -v run static:lint
- name: Run type checker (mypy)
run: |
hatch -v run static:type

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 8 months ago

To fix the problem, add a permissions block at the job or workflow level to limit the GITHUB_TOKEN to the least privileges required. Here, the static_analysis job only needs to check out the code and perform analysis, so it only requires read access to contents. The best fix is to add permissions: contents: read at the root level of the workflow (after the name: and before on:) to apply least privilege to all jobs unless overridden. Alternatively, the key can be placed on the static_analysis job alone. Generally, root-level is best unless certain jobs need differing scopes.

Specifically, insert:

permissions:
  contents: read

After the name: line in .github/workflows/static.yml.
No extra imports or dependencies are needed.

Suggested changeset 1
.github/workflows/static.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/static.yml b/.github/workflows/static.yml
--- a/.github/workflows/static.yml
+++ b/.github/workflows/static.yml
@@ -1,4 +1,6 @@
 name: Static analysis
+permissions:
+  contents: read
 
 on:
   push:
EOF
@@ -1,4 +1,6 @@
name: Static analysis
permissions:
contents: read

on:
push:
Copilot is powered by AI and may make mistakes. Always verify output.
@rolandriver

Copy link
Copy Markdown
Collaborator Author

Closing as resolved in #149

@rolandriver
rolandriver deleted the rg/migrate-project-manager branch January 28, 2026 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dev Changes that affect development tools/configuration (e.g. pixi, sphinx, pytest, mypy, ruff, CI)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

request: Migrate to uv dependency manager

2 participants