CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-safety

Scan dependencies for known vulnerabilities and licenses.

Overall
score

61%

Overview
Eval results
Files

task.mdevals/scenario-8/

Package Manager Safety Wrapper

A command-line utility that integrates security scanning into package management workflows by wrapping package manager commands.

Capabilities

Firewall setup

  • The script installs security scanning interceptors for pip when called with setup mode @test
  • The script installs security scanning interceptors for multiple package managers (pip and poetry) when specified @test

Firewall removal

  • The script removes all installed security scanning interceptors when called with cleanup mode @test

Error handling

  • The script displays a clear error message if the safety package is not installed @test
  • The script handles cases where the shell configuration cannot be modified @test

Implementation

@generates

API

"""
Command-line utility for managing package manager security scanning integration.

This script provides commands to set up and tear down security scanning
interceptors for package managers like pip and poetry.
"""

def setup_firewall(tools: list[str]) -> None:
    """
    Install security scanning interceptors for specified package managers.

    Args:
        tools: List of package manager names to wrap (e.g., ['pip', 'poetry'])

    Raises:
        RuntimeError: If safety package is not available
        PermissionError: If shell configuration files cannot be modified
    """
    pass

def remove_firewall() -> None:
    """
    Remove all installed security scanning interceptors.

    Raises:
        RuntimeError: If safety package is not available
    """
    pass

def main() -> None:
    """
    Main entry point that parses command-line arguments and executes
    the appropriate firewall management command.

    Usage:
        python wrapper.py setup --tools pip poetry
        python wrapper.py remove
    """
    pass

if __name__ == "__main__":
    main()

Dependencies { .dependencies }

safety { .dependency }

Provides vulnerability scanning and package manager interception capabilities.

Install with Tessl CLI

npx tessl i tessl/pypi-safety

tile.json