safety

Install command:
brew install safety

Checks Python dependencies for known vulnerabilities and suggests remediations

https://safetycli.com/product/safety-cli

License: MIT

Development: Pull requests

Formula JSON API: /api/formula/safety.json

Formula code: safety.rb on GitHub

Bottle (binary package) installation support provided for:

macOS on
Apple Silicon
golden gate ✅
tahoe ✅
sequoia ✅
Linux ARM64 ✅
x86_64 ✅

Current versions:

stable ✅ 3.8.1
head ⚡️ HEAD

Revision: 3

Depends on:

certifi 2026.10.23 Mozilla CA bundle for Python
cryptography 50.0.2 Cryptographic recipes and primitives for Python
pydantic 2.14.2 Data validation using Python type hints
python@3.15 3.15.2 Interpreted, interactive, object-oriented programming language

Binaries: safety

Analytics:

30 days90 days365 days
Installs4288628
Installs on Request4288628
Build Errors0

Known vulnerabilities in the current version:

GHSA-6627-m3xw-93mp (medium) filelock: StrictSoftFileLock creates its claim directories without the lock mode, so another loca...
GHSA-69hj-f68j-2879 (medium) filelock: UnixFileLock truncates and chmods any regular file another user renames or hard-links o...
GHSA-9c4x-gm8v-wgc4 (medium) filelock: StrictSoftFileLock and SoftReadWriteLock adopt a protocol directory another user create...
GHSA-9j6q-wvj5-jgjg (low) filelock: Symlink swap during SoftFileLock's writability check leaks whether a path exists and is...
GHSA-cwqr-hh33-gh44 (medium) filelock ReadWriteLock: a crafted lock database makes every acquire stall or hang regardless of t...
GHSA-fq56-3cx3-fjxp (medium) filelock: SoftFileLock stale-lock break removes a live lock file on a reused inode number and adm...
GHSA-j8f7-rjxc-mr56 (medium) filelock: ReadWriteLock follows a symlink at the lock path into SQLite
GHSA-m462-7rxw-wvpg (medium) filelock: StrictSoftFileLock follows a symbolic link swapped in at <path>.filelock and creates cl...
GHSA-rfpc-qcw5-3pc4 (medium) filelock: SoftFileLock removes a live holder's marker when another user forges the PID in a writa...
GHSA-v4x8-3wr5-3wq8 (high) filelock ReadWriteLock: SQLite reopens the lock database by name, so a planted symlink or journal...

Data from Homebrew/advisory-database. Run brew vulns safety for a live check.