tessl install tessl/pypi-safety@3.6.0Scan dependencies for known vulnerabilities and licenses.
Agent Success
Agent success rate when using this tile
61%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.39x
Baseline
Agent success rate without this tile
44%
Build a Python application that scans Python project dependencies for known security vulnerabilities and generates a structured report.
Your application should:
@generates
def scan_dependencies(requirements_file: str) -> dict:
"""
Scans a requirements file for vulnerabilities.
Args:
requirements_file: Path to the requirements file to scan
Returns:
A dictionary containing:
- 'vulnerability_count': int - Total number of vulnerabilities found
- 'vulnerable_packages': list - List of dicts with package details
- 'scan_timestamp': str - ISO timestamp of when scan was performed
Raises:
FileNotFoundError: If the requirements file doesn't exist
ValueError: If the requirements file format is invalid
"""
pass
def format_report(scan_results: dict) -> str:
"""
Formats scan results as a JSON string.
Args:
scan_results: Dictionary returned from scan_dependencies()
Returns:
JSON-formatted string of the scan results
"""
passProvides vulnerability scanning capabilities for Python dependencies.
@satisfied-by