diff --git a/pyproject.toml b/pyproject.toml index b7d6513..03af13b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "hatchling.build" [project] name = "socketsecurity" -version = "2.0.36" +version = "2.0.38" requires-python = ">= 3.10" license = {"file" = "LICENSE"} dependencies = [ @@ -16,7 +16,7 @@ dependencies = [ 'GitPython', 'packaging', 'python-dotenv', - 'socket-sdk-python>=2.0.15' + 'socket-sdk-python>=2.0.20' ] readme = "README.md" description = "Socket Security CLI for CI/CD" diff --git a/scripts/build_container.sh b/scripts/build_container.sh index 6e19511..f268246 100755 --- a/scripts/build_container.sh +++ b/scripts/build_container.sh @@ -32,20 +32,20 @@ fi if [ $ENABLE_PYPI_BUILD = "pypi-build=prod" ]; then echo "Doing production build" - if ! python -m build --wheel --sdist; then - echo "Build failed" - exit 1 - fi - - if ! twine upload dist/*$VERSION*; then - echo "Upload to PyPI failed" - exit 1 - fi - - if ! verify_package $VERSION "https://pypi.org/simple"; then - echo "Failed to verify package on PyPI" - exit 1 - fi +# if ! python -m build --wheel --sdist; then +# echo "Build failed" +# exit 1 +# fi +# +# if ! twine upload dist/*$VERSION*; then +# echo "Upload to PyPI failed" +# exit 1 +# fi +# +# if ! verify_package $VERSION "https://pypi.org/simple"; then +# echo "Failed to verify package on PyPI" +# exit 1 +# fi docker build --no-cache --build-arg CLI_VERSION=$VERSION --platform linux/amd64,linux/arm64 -t socketdev/cli:$VERSION . \ && docker build --no-cache --build-arg CLI_VERSION=$VERSION --platform linux/amd64,linux/arm64 -t socketdev/cli:latest . \ diff --git a/socketsecurity/__init__.py b/socketsecurity/__init__.py index 46d0887..ef8d284 100644 --- a/socketsecurity/__init__.py +++ b/socketsecurity/__init__.py @@ -1,3 +1,3 @@ __author__ = 'socket.dev' -__version__ = '2.0.36' +__version__ = '2.0.38' diff --git a/socketsecurity/config.py b/socketsecurity/config.py index 79b0031..2d3aece 100644 --- a/socketsecurity/config.py +++ b/socketsecurity/config.py @@ -2,8 +2,7 @@ import os from dataclasses import asdict, dataclass from typing import List, Optional -from socketdev import __version__ - +from socketsecurity import __version__ from socketdev import INTEGRATION_TYPES, IntegrationType diff --git a/socketsecurity/core/__init__.py b/socketsecurity/core/__init__.py index 4be798a..81cab93 100644 --- a/socketsecurity/core/__init__.py +++ b/socketsecurity/core/__init__.py @@ -736,6 +736,8 @@ def get_source_data(package: Package, packages: dict) -> list: source = ("direct", manifests) introduced_by.append(source) else: + if not package.topLevelAncestors: + return introduced_by for top_id in package.topLevelAncestors: top_package = packages.get(top_id) if top_package: diff --git a/socketsecurity/core/socket_config.py b/socketsecurity/core/socket_config.py index f05a382..f119d4b 100644 --- a/socketsecurity/core/socket_config.py +++ b/socketsecurity/core/socket_config.py @@ -5,6 +5,7 @@ import os from socketsecurity.core.issues import AllIssues +from socketsecurity import __version__ default_exclude_dirs = { @@ -27,6 +28,7 @@ class SocketConfig: security_policy: Dict = None all_issues: Optional['AllIssues'] = None excluded_dirs: Set[str] = field(default_factory=lambda: default_exclude_dirs) + version: str = __version__ def __post_init__(self): """Validate configuration after initialization""" diff --git a/socketsecurity/socketcli.py b/socketsecurity/socketcli.py index 612ad1e..c471bc1 100644 --- a/socketsecurity/socketcli.py +++ b/socketsecurity/socketcli.py @@ -45,6 +45,7 @@ def cli(): def main_code(): config = CliConfig.from_args() + log.info(f"Starting Socket Security CLI version {config.version}") log.debug(f"config: {config.to_dict()}") output_handler = OutputHandler(config)