Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,39 @@ jobs:
if: matrix.python-version != '3.12'
run: uv run pytest -q

rhel8-security-install:
name: RHEL 8 security install
runs-on: ubuntu-latest
container: rockylinux/rockylinux:8.10
steps:
- name: Install container prerequisites
run: dnf install --assumeyes findutils git gzip tar
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: astral-sh/setup-uv@d31148d669074a8d0a63714ba94f3201e7020bc3 # v8.3.0
with:
version: "0.11.27"
- name: Verify the RHEL 8 glibc baseline
run: test "$(getconf GNU_LIBC_VERSION)" = "glibc 2.28"
- name: Build the wheel
run: uv build --wheel --python 3.12 --no-sources
- name: Install the wheel with the security extra
shell: bash
run: |
wheel="$(find "$PWD/dist" -maxdepth 1 -type f -name 'skillevaluator-*.whl' -print -quit)"
test -n "$wheel"
uv venv --python 3.12 .rhel8-security-venv
uv pip install --python .rhel8-security-venv/bin/python "${wheel}[security]"
- name: Smoke-test the Linux scanner pair
run: |
.rhel8-security-venv/bin/python - <<'PY'
from importlib.metadata import version

assert version("semgrep") == "1.157.0"
assert version("pip-audit") == "2.9.0"
PY
.rhel8-security-venv/bin/semgrep --version
.rhel8-security-venv/bin/pip-audit --version

package:
name: Package
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ All notable changes to Skill Evaluator are documented in this file.

### Fixed

- Security and full-feature installs now work on RHEL 8 and other glibc 2.28
Linux systems by selecting a compatible Semgrep and pip-audit pair, while
macOS and Windows retain the newer scanner release lines.
- Tier 2 content collection now prunes configured evaluation and version
artifact directories before enforcing the discovered-path limit, so excluded
generated results cannot cause false path-count failures.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ Gitleaks is required for a complete Tier 1 security result, Docker is required
for Tier 3 Docker mode, and live evaluation needs the selected agent CLI and
credentials.

