AI Analysis
Final verdict: SUSPICIOUS
The package shows moderate risks due to potential shell execution and incomplete metadata. While the lack of obfuscation and credential harvesting reduces immediate concerns, the network security measures and shell execution capabilities warrant further investigation.
- Moderate shell risk
- Incomplete maintainer metadata
Per-check LLM notes
- Network: The network pattern suggests an attempt to secure against SSRF attacks, which is generally positive but requires further context to ensure it's implemented correctly.
- Shell: Multiple instances of shell execution might indicate legitimate functionality, but could also signify potential for executing arbitrary code, raising concern.
- Obfuscation: No obfuscation patterns detected, indicating low risk of malicious intent.
- Credentials: No credential harvesting patterns detected, suggesting safe handling of secrets and credentials.
- Metadata: The maintainer has a new or inactive account and lacks a proper author name, which raises some suspicion but not enough to conclusively determine malice.
Heuristic Checks
Outbound Network Calls
score 9.0
Found 6 network call pattern(s)
lass _SsrfSafeRedirectHandler(urllib.request.HTTPRedirectHandler): """Redirect handler that re-validat( self, req: urllib.request.Request, fp: Any, code: int, msg: stewurl: str, ) -> Optional[urllib.request.Request]: _validate_url(newurl) return superfe redirect handler _opener = urllib.request.build_opener(_SsrfSafeRedirectHandler) def _normalize_eventry: req = urllib.request.Request( self._url, data=body, headers=hgest_server request = urllib.request.Request( f"http://{host}:{port}/api/ingest",
Code Obfuscation
No obfuscation patterns detected
Shell / Subprocess Execution
score 6.0
Found 3 shell execution pattern(s)
try: result = subprocess.run( [sys.executable, str(starter_path)],try: result = subprocess.run( [sys.executable, str(example_path)],) as tmpdir: result = subprocess.run( [sys.executable, str(example_path)],
Credential Harvesting
No credential harvesting patterns detected
Typosquatting
No typosquatting candidates detected
Registered Email Domain
Email domain looks legitimate: bmdpat.com>
Suspicious Page Links
All external links appear legitimate
Git Repository History
Repository bmdhodl/agent47 appears legitimate
Maintainer History
score 4.0
2 maintainer concern(s) found
Author name is missing or very shortAuthor "" 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 agentguard47
Create a Python-based utility application called 'BudgetGuard' that monitors and controls the execution of various Python scripts running in a production environment. The application will utilize the 'agentguard47' package to ensure these scripts operate within specified constraints to prevent infinite loops, retry storms, and excessive resource usage. Here are the steps and features to implement: 1. **Setup Environment**: Begin by setting up your Python environment. Install 'agentguard47' via pip. 2. **Script Monitoring**: Develop a feature that allows users to input Python script paths and monitor their execution. This feature should track CPU usage, memory consumption, and execution time. 3. **Constraint Setting**: Implement a configuration system where users can set constraints such as maximum CPU usage percentage, maximum memory usage in MBs, and maximum execution time in seconds for each monitored script. 4. **Runtime Control**: Utilize 'agentguard47' to enforce these constraints. If any script breaches its limits, 'agentguard47' should intervene to stop the script gracefully or restart it after a configurable delay. 5. **Logging and Alerts**: Integrate logging to record all activities including when constraints are breached and actions taken. Additionally, implement an alerting system that notifies users via email or SMS when a script is stopped due to constraint violations. 6. **User Interface**: Design a simple command-line interface (CLI) for users to interact with 'BudgetGuard'. They should be able to start monitoring, view logs, configure settings, and manage alerts through this interface. 7. **Testing and Validation**: Finally, thoroughly test the application using sample Python scripts that mimic typical production scenarios. Validate that 'agentguard47' effectively controls the scripts based on user-defined constraints. This project will demonstrate the practical application of 'agentguard47' in managing and safeguarding the runtime behavior of Python agents in real-world environments.