feat: [Bezalel Epic-006] Sovereign Forge — Full Autonomy on a 2GB RAM VPS Without Cloud Inference (#168)
Refs #168 Agent: groq
This commit is contained in:
@@ -288,6 +288,25 @@ def main() -> int:
|
||||
# Scan both full staged file contents and the diff content
|
||||
findings = scan_files(staged_files, get_file_content_at_staged)
|
||||
|
||||
# Scan for cloud API usage patterns in staged files
|
||||
CLOUD_API_PATTERNS = [
|
||||
r"openai\.",
|
||||
r"anthropic\.",
|
||||
r"groq\.",
|
||||
r"requests\.",
|
||||
r"httpx\.",
|
||||
r"aiosonic\.",
|
||||
r"asyncio\.to_thread\(|asyncio\.create_task\(",
|
||||
r"async def .*:\s*await",
|
||||
]
|
||||
for filepath in staged_files:
|
||||
content = get_file_content_at_staged(filepath)
|
||||
if is_binary_content(content):
|
||||
continue
|
||||
for pattern in CLOUD_API_PATTERNS:
|
||||
if re.search(pattern, content.decode("utf-8", errors="ignore")):
|
||||
findings.append(Finding(filepath, -1, f"Cloud API usage detected: {pattern}"))
|
||||
|
||||
diff_text = get_staged_diff()
|
||||
if diff_text:
|
||||
for line_no, line in enumerate(diff_text.splitlines(), start=1):
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -58,3 +58,4 @@ mini-swe-agent/
|
||||
# Nix
|
||||
.direnv/
|
||||
result
|
||||
.aider*
|
||||
|
||||
Reference in New Issue
Block a user