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-7/

Python Environment Vulnerability Reporter

A utility that scans Python environments for security vulnerabilities and generates summary reports.

Capabilities

Scan Python environments

  • When given specific directory paths, the scanner checks those directories for installed Python packages and their vulnerabilities @test
  • When no paths are provided, the scanner performs a system-wide scan across all Python environments @test

Generate summary reports

  • The scanner produces a dictionary report with total packages scanned and total vulnerabilities found @test
  • The report can be formatted as a JSON string for easy integration @test

Implementation

@generates

API

def scan_environments(target_paths=None):
    """
    Scans Python environments for vulnerabilities.

    Args:
        target_paths (list, optional): List of directory paths to scan.
                                      If None, performs system-wide scan.

    Returns:
        dict: A report containing vulnerability information with keys:
              - 'total_packages': int
              - 'total_vulnerabilities': int
              - 'vulnerabilities_by_severity': dict mapping severity to count
    """
    pass

def format_report_json(report):
    """
    Formats the vulnerability report as a JSON string.

    Args:
        report (dict): The vulnerability report from scan_environments

    Returns:
        str: JSON-formatted report string
    """
    pass

Dependencies { .dependencies }

safety { .dependency }

Provides Python dependency vulnerability scanning functionality.

@satisfied-by

Install with Tessl CLI

npx tessl i tessl/pypi-safety

tile.json