Linux installs use scanner versions compatible with glibc 2.28, including
RHEL 8; see the [installation guide](docs/installation.mdx#linux-security-scanner-compatibility)
for the platform-specific dependency details.

Run the first offline check directly against your own skill — **no API key,
Docker, Gitleaks, or repository clone required**:

Expand Down
16 changes: 8 additions & 8 deletions config/oss_boundary_allowlist.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,63 +4,63 @@
{
"path": "tests/test_oss_packaging.py",
"rule": "internal-runtime-dependency",
"line": 125,
"line": 127,
"reason": "Negative dependency boundary assertion",
"expires": "2027-07-08",
"review_owner": "oss-release-reviewers"
},
{
"path": "tests/test_oss_packaging.py",
"rule": "internal-runtime-dependency",
"line": 126,
"line": 128,
"reason": "Negative dependency boundary assertion",
"expires": "2027-07-08",
"review_owner": "oss-release-reviewers"
},
{
"path": "tests/test_oss_packaging.py",
"rule": "internal-product-name",
"line": 127,
"line": 129,
"reason": "Negative product boundary assertion",
"expires": "2027-07-08",
"review_owner": "oss-release-reviewers"
},
{
"path": "tests/test_oss_packaging.py",
"rule": "internal-nvidia-credential",
"line": 133,
"line": 135,
"reason": "Negative credential boundary assertion",
"expires": "2027-07-08",
"review_owner": "oss-release-reviewers"
},
{
"path": "tests/test_oss_packaging.py",
"rule": "execution-service-integration",
"line": 134,
"line": 136,
"reason": "Negative execution boundary assertion",
"expires": "2027-07-08",
"review_owner": "oss-release-reviewers"
},
{
"path": "tests/test_oss_packaging.py",
"rule": "internal-runtime-dependency",
"line": 136,
"line": 138,
"reason": "Negative dependency boundary assertion",
"expires": "2027-07-08",
"review_owner": "oss-release-reviewers"
},
{
"path": "tests/test_oss_packaging.py",
"rule": "harbor-upload-integration",
"line": 381,
"line": 404,
"reason": "Negative upload boundary assertion",
"expires": "2027-07-08",
"review_owner": "oss-release-reviewers"
},
{
"path": "tests/test_oss_packaging.py",
"rule": "internal-nvidia-credential",
"line": 422,
"line": 445,
"reason": "Negative documentation boundary assertion",
"expires": "2027-07-08",
"review_owner": "oss-release-reviewers"
Expand Down
13 changes: 13 additions & 0 deletions docs/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,19 @@ immutable revision pinned in `pyproject.toml`. It is substantially larger than
the base install because Semgrep and SkillSpector bring their own dependency
stacks; use `all` only when Tier 2/Tier 3 and telemetry are also needed.

### Linux security scanner compatibility

The `security` and `all` extras support Linux systems with glibc 2.28, including
RHEL 8 and compatible enterprise distributions. Semgrep 1.158 and newer Linux
wheels require glibc 2.34 or later, so Linux installs use Semgrep 1.157, the
last compatible release. That Semgrep release requires `tomli<2.1`, so Linux
also uses pip-audit 2.9; pip-audit 2.10 and newer require `tomli>=2.2.1`.

Python environment markers cannot select dependencies by glibc version.
Consequently, this compatible scanner pair is used on all Linux systems.
macOS and Windows installs continue to resolve the newer Semgrep and pip-audit
release lines.

## Install from source

For development or an editable environment, clone the repository and let uv
Expand Down
12 changes: 10 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,17 @@ security = [
"bandit>=1.9.4",
# CVE-2026-45134 / BDSA-2026-10450 fixed floor.
"langchain-core>=1.4.9",
"pip-audit>=2.10.0",
# Semgrep 1.157 (the last release compatible with glibc 2.28) pins
# tomli<2.1, while pip-audit >=2.10 requires tomli>=2.2.1. Keep the two
# scanners on their compatible Linux pair; other platforms retain the
# established release baselines.
"pip-audit>=2.9.0,<2.10.0; sys_platform == 'linux'",
"pip-audit>=2.10.0; sys_platform != 'linux'",
"protobuf>=6.33.5",
"semgrep>=1.162.0",
# Semgrep >=1.158 Linux wheels require glibc >=2.34, while RHEL 8
# and compatible enterprise Linux distributions provide glibc 2.28.
"semgrep>=1.157.0,<1.158.0; sys_platform == 'linux'",
"semgrep>=1.162.0; sys_platform != 'linux'",
"skillspector @ git+https://github.com/NVIDIA/SkillSpector.git@ad55ceb60bcf38feb12227531c17b620c8b416af",
]
# Full public install convenience bundle.
Expand Down
39 changes: 37 additions & 2 deletions tests/test_oss_packaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
from pathlib import Path

from click.testing import CliRunner
from packaging.markers import default_environment
from packaging.requirements import Requirement
from packaging.utils import canonicalize_name
from packaging.version import Version

from skillevaluator.cli import cli
Expand Down Expand Up @@ -160,6 +162,25 @@ def test_security_extra_uses_pip_audit_without_bundling_safety() -> None:
assert "nltk" not in lock_names


def test_security_scanner_versions_support_rhel8_without_downgrading_other_platforms() -> None:
security = [Requirement(raw) for raw in _project()["project"]["optional-dependencies"]["security"]]

def active_specifiers(name: str, sys_platform: str) -> set[frozenset[str]]:
environment = default_environment()
environment["sys_platform"] = sys_platform
return {
frozenset(str(specifier) for specifier in requirement.specifier)
for requirement in security
if canonicalize_name(requirement.name) == canonicalize_name(name)
and (requirement.marker is None or requirement.marker.evaluate(environment))
}

assert active_specifiers("semgrep", "linux") == {frozenset({">=1.157.0", "<1.158.0"})}
assert active_specifiers("pip_audit", "linux") == {frozenset({">=2.9.0", "<2.10.0"})}
assert active_specifiers("semgrep", "darwin") == {frozenset({">=1.162.0"})}
assert active_specifiers("pip-audit", "darwin") == {frozenset({">=2.10.0"})}


def test_third_party_notices_do_not_list_removed_safety_dependency() -> None:
notices = (REPO_ROOT / "THIRD_PARTY_NOTICES.md").read_text(encoding="utf-8")

Expand All @@ -172,8 +193,10 @@ def test_release_lock_avoids_accidental_prereleases_and_known_fixed_versions() -
versions = {package["name"]: Version(package["version"]) for package in lock["package"]}

assert "prerelease" not in project.get("tool", {}).get("uv", {})
for package in ("numpy", "pydantic", "wrapt"):
assert versions[package].is_prerelease is False
prerelease_guarded = {"cyclonedx-python-lib", "numpy", "pydantic", "wrapt"}
for package in lock["package"]:
if package["name"] in prerelease_guarded:
assert Version(package["version"]).is_prerelease is False
assert versions["cryptography"] >= Version("48.0.1")
assert versions["msgpack"] >= Version("1.2.1")
assert versions["pydantic-settings"] >= Version("2.14.2")
Expand Down Expand Up @@ -452,3 +475,15 @@ def test_security_extra_enforces_patched_langchain_core() -> None:

assert "langchain-core>=1.4.9" in project["project"]["optional-dependencies"]["security"]
assert versions["langchain-core"] >= Version("1.4.9")


def test_ci_installs_the_security_wheel_on_rhel8() -> None:
workflow = (REPO_ROOT / ".github" / "workflows" / "ci.yml").read_text(encoding="utf-8")
rhel8_job = workflow.split(" rhel8-security-install:\n", 1)[1].split("\n package:\n", 1)[0]

assert "container: rockylinux/rockylinux:8.10" in rhel8_job
assert 'getconf GNU_LIBC_VERSION)" = "glibc 2.28"' in rhel8_job
assert "uv build --wheel --python 3.12 --no-sources" in rhel8_job
assert '"${wheel}[security]"' in rhel8_job
assert 'version("semgrep") == "1.157.0"' in rhel8_job
assert 'version("pip-audit") == "2.9.0"' in rhel8_job
Loading
Loading