Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Creates a SQLAlchemy user defined type to understand
PostgreSQL's CIText <http://www.postgresql.org/docs/9.1/static/citext.html>
_
extension.
This requires some kind of PostgreSQL compatible db-api driver already installed in order to work.
Make sure you have something like psycopg2
already installed.
.. code-block:: console
pip install sqlalchemy-citext
.. code-block:: python
from sqlalchemy import create_engine, MetaData, Integer
from sqlalchemy.schema import Column, Table
import sqlalchemy.orm as orm
from citext import CIText
engine = create_engine('postgresql://localhost/test_db')
meta = MetaData()
test_table = Table('test', meta,
Column('id', Integer(), primary_key=True),
Column('txt', CIText()))
conn = engine.connect()
meta.bind = conn
meta.drop_all()
meta.create_all()
class TestObj(object):
def __init__(self, id_, txt):
self.id = id_
self.txt = txt
def __repr__(self):
return "TestObj(%r, %r)" % (self.id, self.txt)
orm.mapper(TestObj, test_table)
Session = orm.sessionmaker(bind=engine)
ses = Session()
to = TestObj(1, txt='FooFighter')
ses.add(to)
ses.commit()
row = ses.query(TestObj).filter(TestObj.txt == 'foofighter').all()
assert len(row) == 1
print row
ses.close()
sqlalchemy-citext
is an MIT/BSD dual-Licensed library.
setup.py
and the
Contributors
section below :)@mahmoudimus <https://github.com/mahmoudimus>
_@vad <https://github.com/vad>
_@dstufft <https://github.com/dstufft>
_@brmzkw <https://github.com/brmzkw>
_@graingert <https://github.com/graingert>
_@cjmayo <https://github.com/cjmayo>
_@libre-man <https://github.com/libre-man>
_FAQs
A sqlalchemy plugin that allows postgres use of CITEXT.
We found that sqlalchemy-citext 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.