
Research
/Security News
60 Malicious Ruby Gems Used in Targeted Credential Theft Campaign
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
5x-postgresql-auth-manager
Advanced tools
A package to manage PostgreSQL connections using environment variables.
A Python package to manage PostgreSQL connections using environment variables.
pip install 5x-postgresql-auth-manager
This package simplifies connecting to PostgreSQL by reading connection details from environment variables. It provides a PostgreSQLConnectionManager
class that handles connection establishment and management.
Set the following environment variables with your PostgreSQL connection details:
FIVEX_POSTGRESQL_HOST
: The hostname or IP address of your PostgreSQL server.FIVEX_POSTGRESQL_PORT
: The port number of your PostgreSQL server (defaults to 5432
).FIVEX_POSTGRESQL_DATABASE
: The name of the database to connect to.FIVEX_POSTGRESQL_USER
: The username for connecting to the database.FIVEX_POSTGRESQL_PASSWORD
: The password for the specified user.import os
from postgresql_auth.postgresql_auth import PostgreSQLConnectionManager
# Set environment variables (replace with your actual credentials)
os.environ['FIVEX_POSTGRESQL_HOST'] = 'localhost'
os.environ['FIVEX_POSTGRESQL_PORT'] = '5432'
os.environ['FIVEX_POSTGRESQL_DATABASE'] = 'mydatabase'
os.environ['FIVEX_POSTGRESQL_USER'] = 'myuser'
os.environ['FIVEX_POSTGRESQL_PASSWORD'] = 'mypassword'
try:
manager = PostgreSQLConnectionManager()
with manager.get_connection() as conn:
print("Successfully connected to PostgreSQL!")
with conn.cursor() as cursor:
cursor.execute("SELECT version();")
version = cursor.fetchone()
print(f"PostgreSQL Version: {version[0]}")
except ValueError as e:
print(f"Configuration Error: {e}")
except ConnectionError as e:
print(f"Connection Error: {e}")
except Exception as e:
print(f"An unexpected error occurred: {e}")
FAQs
A package to manage PostgreSQL connections using environment variables.
We found that 5x-postgresql-auth-manager 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
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.