Graph-Native Infrastructure for Context and Accountable AI Systems
Python agent-memoryaiai-governanceai-infrastructureartificial-intelligencecontext-engineeringcontext-graphsdata-engineeringdecision-intelligencedeveloper-toolsexplainable-aigenerative-aigraph-ragknowledge-graphllmontologyprovenancepythonreasoningsemantic-search
fix(security): address review feedback on ReDoS and URL pattern fixes
KaifAhmad10365712a8b98
diff --git a/semantica/ingest/email_ingestor.py b/semantica/ingest/email_ingestor.pyindex 0f16d9df..0b453def 100644--- a/semantica/ingest/email_ingestor.py+++ b/semantica/ingest/email_ingestor.py@@ -392,7 +392,7 @@ class EmailParser:# Extract URLs from text using regeximport re- url_pattern = r"https?://(?:[a-zA-Z0-9]|[$\-_.&+!*(),]|(?:%[0-9a-fA-F]{2}))+"+ url_pattern = r"https?://(?:[a-zA-Z0-9\-._~!$&'()*+,;=:@/?#\[\]]|%[0-9a-fA-F]{2})+"text_links = re.findall(url_pattern, email_content)links.extend(text_links)diff --git a/semantica/ontology/naming_conventions.py b/semantica/ontology/naming_conventions.pyindex 2d4e0e39..51a0d462 100644--- a/semantica/ontology/naming_conventions.py+++ b/semantica/ontology/naming_conventions.py@@ -350,7 +350,7 @@ class NamingConventions:def _is_noun_phrase(self, name: str) -> bool:"""Check if name is a noun phrase (basic heuristic)."""# Basic heuristic: PascalCase words are typically nouns- return bool(re.match(r"^[A-Z][a-zA-Z0-9]*(?:[A-Z][a-zA-Z0-9]*)*$", name))+ return bool(name and name[0].isupper() and re.match(r"^[A-Za-z0-9]+$", name))def _is_verb_phrase(self, name: str) -> bool:"""Check if name is a verb phrase (basic heuristic)."""