aigenguard

v0.8.4 suspicious
8.0
High Risk

Local-first pre-commit policy guard for AI-agent repositories.

πŸ€– AI Analysis

Final verdict: SUSPICIOUS

The package exhibits a high level of suspicion due to its obfuscation techniques and aggressive credential harvesting behavior, despite some benign functionalities.

  • High obfuscation risk
  • Severe credential harvesting attempts
Per-check LLM notes
  • Network: The package attempts to make network connections which may be benign but could also indicate potential for data exfiltration or C2 communications.
  • Shell: Subprocess calls can execute arbitrary commands and are often used for legitimate purposes, but they also pose a risk if misused for executing unauthorized code.
  • Obfuscation: The patterns detected suggest potential obfuscation of code execution and network interaction, indicating a high risk of malicious intent.
  • Credentials: The observed patterns strongly indicate attempts to harvest credentials such as GITHUB_TOKEN and AWS_SECRET_ACCESS_KEY, which is highly suspicious and poses a significant security risk.
  • Metadata: The author has only one package, suggesting a new or less active account which could indicate potential risk but lacks clear evidence of malicious intent.

πŸ“¦ Package Quality Overall: Medium (5.8/10)

✦ High Test Suite 9.0

Test suite present β€” 13 test file(s) found

  • 13 test file(s) detected (e.g. test_cli.py)
β—ˆ Medium Documentation 5.0

Some documentation present

  • Detailed PyPI description (11404 chars)
β—‹ Low Contributing Guide 4.0

No contributing guide or governance files found

  • Development Status classifier >= Beta
β—ˆ Medium Type Annotations 5.0

Partial type annotation coverage

  • 462 type-annotated function signatures detected in source
β—ˆ Medium Multiple Contributors 6.0

Limited contributor diversity

  • 2 unique contributor(s) across 100 commits in vlcak27/aigenguard
  • Two distinct contributors found

πŸ”¬ Heuristic Checks

⚠ Outbound Network Calls score 9.0

Found 6 network call pattern(s)

  • = """import socket try: socket.create_connection(("127.0.0.1", 9), timeout=0.001) except OSError: pass ""
  • sts.", "httpx.", "aiohttp.", "urllib.request.")) for call in calls ) def _has_python_mcp_to
  • = 'gpt-4o'", "requests.get('https://example.com')", "subprocess.run(['e
  • = 'gpt-4o'", "requests.get('https://example.com')", ] ), en
  • ChatOpenAI", "requests.get('https://example.com')", ] ), en
  • : prompt})", "requests.get('https://example.com')", ] ), en
⚠ Code Obfuscation score 10.0

Found 6 obfuscation pattern(s)

  • ue"), "code_execution": ("eval(", "exec("), "network": ("requests.", "httpx.", "aiohttp
  • ("subprocess", "os.system", "eval(", "exec("), "risk": "high", }, { "c
  • llo'])", " eval('1 + 1')", " client.get('https://example.
  • re.IGNORECASE, ), re.compile( r"\byou\s+may\s+(?:use|run|execute)\s+(?:the\s+)?" r"(?:shell|bash|terminal|command
  • ERMISSION_PATTERNS = ( re.compile( r"\b(?:eval|exec|dynamic\s+code\s+execution)\s+is\s+allowed\b", re.IGNORECASE, ),
  • re.IGNORECASE, ), re.compile( r"\byou\s+may\s+(?:use|run|execute)\s+(?:eval|exec|dynamic\s+code)\b", re.IGNORECAS
⚠ Shell / Subprocess Execution score 10.0

Found 5 shell execution pattern(s)

  • try: completed = subprocess.run( argv, cwd=repo_root,
  • ins_available(): result = subprocess.run( [sys.executable, "-m", "agentbom.cli", "--help"],
  • is interpreter") module = subprocess.run( [sys.executable, "-m", "aigenguard.cli", "--help"],
  • ext=True, ) console = subprocess.run( [str(script), "--help"], check=True,
  • not-store'", "subprocess.run(['echo', 'hello'])", ] ), encodi
⚠ Credential Harvesting score 7.5

Found 3 credential access pattern(s)

  • thon_command("import os, sys; os.getenv('GITHUB_TOKEN'); sys.exit(7)"), ) monkeypatch.chdir(repo) re
  • _python_command("import os; os.getenv('AWS_SECRET_ACCESS_KEY')"), ) monkeypatch.chdir(repo)
  • : "filesystem.read", "path": "~/.ssh/id_rsa"}, "critical", {"ssh-material", "pr
βœ“ Typosquatting

No typosquatting candidates detected

βœ“ Registered Email Domain

No author email provided

βœ“ Suspicious Page Links

All external links appear legitimate

βœ“ Git Repository History

Repository vlcak27/aigenguard appears legitimate

⚠ Maintainer History score 2.0

1 maintainer concern(s) found

  • Author "AigenGuard contributors" appears to have only 1 package on PyPI (new or inactive account)
βœ“ Known CVE Vulnerabilities

No known vulnerabilities found in OSV database.

πŸ’‘ AI App Starter Prompt

Use this prompt to build a project with aigenguard
Your task is to develop a simple yet powerful utility called 'AI-RepoGuard' using the Python package 'aigenguard'. This tool aims to enhance security and governance within AI agent repositories by ensuring that all commits adhere to strict local-first pre-commit policies. Here’s a step-by-step guide on how to build this utility:

1. **Setup Environment**: Begin by setting up your development environment. Ensure you have Python installed, along with necessary libraries such as 'aigenguard', which you will use for enforcing pre-commit policies.
2. **Define Pre-Commit Policies**: Utilize 'aigenguard' to define a set of pre-commit policies that each commit must pass before being allowed into the repository. These policies could include checks for code quality, adherence to coding standards, presence of documentation, and more.
3. **Integrate with Git Hooks**: Integrate your utility with Git hooks so that every time a user attempts to commit changes, these pre-commit policies are automatically enforced.
4. **User Interface**: Develop a simple command-line interface (CLI) where users can interact with your utility. They should be able to add, modify, and remove pre-commit policies through this CLI.
5. **Logging and Reporting**: Implement logging functionality to keep track of all enforcement actions taken by your utility. Additionally, provide reporting capabilities to generate summaries of compliance status over time.
6. **Testing and Validation**: Finally, ensure thorough testing and validation of your utility. Use test cases to verify that all defined policies are correctly enforced, and that the utility behaves as expected under various scenarios.

Some suggested features to consider adding to your utility include:
- Support for customizable policy configurations
- Integration with external services for additional validation (e.g., linters, formatters)
- Real-time notifications for policy violations
- Detailed audit logs for accountability and traceability

By following these steps and incorporating these features, you will create a robust and flexible tool that significantly enhances the management and governance of AI agent repositories.