Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Agori is a secure Python package that provides encrypted document storage and semantic search capabilities using ChromaDB and Azure OpenAI embeddings. It focuses on secure storage and retrieval of sensitive documents while maintaining searchability through encrypted vector embeddings.
pip install agori
from agori.core import WorkingMemory
from cryptography.fernet import Fernet
# Generate a new encryption key (in practice, store this securely)
encryption_key = Fernet.generate_key()
# Initialize the secure database
db = WorkingMemory(
api_key="your-azure-openai-key",
api_endpoint="your-azure-endpoint",
encryption_key=encryption_key,
db_unique_id="my_secure_db"
)
# Create a new collection
collection_metadata = {
"description": "Research papers database",
"owner": "research_team"
}
collection = db.create_collection("research_papers", metadata=collection_metadata)
# Add documents with metadata
documents = [
"Advances in Neural Networks",
"Quantum Computing Overview",
"Machine Learning Applications"
]
metadata_list = [
{"author": "John Doe", "year": "2023"},
{"author": "Jane Smith", "year": "2023"},
{"author": "Bob Wilson", "year": "2024"}
]
# Add documents - they will be automatically encrypted
doc_ids = db.add_documents(
collection_name="research_papers",
documents=documents,
metadatas=metadata_list
)
# Query the collection - results will be automatically decrypted
results = db.query_collection(
collection_name="research_papers",
query_texts=["neural networks"],
n_results=2
)
# Process results
for i, (doc, distance) in enumerate(zip(results["documents"][0], results["distances"][0])):
print(f"Result {i+1}:")
print(f"Document: {doc}")
print(f"Similarity Score: {1 - distance}") # Convert distance to similarity
if "metadatas" in results:
print(f"Metadata: {results['metadatas'][0][i]}")
print()
#cleanup the collection and db
db.drop_collection("research_papers")
db.cleanup_database()
To set up the development environment:
# Clone the repository
git clone https://github.com/govindshukl/agori.git
cd agori
# Create and activate virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install development dependencies
pip install -r requirements-dev.txt
# Install the package in editable mode
pip install -e .
# Run tests
pytest tests -v --cov=agori
# Code formatting
black src/agori tests
isort src/agori tests
# Linting
flake8 src/agori tests
mypy src/agori tests
Contributions are welcome! Please feel free to submit a Pull Request.
git checkout -b feature/NewFeature
)git commit -m 'Add NewFeature'
)git push origin feature/NewFeature
)This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any issues or need support, please:
FAQs
A secure working memory for agents
We found that agori demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.