-
Notifications
You must be signed in to change notification settings - Fork 4
Python maintenance #304
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
Python maintenance #304
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2,16 +2,29 @@ name: lint | |||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||||
| pull_request: | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| permissions: | ||||||||||||||||||||||||||||||||
| contents: read | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||
| flake8: | ||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||
| - uses: actions/checkout@v2 | ||||||||||||||||||||||||||||||||
| - uses: actions/setup-python@v2 | ||||||||||||||||||||||||||||||||
| - uses: actions/checkout@v6 | ||||||||||||||||||||||||||||||||
| - uses: actions/setup-python@v6 | ||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||
| python-version: 3.9 | ||||||||||||||||||||||||||||||||
| python-version: "3.10" | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - uses: TrueBrain/actions-flake8@v2 | ||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||
| flake8_version: 6.0.0 | ||||||||||||||||||||||||||||||||
| plugins: flake8-isort==6.0.0 | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| ruff-format: | ||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||
| - uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||||
| - uses: astral-sh/ruff-action@v3 | ||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||
| version: "~=0.13.3" | ||||||||||||||||||||||||||||||||
| args: format --check --diff --output-format=github | ||||||||||||||||||||||||||||||||
|
Comment on lines
+23
to
+30
Check warningCode 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 AutofixAI 14 days ago In general, the fix is to explicitly declare the minimal required The best fix without changing functionality is to add a root-level Concretely, in permissions:
contents: readThis documents and enforces least-privilege permissions for the workflow.
Suggested changeset
1
.github/workflows/lint.yml
Copilot is powered by AI and may make mistakes. Always verify output.
Unable to commit as this autofix suggestion is now outdated
Refresh and try again.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doesn't it though? >.< permissions:
contents: read |
||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| # Python | ||
| *.pyc | ||
| .venv | ||
| uv.lock | ||
|
|
||
| # IDE | ||
| .idea | ||
|
|
@@ -11,3 +12,6 @@ | |
| # Tests | ||
| .hypothesis | ||
| .coverage | ||
|
|
||
| # Other | ||
| build | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| [build-system] | ||
| requires = ["uv_build>=0.10.2,<0.11.0"] | ||
| build-backend = "uv_build" | ||
|
|
||
| [project] | ||
| name = "rain-api-core" | ||
| version = "0.1.0" | ||
| description = "RAIN API Core" | ||
| readme = "README.md" | ||
| authors = [ | ||
| { name = "Rohan Weeden", email = "reweeden@alaska.edu" } | ||
| ] | ||
| requires-python = "~=3.10" | ||
| dependencies = [ | ||
| "cachetools~=5.0", | ||
| "jinja2~=3.0", | ||
| "netaddr~=1.0", | ||
| "pyjwt[crypto]~=2.0", | ||
| "pyyaml~=6.0", | ||
| ] | ||
|
|
||
| [dependency-groups] | ||
| dev = [ | ||
| "boto3~=1.35", | ||
| "hypothesis~=6.112", | ||
| "moto~=5.0", | ||
| "pytest~=8.3", | ||
| "pytest-cov~=5.0", | ||
| "pytest-mock~=3.14", | ||
| ] |
Uh oh!
There was an error while loading. Please reload this page.