Skip to content

Switch CI dependency scanning to grype and clean pixi.lock diffs - #89

Merged
peterfpeterson merged 1 commit into
mainfrom
ewm16456_ci_grype
Jul 24, 2026
Merged

Switch CI dependency scanning to grype and clean pixi.lock diffs#89
peterfpeterson merged 1 commit into
mainfrom
ewm16456_ci_grype

Conversation

@darshdinger

@darshdinger darshdinger commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Short description of the changes:

Switches CI dependency scanning over to grype (following the neutrons template repo) so that newly disclosed CVEs in transitive build/dev tooling no longer hard-fail the pipeline, refreshes pixi.lock to clear the current backlog of pip-audit findings, and marks pixi.lock as non-diffable so its changesets stay clean on GitHub.

Long description of the changes:

The pip-audit "Dependency check" step fails the build any time a new vulnerability lands in a transitive dependency (even in dev/build-only tooling like twine, pip, or pillow), which has been intermittently breaking main and the bot PRs. This mirrors what Daniel did in pyoncatqt and what the python_project_template now does: add grype as the forward-looking scanner while keeping pip-audit as-is.

Changes:

  • .github/workflows/test_and_deploy.yml — ported the package job to the template pattern:
    • Added a permissions: block with security-events: write so grype can upload its SARIF results to GitHub code scanning (Security tab).
    • Replaced neutrons/conda-verify@main with neutrons/gh-actions/pkg-install + pkg-verify, which install/verify the built conda package and expose the environment path grype needs.
    • Added a neutrons/gh-actions/grype scan of the installed environment. It runs with fail-build: false, so vulnerabilities are surfaced and tracked in the Security tab without failing the build.
    • Kept the existing pip-audit "Dependency check" step in the tests job (unchanged).
  • pixi.lock — regenerated with pixi update so the current pip-audit findings are resolved and the builds go green again. (audit-deps now reports "No known vulnerabilities found".)
  • .gitattributes — added -diff to the pixi.lock line so GitHub treats it as binary; this keeps lockfile updates from producing enormous, unreviewable diffs.

