Skip to main content
Redhat Developers  Logo
  • Products

    Platforms

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat AI
      Red Hat AI
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • See all Red Hat products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat Developer Hub
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat OpenShift Local
    • Red Hat Developer Sandbox

      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Red Hat OpenShift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • See all technologies
    • Programming languages & frameworks

      • Java
      • Python
      • JavaScript
    • System design & architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer experience

      • Productivity
      • Tools
      • GitOps
    • Automated data processing

      • AI/ML
      • Data science
      • Apache Kafka on Kubernetes
    • Platform engineering

      • DevOps
      • DevSecOps
      • Red Hat Ansible Automation Platform for applications and services
    • Secure development & architectures

      • Security
      • Secure coding
  • Learn

    Featured

    • Kubernetes & cloud native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • AI/ML
      AI/ML Icon
    • See all learning resources

    E-books

    • GitOps cookbook
    • Podman in action
    • Kubernetes operators
    • The path to GitOps
    • See all e-books

    Cheat sheets

    • Linux commands
    • Bash commands
    • Git
    • systemd commands
    • See all cheat sheets

    Documentation

    • Product documentation
    • API catalog
    • Legacy documentation
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore the Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

How to reduce false positives in security scans

December 15, 2025
Miro Hrončok
Related topics:
LinuxPythonSecurity
Related products:
Red Hat Enterprise Linux

    If you've ever run a security scanner on a containerized Python application built on Fedora or Red Hat Enterprise Linux (RHEL), you might have encountered a frustrating problem: the scanner flags your setuptools or pip installation as vulnerable to a CVE that's already been patched in your RPM package. The problem? Security scanners typically only see the upstream Python package version number, not the fact that you're running a backported, security-patched version from your distribution.

    We're experimenting with a solution to this problem in Fedora Rawhide, and we'd like your feedback.

    The problem

    Version numbers don't tell the whole story. In stable Fedora releases and RHEL, the versions of setuptools and pip are often relatively old compared to upstream. However, these packages include backported security fixes. When you create a Python virtual environment in a container, security scanning tools see the version number and flag it as vulnerable—even though the actual code contains the necessary patches.

    For example, a scanner might detect setuptools 65.5.1 and flag it as vulnerable to CVE-2024-6345, without realizing that the RPM package python3.11-setuptools-65.5.1-3.el9 has already mitigated that vulnerability.

    The solution

    We're now including the Software Bill of Materials (SBOM) information directly in Python wheels packaged as RPMs in Fedora Rawhide. The SBOM data is injected into the wheels when we build them in our rpmbuild infrastructure. This metadata allows security scanners and other tools to identify that a Python package was installed from a specific Fedora or RHEL RPM-packaged wheel, complete with version and release information.

    Here's what that looks like in practice. Without SBOM, a scanner sees the following:

    $ cat /opt/app-root/lib/python3.11/site-packages/setuptools-65.5.1.dist-info/METADATA | grep Name -A1
    Name: setuptools
    Version: 65.5.1

    With SBOM included, the scanner could also read as follows:

    $ cat /opt/app-root/lib/python3.11/site-packages/setuptools-65.5.1.dist-info/sboms/bom.json 
    {
      "bomFormat": "CycloneDX",
      "specVersion": "1.6",
      "components": [
        {
          "type": "library",
          "name": "python3.11-setuptools",
          "version": "65.5.1-3.el9",
          "purl": "pkg:rpm/redhat/python3.11-setuptools@65.5.1-3.el9?arch=src"
        }
      ]
    }

    The key is the purl (package URL) field, which provides a standardized way to identify the package as originating from a specific RPM. Security scanners can use this information to check CVE databases and see that python3.11-setuptools-65.5.1-3.el9 is not vulnerable, even though upstream setuptools 65.5.1 might be.

    Note: The previous RHEL example is hypothetical. This feature is not yet available in RHEL and exists only in Fedora Rawhide as a technological preview.

    Try it in Fedora Rawhide

    This feature is currently available as a technology preview in Fedora Rawhide (the development version of Fedora) and is subject to change. Right now, we're only packaging wheels for pip and setuptools—the minimal set needed to create Python virtual environments.

    You can test it using a Fedora Rawhide container:

    $ podman run --rm -ti fedora:rawhide
    bash-5.3# dnf install python3.11
    ...
    bash-5.3# python3.11 -m venv venv
    bash-5.3# cat venv/lib/python3.11/site-packages/setuptools-80.9.0.dist-info/sboms/bom.json 
    {
      "bomFormat": "CycloneDX",
      "specVersion": "1.6",
      "components": [
        {
          "type": "library",
          "name": "python-setuptools",
          "version": "80.9.0-1.fc44",
          "purl": "pkg:rpm/fedora/python-setuptools@80.9.0-1.fc44?arch=src"
        }
      ]
    }

    This works the same way with other Python versions.

    The SBOM data is included according to PEP 770, which defines a standard location for SBOM information in Python packages. We're currently using the CycloneDX SBOM format, though this choice isn't set in stone. It was selected as a quick proof of concept rather than after an exhaustive analysis of all available SBOM standards.

    We welcome your feedback

    We're sharing this technology preview to raise awareness and gather feedback from the developer community, particularly from security scanner vendors and tool maintainers. If you're interested in seeing this feature in a future RHEL release, have concerns about the approach, or want to test integration with your scanning tools, we'd love to hear from you.

    You can start a public discussion on the Fedora Python mailing list or reach us privately at python-maint@redhat.com. Your feedback will help us determine priorities and shape the future direction of this feature. Give it a try and let us know what you think!

    Related Posts

    • Python 3.9 reaches end of life: What it means for RHEL users

    • How to implement observability with Python and Llama Stack

    • How RHEL provides secure and stable Python streams

    • Containerize Node.js applications at the edge on RHEL and Fedora

    Recent Posts

    • How to reduce false positives in security scans

    • Set up FSx for NetApp ONTAP on Red Hat OpenShift Service on AWS

    • Optimizing cloud development environment storage: FSx for ONTAP

    • Run privileged commands more securely in OpenShift Dev Spaces

    • Advanced authentication and authorization for MCP Gateway

    What’s up next?

    Learning Path Python Flask App learning path feature image

    Build a bootable Python Flask application using image mode for RHEL with Podman...

    Use Podman Desktop to create a bootable Flask-based application using image...
    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer tools
    • Interactive tutorials
    • API catalog

    Quicklinks

    • Learning resources
    • E-books
    • Cheat sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site status dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2025 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Report a website issue