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%
A Python module that manages security policies for dependency scanning, including policy file generation, validation, and loading with proper configuration handling.
Build a module that provides policy management functionality for a security scanning tool. The module should generate policy configuration files, validate policy structures, and load policies from files with proper error handling.
@generates
def generate_policy_file(output_path: str, include_defaults: bool = True) -> None:
"""
Generate a policy configuration file with security settings.
Args:
output_path: Path where the policy file should be written
include_defaults: Whether to include default security settings
"""
pass
def validate_policy_file(policy_path: str) -> dict:
"""
Validate the structure and contents of a policy file.
Args:
policy_path: Path to the policy file to validate
Returns:
dict with 'valid' (bool) and 'errors' (list) keys
"""
pass
def load_policy_file(policy_path: str) -> dict:
"""
Load and parse a policy configuration file.
Args:
policy_path: Path to the policy file
Returns:
dict containing the parsed policy configuration
Raises:
FileNotFoundError: If the policy file doesn't exist
ValueError: If the policy file is invalid
"""
passProvides vulnerability scanning and policy management capabilities for Python dependencies.