This is intended as a precursor PR: once merged, the bot PRs (#83, #87) can be rebased onto a green main and merged.

Lockfile changes

Generated with pixi update --dry-run --json | pixi exec pixi-diff-to-markdown (diff of main's pixi.lock vs. this branch). Since this branch is based on main, the diff still includes plot-publisher/plotly; those are removed separately in #88.

pixi update — dependency changes

default

osx-arm64
Dependency1 Before After Change
pip 25.3 26.1.2 Major Upgrade
argcomplete 3.6.3 3.7.0 Minor Upgrade
hatch 1.16.3 1.17.1 Minor Upgrade
plot-publisher 1.3.1 1.4.0 Minor Upgrade
pre-commit 4.5.1 4.6.1 Minor Upgrade
python 3.12.12 3.14.6 Minor Upgrade
anaconda-client 1.14.0 1.14.1 Patch Upgrade
pip-audit 2.10.0 2.10.1 Patch Upgrade
annotated-doc 0.0.4 Added
comrak 0.54.0 Added
distro 1.9.0 Added
httpcore2 2.8.0 Added
httpx2 2.8.0 Added
libmpdec 4.0.0 Added
python-discovery 1.5.0 Added
truststore 0.10.4 Added
cmarkgfm 2024.11.20 Removed
icu 78.2 Removed
typer-slim 0.21.1 Removed
typer-slim-standard 0.21.1 Removed
wheel 0.46.3 Removed
attrs 25.4.0 26.1.0 Major Upgrade
cryptography 46.0.3 49.0.0 Major Upgrade
importlib-metadata 8.7.0 9.0.0 Major Upgrade
importlib_resources 6.5.2 7.1.0 Major Upgrade
libcxx 21.1.8 22.1.8 Major Upgrade
llvm-openmp 21.1.8 22.1.8 Major Upgrade
more-itertools 10.8.0 11.1.0 Major Upgrade
pycparser 2.22 3.0 Major Upgrade
pytz 2025.2 2026.2 Major Upgrade
readme_renderer 44.0 45.0 Major Upgrade
rich 14.2.0 15.0.0 Major Upgrade
rpds-py 0.30.0 2026.6.3 Major Upgrade
setuptools 80.10.1 83.0.0 Major Upgrade
tzdata 2025c 2026c Major Upgrade
virtualenv 20.36.1 21.7.0 Major Upgrade
zipp 3.23.0 4.1.0 Major Upgrade
anaconda-auth 0.12.3 0.15.1 Minor Upgrade
anaconda-cli-base 0.7.0 0.8.2 Minor Upgrade
anyio 4.12.1 4.14.2 Minor Upgrade
backports.zstd 1.3.0 1.6.0 Minor Upgrade
ca-certificates 2026.1.4 2026.7.22 Minor Upgrade
certifi 2026.1.4 2026.7.22 Minor Upgrade
cffi 2.0.0 2.1.0 Minor Upgrade
click 8.3.1 8.4.2 Minor Upgrade
conda-package-handling 2.4.0 2.5.0 Minor Upgrade
conda-package-streaming 0.12.0 0.13.0 Minor Upgrade
cpython 3.12.12 3.14.6 Minor Upgrade
cyclonedx-python-lib 11.6.0 11.11.0 Minor Upgrade
docutils 0.22.4 0.23 Minor Upgrade
editables 0.5 0.6 Minor Upgrade
filelock 3.20.3 3.32.0 Minor Upgrade
h2 4.3.0 4.4.0 Minor Upgrade
hatchling 1.28.0 1.31.0 Minor Upgrade
hpack 4.1.0 4.2.0 Minor Upgrade
id 1.5.0 1.6.1 Minor Upgrade
idna 3.11 3.18 Minor Upgrade
jaraco.functools 4.4.0 4.6.0 Minor Upgrade
lcms2 2.18 2.19.1 Minor Upgrade
lerc 4.0.0 4.1.0 Minor Upgrade
libexpat 2.7.3 2.8.1 Minor Upgrade
libjpeg-turbo 3.1.2 3.2.0 Minor Upgrade
libsqlite 3.51.2 3.53.3 Minor Upgrade
markdown-it-py 4.0.0 4.2.0 Minor Upgrade
msgpack-python 1.1.2 1.2.1 Minor Upgrade
narwhals 2.15.0 2.24.0 Minor Upgrade
ncurses 6.5 6.6 Minor Upgrade
numpy 2.4.1 2.5.1 Minor Upgrade
packaging 26.0 26.2 Minor Upgrade
pathspec 1.0.3 1.1.1 Minor Upgrade
pillow 12.1.0 12.3.0 Minor Upgrade
platformdirs 4.5.1 4.11.0 Minor Upgrade
plotly 6.5.2 6.9.0 Minor Upgrade
pydantic 2.12.5 2.13.4 Minor Upgrade
pydantic-core 2.41.5 2.46.4 Minor Upgrade
pydantic-settings 2.12.0 2.14.2 Minor Upgrade
pygments 2.19.2 2.20.0 Minor Upgrade
pyjwt 2.10.1 2.13.0 Minor Upgrade
python-gil 3.12.12 3.14.6 Minor Upgrade
python_abi 3.12 3.14 Minor Upgrade
requests 2.32.5 2.34.2 Minor Upgrade
tomlkit 0.14.0 0.15.1 Minor Upgrade
tqdm 4.67.1 4.69.0 Minor Upgrade
traitlets 5.14.3 5.15.1 Minor Upgrade
trove-classifiers 2026.1.14.14 2026.6.1.19 Minor Upgrade
typer 0.21.1 0.27.0 Minor Upgrade
typing-extensions 4.15.0 4.16.0 Minor Upgrade
typing_extensions 4.15.0 4.16.0 Minor Upgrade
ukkonen 1.0.1 1.1.0 Minor Upgrade
urllib3 2.6.3 2.7.0 Minor Upgrade
uv 0.9.26 0.11.31 Minor Upgrade
cachecontrol 0.14.3 0.14.4 Patch Upgrade
charset-normalizer 3.4.4 3.4.9 Patch Upgrade
distlib 0.4.0 0.4.3 Patch Upgrade
identify 2.6.16 2.6.19 Patch Upgrade
jaraco.context 6.1.0 6.1.2 Patch Upgrade
libfreetype 2.14.1 2.14.3 Patch Upgrade
libfreetype6 2.14.1 2.14.3 Patch Upgrade
liblzma 5.8.2 5.8.3 Patch Upgrade
libopenblas 0.3.30 0.3.33 Patch Upgrade
libpng 1.6.54 1.6.58 Patch Upgrade
libtiff 4.7.1 4.7.2 Patch Upgrade
libzlib 1.3.1 1.3.2 Patch Upgrade
nh3 0.3.2 0.3.6 Patch Upgrade
openssl 3.6.0 3.6.3 Patch Upgrade
python-dotenv 1.2.1 1.2.2 Patch Upgrade
readchar 4.2.1 4.2.2 Patch Upgrade
tomli 2.4.0 2.4.1 Patch Upgrade
zlib-ng 2.3.2 2.3.3 Patch Upgrade
_python_abi3_support hd8ed1ab_2 hd8ed1ab_3 Only build string
brotli-python py312h0dfefe5_1 py314h3daef5d_1 Only build string
bzip2 hd037594_8 hd037594_9 Only build string
libblas 5_h51639a9_openblas 8_h51639a9_openblas Only build string
libcblas 5_hb0561ab_openblas 8_hb0561ab_openblas Only build string
libffi he5f378a_0 hcf2aa1b_0 Only build string
libgcc hcbb3090_16 hcbb3090_19 Only build string
libgfortran h07b0088_16 h07b0088_19 Only build string
libgfortran5 hdae7583_16 hdae7583_19 Only build string
liblapack 5_hd9741b5_openblas 8_hd9741b5_openblas Only build string
openjpeg hbfb3c88_0 hd9e9057_0 Only build string
pyyaml py312h5748b74_0 py314h6e9b3f0_1 Only build string
tk h892fb3f_3 hd3d0363_3 Only build string
typing-inspection pyhd8ed1ab_1 pyhcf101f3_2 Only build string
zstandard py312h37e1c23_1 py314h9d33bd4_1 Only build string
linux-64
Dependency1 Before After Change
pip 25.3 26.1.2 Major Upgrade
argcomplete 3.6.3 3.7.0 Minor Upgrade
hatch 1.16.3 1.17.1 Minor Upgrade
plot-publisher 1.3.1 1.4.0 Minor Upgrade
pre-commit 4.5.1 4.6.1 Minor Upgrade
anaconda-client 1.14.0 1.14.1 Patch Upgrade
pip-audit 2.10.0 2.10.1 Patch Upgrade
python 3.14.2 3.14.6 Patch Upgrade
annotated-doc 0.0.4 Added
comrak 0.54.0 Added
distro 1.9.0 Added
httpcore2 2.8.0 Added
httpx2 2.8.0 Added
python-discovery 1.5.0 Added
truststore 0.10.4 Added
_libgcc_mutex 0.1 Removed
cmarkgfm 2024.11.20 Removed
icu 78.2 Removed
typer-slim 0.21.1 Removed
typer-slim-standard 0.21.1 Removed
attrs 25.4.0 26.1.0 Major Upgrade
cryptography 46.0.3 49.0.0 Major Upgrade
importlib-metadata 8.7.0 9.0.0 Major Upgrade
importlib_resources 6.5.2 7.1.0 Major Upgrade
more-itertools 10.8.0 11.1.0 Major Upgrade
pycparser 2.22 3.0 Major Upgrade
pytz 2025.2 2026.2 Major Upgrade
readme_renderer 44.0 45.0 Major Upgrade
rich 14.2.0 15.0.0 Major Upgrade
rpds-py 0.30.0 2026.6.3 Major Upgrade
setuptools 80.10.1 83.0.0 Major Upgrade
tzdata 2025c 2026c Major Upgrade
virtualenv 20.36.1 21.7.0 Major Upgrade
zipp 3.23.0 4.1.0 Major Upgrade
anaconda-auth 0.12.3 0.15.1 Minor Upgrade
anaconda-cli-base 0.7.0 0.8.2 Minor Upgrade
anyio 4.12.1 4.14.2 Minor Upgrade
backports.zstd 1.3.0 1.6.0 Minor Upgrade
ca-certificates 2026.1.4 2026.7.22 Minor Upgrade
certifi 2026.1.4 2026.7.22 Minor Upgrade
cffi 2.0.0 2.1.0 Minor Upgrade
click 8.3.1 8.4.2 Minor Upgrade
conda-package-handling 2.4.0 2.5.0 Minor Upgrade
conda-package-streaming 0.12.0 0.13.0 Minor Upgrade
cyclonedx-python-lib 11.6.0 11.11.0 Minor Upgrade
docutils 0.22.4 0.23 Minor Upgrade
editables 0.5 0.6 Minor Upgrade
filelock 3.20.3 3.32.0 Minor Upgrade
h2 4.3.0 4.4.0 Minor Upgrade
hatchling 1.28.0 1.31.0 Minor Upgrade
hpack 4.1.0 4.2.0 Minor Upgrade
id 1.5.0 1.6.1 Minor Upgrade
idna 3.11 3.18 Minor Upgrade
jaraco.functools 4.4.0 4.6.0 Minor Upgrade
lcms2 2.18 2.19.1 Minor Upgrade
ld_impl_linux-64 2.45 2.46.1 Minor Upgrade
lerc 4.0.0 4.1.0 Minor Upgrade
libexpat 2.7.3 2.8.1 Minor Upgrade
libglib 2.86.3 2.88.2 Minor Upgrade
libjpeg-turbo 3.1.2 3.2.0 Minor Upgrade
libsqlite 3.51.2 3.53.3 Minor Upgrade
libuuid 2.41.3 2.42.2 Minor Upgrade
markdown-it-py 4.0.0 4.2.0 Minor Upgrade
msgpack-python 1.1.2 1.2.1 Minor Upgrade
narwhals 2.15.0 2.24.0 Minor Upgrade
ncurses 6.5 6.6 Minor Upgrade
numpy 2.4.1 2.5.1 Minor Upgrade
packaging 26.0 26.2 Minor Upgrade
pathspec 1.0.3 1.1.1 Minor Upgrade
pillow 12.1.0 12.3.0 Minor Upgrade
platformdirs 4.5.1 4.11.0 Minor Upgrade
plotly 6.5.2 6.9.0 Minor Upgrade
pydantic 2.12.5 2.13.4 Minor Upgrade
pydantic-core 2.41.5 2.46.4 Minor Upgrade
pydantic-settings 2.12.0 2.14.2 Minor Upgrade
pygments 2.19.2 2.20.0 Minor Upgrade
pyjwt 2.10.1 2.13.0 Minor Upgrade
requests 2.32.5 2.34.2 Minor Upgrade
secretstorage 3.4.1 3.5.0 Minor Upgrade
tomlkit 0.14.0 0.15.1 Minor Upgrade
tqdm 4.67.1 4.69.0 Minor Upgrade
traitlets 5.14.3 5.15.1 Minor Upgrade
trove-classifiers 2026.1.14.14 2026.6.1.19 Minor Upgrade
typer 0.21.1 0.27.0 Minor Upgrade
typing-extensions 4.15.0 4.16.0 Minor Upgrade
typing_extensions 4.15.0 4.16.0 Minor Upgrade
ukkonen 1.0.1 1.1.0 Minor Upgrade
urllib3 2.6.3 2.7.0 Minor Upgrade
uv 0.9.26 0.11.31 Minor Upgrade
cachecontrol 0.14.3 0.14.4 Patch Upgrade
charset-normalizer 3.4.4 3.4.9 Patch Upgrade
cpython 3.14.2 3.14.6 Patch Upgrade
distlib 0.4.0 0.4.3 Patch Upgrade
identify 2.6.16 2.6.19 Patch Upgrade
jaraco.context 6.1.0 6.1.2 Patch Upgrade
libfreetype 2.14.1 2.14.3 Patch Upgrade
libfreetype6 2.14.1 2.14.3 Patch Upgrade
liblzma 5.8.2 5.8.3 Patch Upgrade
libopenblas 0.3.30 0.3.33 Patch Upgrade
libpng 1.6.54 1.6.58 Patch Upgrade
libtiff 4.7.1 4.7.2 Patch Upgrade
libzlib 1.3.1 1.3.2 Patch Upgrade
nh3 0.3.2 0.3.6 Patch Upgrade
openssl 3.6.0 3.6.3 Patch Upgrade
python-dotenv 1.2.1 1.2.2 Patch Upgrade
python-gil 3.14.2 3.14.6 Patch Upgrade
readchar 4.2.1 4.2.2 Patch Upgrade
tomli 2.4.0 2.4.1 Patch Upgrade
zlib-ng 2.3.2 2.3.3 Patch Upgrade
_openmp_mutex 2_gnu 20_gnu Only build string
_python_abi3_support hd8ed1ab_2 hd8ed1ab_3 Only build string
bzip2 hda65f42_8 hda65f42_9 Only build string
libblas 5_h4a7cf45_openblas 8_h4a7cf45_openblas Only build string
libcblas 5_h0358290_openblas 8_h0358290_openblas Only build string
libffi h9ec8514_0 h3435931_0 Only build string
libgcc he0feb66_16 he0feb66_19 Only build string
libgfortran h69a702a_16 h69a702a_19 Only build string
libgfortran5 h68bc16d_16 h68bc16d_19 Only build string
libgomp he0feb66_16 he0feb66_19 Only build string
liblapack 5_h47877c9_openblas 8_h47877c9_openblas Only build string
libmpdec hb9d3cd8_0 hb03c661_1 Only build string
libstdcxx h934c35e_16 h934c35e_19 Only build string
pyyaml pyh7db6752_0 py314h67df5f8_1 Only build string
tk noxft_ha0e22de_103 noxft_hd70dff1_3 Only build string
typing-inspection pyhd8ed1ab_1 pyhcf101f3_2 Only build string

Check list for the pull request

  • I have read the [CONTRIBUTING]
  • I have read the [CODE_OF_CONDUCT]
  • I have added tests for my changes
  • I have updated the documentation accordingly

Check list for the reviewer

  • I have read the [CONTRIBUTING]
  • I have verified the proposed changes
  • best software practices
    • all internal functions have an underbar, as is python standard
    • clearly named variables (better to be verbose in variable names)
    • code comments explaining the intent of code blocks
  • All the tests are passing
  • The documentation is up to date
  • code comments added when explaining intent

Manual test for the reviewer

  1. Confirm the pipeline is green on this PR, and that the package job now runs Install built conda packageVerify conda packageScan installed environment with Grype.
  2. Confirm grype results appear under the repo's Security → Code scanning alerts, and that the build stays green even when grype reports findings.
  3. Locally, confirm the lockfile no longer trips the dependency audit:
    pixi run audit-deps   # -> "No known vulnerabilities found"
    
  4. Confirm pixi.lock renders as a binary/collapsed file in the GitHub diff view (thanks to the -diff attribute).

References

Footnotes

  1. Bold means explicit dependency. 2

@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

This comment was marked as resolved.

@peterfpeterson peterfpeterson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the results of pixi diff into pixi-diff-to-markdown into the PR description

@peterfpeterson
peterfpeterson merged commit 403f802 into main Jul 24, 2026
7 checks passed
@peterfpeterson
peterfpeterson deleted the ewm16456_ci_grype branch July 24, 2026 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants