Spaces:
Sleeping
Sleeping
Download src/models.py from Waseem-k/Secure_IaC: direct link, hf CLI and curl.
- Browser
- Download file 831 Bytes
-
https://huggingface.co/spaces/Waseem-k/Secure_IaC/resolve/main/src/models.py
- Command line
-
hf download hf://spaces/Waseem-k/Secure_IaC/src/models.py
-
curl -L -o models.py https://huggingface.co/spaces/Waseem-k/Secure_IaC/resolve/main/src/models.py
831 Bytes
| """ | |
| Data models for IaC Security Policy Generator | |
| """ | |
| from dataclasses import dataclass | |
| from typing import List, Optional | |
| class SecurityVulnerability: | |
| """Data class for security vulnerabilities""" | |
| title: str | |
| severity: str | |
| description: str | |
| line_number: Optional[int] | |
| context: Optional[str] | |
| recommendation: str | |
| fix_example: Optional[str] | |
| rule_id: str | |
| category: str | |
| cwe_id: Optional[str] = None | |
| cvss_score: Optional[float] = None | |
| class SecurityRule: | |
| """Data class for security rules""" | |
| rule_id: str | |
| title: str | |
| severity: str | |
| patterns: List[str] | |
| description: str | |
| recommendation: str | |
| fix_example: Optional[str] | |
| category: str | |
| cwe_id: Optional[str] = None | |
| cvss_score: Optional[float] = None |