Skip to content

PR workflow hygiene, FOSSA CVSS metrics, dev dependencies - #489

Open
lelia wants to merge 2 commits into
mainfrom
fix/code-scanning-alerts
Open

lelia wants to merge 2 commits into
mainfrom
fix/code-scanning-alerts

Conversation

@lelia

@lelia lelia commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

PR preview workflow

Removes the manual workflow_dispatch trigger and its inputs from Publish PR Preview. The publish-preview and publish-docker-preview label triggers are unchanged and are now the only way to publish previews.

What goes away:

  • Publishing TestPyPI and Docker previews in one run. Apply both labels instead; that starts two runs.
  • The sdk_preview_version input for Docker previews. Dockerfile.preview still accepts --build-arg SDK_PREVIEW_VERSION=... for local builds.

CONTRIBUTING.md is updated to match.

FOSSA CVSS metrics

_build_metrics in socketsecurity/fossa_compat.py reads the CVSS base metric prop keys from a module-level _CVSS_METRIC_FIELDS table instead of eight inline props.get("...") calls. The emitted metrics are unchanged.

Development dependencies

Removes hatch and pre-commit from the dev extra, along with the [dependency-groups] table that held a second pre-commit requirement. Both depend on virtualenv, which brought filelock into uv.lock. The CLI never imports filelock, but every filelock advisory still landed on this repository (40 since October 23). uv.lock drops filelock, virtualenv, python-discovery, hatch, pre-commit and the rest of their trees.

  • CONTRIBUTING.md builds with uv build, which calls the same hatchling backend from [build-system].
  • docs/development.md installs pre-commit with uv tool install pre-commit rather than uv add --dev. pre-commit builds its own environment for each hook, so the sync-version hook runs unchanged.
  • CI is unchanged: the setup-hatch action installs its own pinned hatch with pip, and the lint job only uses ruff from the extra.

Version

Bumped to 2.16.1 because 2.16.0 is on PyPI and Version Check requires the version to be ahead of it. There is no changelog entry, since nothing changes for CLI users; the next release with user-facing changes adds the 2.16.1 section.

Testing

  • uv run pytest: 1183 passed

  • uv build and twine check pass on the wheel and sdist

  • uvx pre-commit run --all-files runs the sync-version hook from a tool install

  • uv run --extra test pytest tests/unit: 730 passed

  • actionlint: no new findings (it still reports the existing $/ self-repo uses: syntax)

  • zizmor --offline .github/workflows/pr-preview.yml: no findings

@lelia
lelia requested a review from a team as a code owner December 5, 2026 02:22
@cursor

cursor Bot commented Dec 5, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Changes are mostly CI/docs, dependency hygiene, and a behavior-preserving refactor; no user-facing CLI behavior changes beyond the patch version bump.

Overview
Publish PR Preview no longer supports manual workflow_dispatch runs or inputs (publish_test_pypi, publish_docker, sdk_preview_version). TestPyPI and Docker previews are triggered only by the publish-preview and publish-docker-preview labels; applying both labels still runs two separate workflows. The Docker build step no longer passes SDK_PREVIEW_VERSION from CI (local Dockerfile.preview builds can still set it). Docs in CONTRIBUTING.md and docs/development.md reflect label-only previews, uv build instead of Hatch, and uv tool install pre-commit.

FOSSA compatibility: _build_metrics in fossa_compat.py now maps CVSS base metrics via a module-level _CVSS_METRIC_FIELDS table instead of inline props.get calls; output shape is unchanged.

Dependencies & release: Version is bumped to 2.16.1. hatch and pre-commit are removed from the dev extra and the [dependency-groups] block is dropped, shrinking uv.lock by removing virtualenv / filelock and related trees that were triggering advisory noise without being used by the CLI.

Reviewed by Cursor Bugbot for commit 282b7bd. Configure here.

@lelia
lelia temporarily deployed to socket-firewall December 5, 2026 02:23 — with GitHub Actions Inactive

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread CHANGELOG.md Resolved
@lelia
lelia force-pushed the fix/code-scanning-alerts branch from 0d0e97f to 0b7555c Compare December 5, 2026 04:18
@lelia lelia changed the title Resolve open code scanning alerts Tidy the PR preview workflow and FOSSA CVSS metrics Dec 5, 2026
@lelia
lelia temporarily deployed to socket-firewall December 5, 2026 04:18 — with GitHub Actions Inactive
@lelia

lelia commented Dec 5, 2026

Copy link
Copy Markdown
Contributor Author

bugbot run

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

@lelia
lelia force-pushed the fix/code-scanning-alerts branch from 0b7555c to e7ea402 Compare December 5, 2026 04:23
@lelia
lelia temporarily deployed to socket-firewall December 5, 2026 04:23 — with GitHub Actions Inactive
@lelia lelia changed the title Tidy the PR preview workflow and FOSSA CVSS metrics Tidy the PR preview workflow, FOSSA CVSS metrics, and dev dependencies Dec 5, 2026
@lelia lelia changed the title Tidy the PR preview workflow, FOSSA CVSS metrics, and dev dependencies PR workflow hygiene, FOSSA CVSS metrics, dev dependencies Dec 5, 2026
lelia added 2 commits December 5, 2026 01:29
Remove the manual dispatch trigger and its inputs from the PR preview
workflow. Previews are published from the publish-preview and
publish-docker-preview labels.

Read the FOSSA CVSS base metric prop keys from a table instead of
repeating an inline lookup per metric. The emitted metrics are unchanged.

Bump the version to 2.16.1.
Both depend on virtualenv, which brings filelock into uv.lock, so every
filelock advisory lands on this lockfile even though the CLI never
imports it. Neither needs to live in the project environment: CI
installs its own hatch through the setup-hatch action, `uv build` calls
the hatchling backend from build-system directly, and pre-commit builds
a separate environment for each hook.

Remove hatch and pre-commit from the dev extra, along with the
dependency group that held a second pre-commit requirement. The
contributor docs use `uv build` and install pre-commit as a uv tool.
@lelia
lelia force-pushed the fix/code-scanning-alerts branch from 9fb30b6 to 282b7bd Compare December 5, 2026 06:31
@lelia

lelia commented Dec 5, 2026

Copy link
Copy Markdown
Contributor Author

bugbot run

@lelia
lelia deployed to socket-firewall December 5, 2026 06:31 — with GitHub Actions Active
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedpypi/​hatchling@​1.28.0 ⏵ 1.33.096100100100100

View full report

@socket-security-staging

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedpypi/​hatchling@​1.28.0 ⏵ 1.33.096100100100100

View full report

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 282b7bd. Configure here.

This branch was successfully deployed

1 active deployment
socket-firewall — 282b7bd2 Deployed Dec 5, 2026 by lelia via python-sfw-smoke-enterprise #762
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.

1 participant