Repository navigation
Pin workflow actions to SHAs and install tig-cli from hash-locked deps (SonarCloud) - #50
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
Addresses SonarCloud githubactions:S7637, S8541, S8544 and text:S8565: third-party actions pinned to full commit SHAs, tig-cli locked in uv.lock with hash-pinned requirements exports, and every pip install in CI uses --only-binary :all: --require-hashes (builds use --no-build-isolation against the locked setuptools/wheel). Co-Authored-By: jason.han <hanhuijun@gmail.com>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Project Requirements: PASSPR #50 is a CI supply-chain hardening change. It pins third-party GitHub Actions to commit SHAs. It also makes CI install tig-cli and its build/release tooling from hash-locked requirements exports (requirements.txt, requirements-dev.txt, requirements-release.txt, generated from a new uv.lock), using --only-binary/--require-hashes and --no-build-isolation. The only pyproject.toml change adds PEP 735 [dependency-groups] (backend, release), which do not go into published wheel/sdist metadata. Runtime dependencies, supported Python versions, CLI behavior, and container images are unchanged. All three requirements pass. One minor optional note: the contributor Development section in tig-cli/README.md could mention the new lock/export workflow.
Automated pre-check hints
Evaluated at Criteria: |
Summary
Fixes 29 SonarCloud code-scanning alerts in the GitHub Actions workflows and
tig-cli/pyproject.toml. The fixes pin third-party actions to commit SHAs and lock tig-cli's dependencies with hashes. None of them are suppressions.docker/login-action@c94ce9fb… # v3.7.0. Behavior should not change. First-partyactions/*steps were not flagged and are left alone.tig-cli/uv.lockis new.pyproject.tomlgets two[dependency-groups]:backend(setuptools, wheel) andrelease(build, twine). From the lock,uv exportproduces three hash-pinned files that work across Python 3.9–3.12 and macOS/Linux:requirements.txt: runtime deps plus backendrequirements-dev.txt:[dev]extras plus backendrequirements-release.txt: backend plus releaseThe command that regenerates each file is in its header.
.github/workflows/project-requirements-tests.ymlalready uses.python -m build --no-isolation. Previously the isolated build env fetched unpinned setuptools and wheel.pip install --upgrade pipsteps are gone. The runners keep the pip thatsetup-pythonships.docker/login-actionv3.7.0,docker/metadata-actionv5.10.0 pinned to SHAsetup-buildx-actionv3.12.0,login-actionv3.7.0,metadata-actionv5.10.0,build-push-actionv5.4.0,softprops/action-gh-releasev1 pinned to SHAlogin-actionv3.7.0,metadata-actionv5.10.0 pinned to SHAlogin-actionv3.7.0 pinned to SHApypa/gh-action-pypi-publishv1.14.3 (currentrelease/v1) pinned to SHAcodecov/codecov-actionv4.6.0 pinned to SHApip install --upgrade pipremoved-e ".[dev]"replaced by hashedrequirements-dev.txt+--no-deps --no-build-isolation -e .pip install --upgrade pipremovedpip build twinereplaced by hashedrequirements-release.txt;python -m build --no-isolationpip install ./tig-clireplaced by hashedrequirements.txt+--only-binary :all: --no-deps --no-build-isolation ./tig-clitig-cli/uv.lockadded; CI installs from its hash-pinned exportsNo alert is left unfixed, and none needs a dismissal.
Verified locally
Ran with uv-managed CPython 3.9, 3.10, 3.11 and 3.12 on Linux:
pytest -m "not integration". 418 passed on every version. The 3.12 coverage run producescoverage.xml.python -m build --no-isolationandtwine check dist/*. Builds the sdist and wheel, and both pass.tigon PATH, andtig --helpworks.coveragecp39 arm64 and x86_64).Reviewer notes
pyproject.toml, runuv lockand then theuv exportcommand from each requirements file's header. Dependabot/Renovate can keep the SHAs and the lock current.project.license = {text = ...}table is deprecated (deadline 2027-02). The warning is not new: the old isolated builds used the latest setuptools too. It is outside this PR's alerts.Link to Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/d776f644971d4383b590977b18381efe
Open in Devin Desktop: https://nasa-jpl-demo.devinenterprise.com/desktop/session/d776f644971d4383b590977b18381efe?variant=devin
Requested by: @HuiJun
🟢 Devin Review found nothing to fix · View findings