build(deps): bump gitpython from 3.1.18 to 3.1.30 in /tests#129
build(deps): bump gitpython from 3.1.18 to 3.1.30 in /tests#129dependabot[bot] wants to merge 1 commit into
Conversation
Bumps [gitpython](https://github.com/gitpython-developers/GitPython) from 3.1.18 to 3.1.30. - [Release notes](https://github.com/gitpython-developers/GitPython/releases) - [Changelog](https://github.com/gitpython-developers/GitPython/blob/main/CHANGES) - [Commits](gitpython-developers/GitPython@3.1.18...3.1.30) --- updated-dependencies: - dependency-name: gitpython dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
4ad42f8 to
b1f813e
Compare
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| python3 -m pip install -U pip | ||
| python3 -m pip install -r tests/test_requirements.txt | ||
| python3 -m pip install -r tests/requirements.txt | ||
| python3 -m pip list | ||
| git config --global user.email "you@example.com" | ||
| git config --global user.name "Your Name" | ||
|
|
||
|
|
||
| - name: run tests | ||
| run: | | ||
| make check | ||
|
|
||
| - name: run vmn stamp version | ||
| run: | | ||
| python3 -m pip install vmn | ||
| git status | ||
| make _${{ github.event.inputs.version_type }} | ||
| git status | ||
| cat .vmn/vmn.log | ||
|
|
||
| - name: build pkg | ||
| run: | | ||
| make _build | ||
| ls -ltrh ./dist/ | ||
|
|
||
| - name: Publish a Python distribution to PyPI | ||
| env: | ||
| TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
| TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
| run: | | ||
| ls -ltrh ./dist/ | ||
| make upload |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 3 months ago
In general, the fix is to add an explicit permissions block to the workflow (or to the specific job) that restricts the GITHUB_TOKEN to the least privileges required. For a build-and-publish job like this that only uses PyPI credentials and does not interact with the GitHub API, the GITHUB_TOKEN can be limited to read-only repository contents, or even permissions: {} if no token access is needed at all. However, GitHub recommends at least specifying contents: read as a minimal starting point.
The best fix here, without changing existing functionality, is to add a top-level permissions block right after the workflow name: line. This ensures every job in this workflow (currently just build_pkg) inherits the restricted token permissions. Based on the shown steps, the workflow does not appear to require any write permissions to GitHub; it only needs to clone the repository (handled by actions/checkout, which works with contents: read). Therefore, we can safely set:
permissions:
contents: readNo additional imports or methods are required; this is purely a YAML configuration change in .github/workflows/build-and-upload-vmn.yml.
| @@ -3,6 +3,9 @@ | ||
|
|
||
| name: Build vmn package and upload to PyPI | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| on: | ||
|
|
||
| workflow_dispatch: |
064a4cd to
9a9df1d
Compare
Bumps gitpython from 3.1.18 to 3.1.30.
Release notes
Sourced from gitpython's releases.
Commits
141cd65adjust changelog prior to release678a8feMerge pull request #1521 from stsewd/block-insecure-optionsae6a6e4Fix type hint on create_tag5bce9b4Document PushInfoListf4f2658Updates from review9dc4392Submodule testsc8ae33bMore testsb92f01aUpdate/add tests for Repo.clone*fd2c6daUpdates from reviewe6108c7Block unsafe options and protocols by defaultYou can trigger a rebase of this PR by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)@dependabot use these labelswill set the current labels as the default for future PRs for this repo and language@dependabot use these reviewerswill set the current reviewers as the default for future PRs for this repo and language@dependabot use these assigneeswill set the current assignees as the default for future PRs for this repo and language@dependabot use this milestonewill set the current milestone as the default for future PRs for this repo and languageYou can disable automated security fix PRs for this repo from the Security Alerts page.