Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: greenbone/pontos
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v25.3.1
Choose a base ref
...
head repository: greenbone/pontos
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v25.3.2
Choose a head ref
  • 3 commits
  • 4 files changed
  • 2 contributors

Commits on Mar 6, 2025

  1. Automatic adjustments after release [skip ci]

    * Update to version 25.3.2.dev1
    greenbonebot committed Mar 6, 2025
    Copy the full SHA
    9b5f3e4 View commit details

Commits on Mar 7, 2025

  1. Change: adding wildcard support to CPE Part; unrequire product, vendor (

    #1099)
    
    * Change: adding wildcard support to CPE Part; unrequire product
    
    * Change: unrequire vendor
    y0urself authored Mar 7, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    2926d37 View commit details
  2. Automatic release to 25.3.2

    greenbonebot committed Mar 7, 2025
    Copy the full SHA
    859e154 View commit details
Showing with 23 additions and 6 deletions.
  1. +5 −4 pontos/cpe/_cpe.py
  2. +1 −1 pontos/version/__version__.py
  3. +1 −1 pyproject.toml
  4. +16 −0 tests/cpe/test_cpe.py
9 changes: 5 additions & 4 deletions pontos/cpe/_cpe.py
Original file line number Diff line number Diff line change
@@ -36,6 +36,7 @@ class Part(StrEnum):
APPLICATION = "a"
OPERATING_SYSTEM = "o"
HARDWARE_DEVICE = "h"
WILDCARD = "*" # wildcard for requesting "all" possible cpe parts


def is_uri_binding(cpe: str) -> bool:
@@ -427,8 +428,8 @@ class CPEWellFormed:
"""

part: Part
vendor: str
product: str
vendor: Optional[str] = None
product: Optional[str] = None
version: Optional[str] = None
update: Optional[str] = None
edition: Optional[str] = None
@@ -495,8 +496,8 @@ def __init__(
*,
cpe_string: Optional[str] = None,
part: Part,
vendor: str,
product: str,
vendor: Optional[str] = None,
product: Optional[str] = None,
version: Optional[str] = None,
update: Optional[str] = None,
edition: Optional[str] = None,
2 changes: 1 addition & 1 deletion pontos/version/__version__.py
Original file line number Diff line number Diff line change
@@ -2,4 +2,4 @@

# THIS IS AN AUTOGENERATED FILE. DO NOT TOUCH!

__version__ = "25.3.1"
__version__ = "25.3.2"
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pontos"
version = "25.3.1"
version = "25.3.2"
description = "Common utilities and tools maintained by Greenbone Networks"
authors = ["Greenbone AG <info@greenbone.net>"]
license = "GPL-3.0-or-later"
16 changes: 16 additions & 0 deletions tests/cpe/test_cpe.py
Original file line number Diff line number Diff line change
@@ -456,6 +456,22 @@ def test_uri_unbind_examples(self):
self.assertIsNone(cpe.target_hw)
self.assertIsNone(cpe.other)

# example 7a
cpe = CPE.from_string("cpe:2.3:*:Microsoft")
self.assertFalse(cpe.is_uri_binding())
self.assertTrue(cpe.is_formatted_string_binding())
self.assertEqual(cpe.part, Part.WILDCARD)
self.assertEqual(cpe.vendor, "microsoft")
self.assertIsNone(cpe.product)
self.assertIsNone(cpe.version)
self.assertIsNone(cpe.update)
self.assertIsNone(cpe.language)
self.assertIsNone(cpe.edition)
self.assertIsNone(cpe.sw_edition)
self.assertIsNone(cpe.target_sw)
self.assertIsNone(cpe.target_hw)
self.assertIsNone(cpe.other)

# example 8
with self.assertRaisesRegex(
CPEParsingError,