Skip to main content

Sentinel: OSV-based vulnerability scanner for Python projects

Project description

Sentinel Header

PyPI License Python Versions

Note
Sentinel is free and open-source. Contributions welcome!


📚 Table of Contents


🔍 Introduction

Sentinel is a Python dependency vulnerability scanner powered by OSV.dev. It scans installed packages or requirements files for known security issues.

Sentinel is ideal for developers and teams who want to automate security checks in their local development and CI/CD pipelines.


✨ Key Features

  • 🔍 Scan installed dependencies or requirements.txt
  • 🚫 Detect known vulnerabilities via OSV.dev
  • 🧾 Supports .trakignore to skip known issues
  • 📄 Export reports to JSON and CSV
  • 🚨 CI-ready: exits with 1 when vulnerabilities are found
  • ⚡ Simple CLI, fast results

🚀 Getting Started

The job fails if any vulnerabilities are found.
Add a .trakignore file to suppress specific known issues.
You can also export scan results with --json and --csv for reporting.

✅ GitHub Action

Use Sentinel in CI pipelines easily with GitHub Actions:

name: Sentinel Scan

on:
  push:
    branches: [main]
  pull_request:

jobs:
  scan:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v3

      - name: Set up Python
        uses: actions/setup-python@v4
        with:
          python-version: '3.10'

      - name: Install Sentinel
        run: pip install playtrak-sentinel

      - name: Run scan
        run: sentinel -r requirements.txt

✅ GitLab CI

You can integrate Sentinel in GitLab CI pipelines using the following example:

stages:
  - test

scan_vulnerabilities:
  image: python:3.10
  stage: test
  before_script:
    - pip install playtrak-sentinel
  script:
    - sentinel -r requirements.txt

🖥️ Command Line Interface

1. Installation

Install via pip:

pip install playtrak-sentinel

2. Running Your First Scan

Basic usage with default environment:

sentinel

Scan specific files:

sentinel -r requirements.txt
sentinel -r requirements.txt -r dev-requirements.txt

Export reports:

sentinel -r requirements.txt --json report.json --csv report.csv

Ignore specific vulnerabilities with .trakignore:

GHSA-xxxx-yyyy-zzzz
PYSEC-2023-0001

⚙️ Basic Commands

  • sentinel: Scan installed environment
  • sentinel -r file.txt: Scan specific requirements file
  • --json: Export to JSON
  • --csv: Export to CSV
  • Uses .trakignore (optional) to skip vulnerabilities

🚦 CI Exit Codes

Code Meaning
0 No vulnerabilities found
1 Vulnerabilities detected
2 Usage error (e.g., no files)

📜 License

MIT License


🐍 Supported Python Versions

Supports Python 3.7 and above. We recommend using the latest LTS version of Python for compatibility and security.


🤝 Contributing & Conduct


🔗 Resources

👤 Author

Created by Eder Ramos for PLAYTRAK Sistemas de Monitoreo

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

playtrak_sentinel-0.1.0.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

playtrak_sentinel-0.1.0-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file playtrak_sentinel-0.1.0.tar.gz.

File metadata

  • Download URL: playtrak_sentinel-0.1.0.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.0

File hashes

Hashes for playtrak_sentinel-0.1.0.tar.gz
Algorithm Hash digest
SHA256 308532688863749c19b94fa7e6e84726ce2ca0616cc9849497314d8cb53d4b90
MD5 c09e9a28d74ffc20aa655eab71231657
BLAKE2b-256 7ea025fb7c6ed22eb2ebae94d8c35c9b2fba43da8151d7e57a64493a1a7a75bb

See more details on using hashes here.

File details

Details for the file playtrak_sentinel-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for playtrak_sentinel-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aeb6ea7442ad3e76614bc9913912beaa328aff2f9e594a48b1d8003754b42a00
MD5 6d4fddd34a1c45174a2e6a4fdd8532e6
BLAKE2b-256 38b7f79b5efea8def8ac76ae71eb9587372021b370c4cce5b0c3a147506d8e5d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page