Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/improved categories #37

Merged
merged 19 commits into from
Jul 14, 2024
Merged
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
b3aee47
feat: first category draft
KaiserRuben Jun 27, 2024
3c68f11
Enum Renaming (vulnerability-reporting): Replaced enums to provide mo…
KaiserRuben Jun 28, 2024
f7b0796
refactor: added todos and newlines
KaiserRuben Jun 28, 2024
0c01fa4
Merge branch 'refs/heads/main' into feat/improved_categories
KaiserRuben Jul 4, 2024
034d9bb
feat: category class with str and to_dict
KaiserRuben Jul 4, 2024
8ac897a
feat: adapted class for new category (scheme), removed unused Finding…
KaiserRuben Jul 4, 2024
3590442
feat(LLM service): classify_kind now takes field_name and options par…
KaiserRuben Jul 4, 2024
d59d97f
feat(findings): Improved classification & recommendation logic: Added…
KaiserRuben Jul 4, 2024
9f77adc
feat: Added {field_name} placeholder to classify templates for more f…
KaiserRuben Jul 4, 2024
59b0eb0
feat(Categories.py in src/data/): Enhance categorization with new sec…
KaiserRuben Jul 13, 2024
687d07c
Merge branch 'refs/heads/main' into feat/improved_categories
KaiserRuben Jul 13, 2024
f36cef1
fix(Environment): Removed unnecessary Ω symbol
KaiserRuben Jul 13, 2024
fa65c97
feat(Finding): Introducing support for unsupervised clustering
KaiserRuben Jul 13, 2024
4caed98
feat(unsupervised clustering): Added to notebooks
KaiserRuben Jul 13, 2024
dda0835
fix: removed unused import
KaiserRuben Jul 14, 2024
75e5c32
feat: Added 'category' field to Finding model
KaiserRuben Jul 14, 2024
f40fbce
feat: Added sentence_transformers, kneed, and scikit-learn to enable …
KaiserRuben Jul 14, 2024
5b0effd
feat: Added plotly to requirements.txt
KaiserRuben Jul 14, 2024
fb373f9
feat: Added pandas to requirements.txt
KaiserRuben Jul 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Enum Renaming (vulnerability-reporting): Replaced enums to provide mo…
…re descriptive categories for vulnerabilities, improving the clarity and ease of use of the system.
KaiserRuben committed Jun 28, 2024

Verified

This commit was signed with the committer’s verified signature. The key has expired.
KaiserRuben Ruben Kaiser
commit 3c68f111f352a744c715b61c22b30e8259ee506c
74 changes: 40 additions & 34 deletions src/data/Categories.py
Original file line number Diff line number Diff line change
@@ -2,46 +2,52 @@
from typing import List, Optional
from pydantic import BaseModel, Field


class VulnerabilityType(Enum):
INJECTION = "Injection"
BROKEN_AUTHENTICATION = "Broken Authentication"
SENSITIVE_DATA_EXPOSURE = "Sensitive Data Exposure"
XML_EXTERNAL_ENTITIES = "XML External Entities (XXE)"
BROKEN_ACCESS_CONTROL = "Broken Access Control"
SECURITY_MISCONFIGURATION = "Security Misconfiguration"
CROSS_SITE_SCRIPTING = "Cross-Site Scripting (XSS)"
INSECURE_DESERIALIZATION = "Insecure Deserialization"
USING_COMPONENTS_WITH_KNOWN_VULNERABILITIES = "Using Components with Known Vulnerabilities"
INSUFFICIENT_LOGGING_AND_MONITORING = "Insufficient Logging & Monitoring"


class AffectedComponent(Enum):
FRONTEND = "Frontend"
BACKEND = "Backend"
DATABASE = "Database"
API = "API"
AUTHENTICATION_SERVICE = "Authentication Service"
THIRD_PARTY_SERVICE = "Third-Party Service"
NETWORK = "Network"
CONFIGURATION = "Configuration"


class ImpactLevel(Enum):
class TechnologyStack(Enum):
JAVASCRIPT = "JavaScript"
PYTHON = "Python"
JAVA = "Java"
DOTNET = "DotNet"
SQL = "SQL"
NOSQL = "NoSQL"
CLOUD = "Cloud"
ON_PREMISE = "OnPremise"

class SecurityAspect(Enum):
AUTHENTICATION = "Authentication"
AUTHORIZATION = "Authorization"
DATA_ENCRYPTION = "DataEncryption"
INPUT_VALIDATION = "InputValidation"
XSS = "CrossSiteScripting"
SQL_INJECTION = "SQLInjection"

class SeverityLevel(Enum):
CRITICAL = "Critical"
HIGH = "High"
MEDIUM = "Medium"
LOW = "Low"

class RemediationType(Enum):
CODE_FIX = "CodeFix"
CONFIGURATION_CHANGE = "ConfigurationChange"
DEPENDENCY_UPDATE = "DependencyUpdate"
ARCHITECTURE_CHANGE = "ArchitectureChange"

class RemediationComplexity(Enum):
SIMPLE = "Simple"
MODERATE = "Moderate"
COMPLEX = "Complex"
class AffectedComponent(Enum):
USER_INTERFACE = "UserInterface"
API = "API"
DATABASE = "Database"
NETWORK = "Network"
THIRD_PARTY_INTEGRATION = "ThirdPartyIntegration"

class Compliance(Enum):
GDPR = "GDPR"
PCI_DSS = "PCI_DSS"
HIPAA = "HIPAA"

class Category(BaseModel):
vulnerability_type: List[VulnerabilityType] = Field(default_factory=list)
affected_components: List[AffectedComponent] = Field(default_factory=list)
impact_level: Optional[ImpactLevel] = None
remediation_complexity: Optional[RemediationComplexity] = None
technology_stack: Optional[List[TechnologyStack]] = Field(default_factory=list)
security_aspect: Optional[List[SecurityAspect]] = Field(default_factory=list)
severity_level: Optional[SeverityLevel] = None
remediation_type: Optional[List[RemediationType]] = Field(default_factory=list)
affected_component: Optional[List[AffectedComponent]] = Field(default_factory=list)
compliance: Optional[List[Compliance]] = Field(default_factory=list)