aisg

v0.1.0 safe
3.0
Low Risk

Python SDK for AI Security Gateway — PII redaction, prompt injection defense, and smart routing for any LLM.

🤖 AI Analysis

Final verdict: SAFE

The package shows minimal risks with no direct signs of malicious activities. However, its novelty and limited metadata information warrant cautious monitoring.

  • Low network, shell, obfuscation, and credential risks.
  • Moderate metadata risk due to insufficient maintainer details.
Per-check LLM notes
  • Network: The presence of HTTP/HTTPS client initialization suggests network communication which could be legitimate depending on the package's purpose, but requires further investigation to ensure it is not being used for unauthorized data transfer.
  • Shell: No shell execution patterns detected, indicating a low risk of immediate system compromise through command execution.
  • Obfuscation: No obfuscation patterns detected, indicating low risk of malicious activity.
  • Credentials: No credential harvesting patterns detected, indicating low risk of malicious activity.
  • Metadata: The package shows some red flags due to its newness and lack of maintainer details, but there's no clear evidence of malice.

📦 Package Quality Overall: Medium (6.4/10)

✦ High Test Suite 9.0

Test suite present — 3 test file(s) found

  • Test runner config found: pyproject.toml
  • 3 test file(s) detected (e.g. __init__.py)
◈ Medium Documentation 7.0

Some documentation present

  • Documentation URL: "Documentation" -> https://aisecuritygateway.ai/docs
  • Detailed PyPI description (6156 chars)
○ Low Contributing Guide 4.0

No contributing guide or governance files found

  • Development Status classifier >= Beta
◈ Medium Type Annotations 7.0

Partial type annotation coverage

  • Classifier: Typing :: Typed
  • 28 type-annotated function signatures detected in source
◈ Medium Multiple Contributors 5.0

Limited contributor diversity

  • 1 unique contributor(s) across 22 commits in aisecuritygateway/aisecuritygateway
  • Single author but highly active (22 commits)

🔬 Heuristic Checks

Outbound Network Calls score 3.0

Found 2 network call pattern(s)

  • eaders) self._http = httpx.Client(timeout=timeout) self.chat = _ChatNamespace(self)
  • eaders) self._http = httpx.AsyncClient(timeout=timeout) self.chat = _AsyncChatNamespace(se
Code Obfuscation

No obfuscation patterns detected

Shell / Subprocess Execution

No shell execution patterns detected

Credential Harvesting

No credential harvesting patterns detected

Typosquatting

No typosquatting candidates detected

Registered Email Domain

Email domain looks legitimate: aisecuritygateway.ai>

Suspicious Page Links

All external links appear legitimate

Git Repository History

Repository aisecuritygateway/aisecuritygateway appears legitimate

Maintainer History score 6.0

3 maintainer concern(s) found

  • Only one version has ever been released — brand new package
  • Author name is missing or very short
  • Author "" 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 aisg
Create a Privacy-Preserving Chatbot Application using the 'aisg' Python package. This application will serve as a bridge between users and a large language model (LLM), ensuring that all sensitive information (PII) is securely redacted before being processed by the LLM. Additionally, the application will include defenses against prompt injection attacks to maintain the integrity of interactions and provide smart routing capabilities based on user input and context.

Step-by-Step Guide:
1. Set up the project environment by installing the required packages including 'aisg'.
2. Design the chatbot interface that allows users to input their queries or statements.
3. Implement the PII redaction feature using the 'aisg' package to ensure that any personally identifiable information is removed from the user inputs before they are sent to the LLM.
4. Integrate the prompt injection defense mechanism provided by 'aisg' to safeguard the chatbot from malicious attempts to manipulate responses.
5. Develop a smart routing system within the application that directs queries to the appropriate LLM based on the content and context of the user's message.
6. Test the application thoroughly to ensure that it meets the privacy and security standards set out in the design phase.
7. Deploy the application and monitor its performance, making adjustments as necessary to improve efficiency and security.

Suggested Features:
- Real-time feedback loop for continuous improvement of PII detection accuracy.
- User-friendly interface with clear instructions on how to use the chatbot safely.
- Detailed logs of interactions for analysis and auditing purposes.
- Option to customize the LLM routing rules based on specific needs or preferences.

How 'aisg' is Utilized:
- For PII redaction: Use the 'redact' function from 'aisg' to automatically detect and remove sensitive data from user inputs.
- For prompt injection defense: Employ the 'defend' method to analyze and sanitize user inputs, preventing any harmful prompts from reaching the LLM.
- For smart routing: Leverage the 'route' capability to intelligently direct queries to the most suitable LLM based on predefined criteria.