Skip to content

fix: support RHEL 8 security installs - #16

Merged
rng1995 merged 2 commits into
mainfrom
fix/rhel8-security-install
Jul 18, 2026
Merged

rng1995 merged 2 commits into
mainfrom
fix/rhel8-security-install

Conversation

@rng1995

@rng1995 rng1995 commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Restore security and all extra installation on RHEL 8 and other Linux systems that provide glibc 2.28.
  • Keep the established newer Semgrep and pip-audit release lines on macOS and Windows.
  • Add release-artifact CI coverage on Rocky Linux 8.10, focused packaging regressions, public documentation, and an Unreleased changelog entry.

User-visible behavior

The documented full installation now succeeds on glibc 2.28 Linux hosts instead of failing while resolving or building Semgrep. Base installations remain unchanged because the affected scanners are confined to the optional security extra, which is also included by all.

Linux users receive the compatible scanner pair:

  • Semgrep >=1.157.0,<1.158.0
  • pip-audit >=2.9.0,<2.10.0

Non-Linux users retain the existing baselines:

  • Semgrep >=1.162.0
  • pip-audit >=2.10.0

Problem and root cause

Semgrep 1.158 and newer changed their Linux binary distribution to require a newer glibc. The current public lock resolves Semgrep 1.168 to a manylinux_2_34 wheel, which cannot be installed on RHEL 8's glibc 2.28 runtime.

The last compatible Semgrep release is 1.157.0, but that release constrains tomli<2.1. pip-audit 2.10 and newer require tomli>=2.2.1, so simply downgrading Semgrep leaves the security extra unsatisfiable. The Linux dependency pair must therefore move together.

Python environment markers expose sys_platform but not the host glibc version. To preserve RHEL 8 portability, the compatible pair applies to all Linux environments; macOS and Windows continue to resolve the newer lines.

Implementation details

Dependency metadata

  • Split Semgrep and pip-audit requirements inside the public security extra using complementary sys_platform markers.
  • Kept the base package and all other extras unchanged.
  • Documented the upstream glibc and tomli constraints next to the requirements.

Lockfile

  • Regenerated uv.lock with the same uv version used by CI (0.11.27).
  • Added Linux-specific resolutions for Semgrep 1.157.0, pip-audit 2.9.0, tomli 2.0.2, and their compatible transitive dependencies.
  • Preserved Semgrep 1.168.0, pip-audit 2.10.1, and the newer transitive stack on non-Linux platforms.
  • Resolved stable cyclonedx-python-lib 9.1.0 on Linux; no release candidate is introduced.

Regression coverage

  • Added marker-evaluation tests for Linux and macOS scanner constraints.
  • Canonicalized distribution names in the test helper so underscore/hyphen variants are handled consistently.
  • Strengthened the prerelease guard to inspect every locked CycloneDX entry, including platform-split packages.
  • Updated line-specific OSS boundary allowlist entries shifted by the new tests.

CI coverage

Added a Rocky Linux 8.10 job that:

  1. Verifies the container is actually running glibc 2.28.
  2. Builds the release wheel with --no-sources.
  3. Installs that wheel with the security extra into an isolated environment.
  4. Asserts the installed Semgrep and pip-audit versions.
  5. Executes both scanner entry points.

This validates the published artifact path rather than only an editable source environment.

Documentation and release notes

  • Documented why Linux uses the compatibility pair and why newer releases remain active elsewhere.
  • Linked the compatibility guidance from the README quickstart.
  • Added an Unreleased changelog entry for the installation fix.

Verification

Focused validation completed on a glibc 2.28 host:

  • uv lock --check with uv 0.11.27
  • 31 passed in tests/test_oss_packaging.py
  • OSS source-boundary scan passed
  • Ruff checks passed
  • make lint PYTHON=.venv/bin/python
  • make build PYTHON=.venv/bin/python
  • Built-wheel installation with [security] succeeded
  • Installed versions: Semgrep 1.157.0, pip-audit 2.9.0, CycloneDX 9.1.0
  • Semgrep scanned a Python smoke target successfully

The broad local make test run is not marked complete: this RHEL 8/NFS workspace does not provide the canonical Docker/filesystem environment used by several Harbor tests. The focused packaging suite passes, and GitHub CI will run the full canonical matrix.

PR checklist

  • I am familiar with the Contributing Guidelines
  • Added or updated focused tests
  • Updated documentation for user-visible changes
  • Ran make lint
  • Ran make test (focused suite passed; canonical full suite runs in CI)
  • Ran make build
  • Did not add credentials, private datasets, or proprietary benchmark content

Release impact

  • No user-visible release note needed
  • Updated CHANGELOG.md

Risks and trade-offs

  • All Linux systems receive the older scanner pair because standard Python markers cannot distinguish glibc versions. This is intentional to preserve the documented portable installation path.
  • Scanner behavior can differ from the newer non-Linux releases. The dependency comments, documentation, tests, and CI job make that divergence explicit.
  • Base installs are unaffected; only security and bundles that include it change.
  • The Linux pins can be removed when the minimum supported Linux baseline moves to glibc 2.34 or upstream Semgrep publishes a newer wheel compatible with glibc 2.28.

@rng1995
rng1995 merged commit 84bc44b into main Jul 18, 2026
11 checks passed
@chrisknvidia
chrisknvidia deleted the fix/rhel8-security-install branch August 1, 2026 03:01
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