Scan dependencies for known vulnerabilities and licenses.
Overall
score
61%
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.
Install with Tessl CLI
npx tessl i tessl/pypi-safetydocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10