Skip to main content

Unified security scanning for the SciTeX ecosystem: bandit + shellcheck + pip-audit + GitHub alerts (Dependabot, secret scanning, code scanning) in one orchestrator

Project description

scitex-security

SciTeX

GitHub security-alert utilities — Dependabot, secret scanning, code scanning. Pure stdlib + `gh` subprocess, zero scitex.* runtime deps.

Full Documentation · uv pip install scitex-security[all]

PyPI Python Tests Coverage Docs License: AGPL v3


Installation

pip install scitex-security

Architecture

src/scitex_security/
├── __init__.py     # public re-exports
├── github.py       # GitHub alert collection (Dependabot / secret / code scanning)
├── cli.py          # `scitex-security check` / `show-latest`
├── __main__.py     # python -m scitex_security
└── _skills.py      # bundled agent skills

Runtime flow:
  scitex-security check <owner/repo>
        │
        ▼
  github.check_github_alerts()
        │ subprocess
        ▼
  gh api repos/<owner>/<repo>/{dependabot,secret-scanning,code-scanning}/alerts
        │
        ▼
  format_alerts_report() → save_alerts_to_file(.scitex/security/runtime/)

scitex-security shells out to gh (GitHub CLI) and never touches your tokens directly — GH_TOKEN / GITHUB_TOKEN are read by the gh subprocess from the environment, not from this package.

2 Interfaces

Python API (primary)
from scitex_security import (
    check_github_alerts,
    save_alerts_to_file,
    format_alerts_report,
    GitHubSecurityError,
)

alerts = check_github_alerts(repo="ywatanabe1989/myrepo")
print(format_alerts_report(alerts))
save_alerts_to_file(alerts, output_dir=".scitex/security/runtime")
CLI
scitex-security check ywatanabe1989/myrepo
scitex-security show-latest --security-dir ~/.scitex/security/runtime

Demo

flowchart LR
    user["scitex-security check\nywatanabe1989/myrepo"] --> api["check_github_alerts()"]
    env["GH_TOKEN /\nGITHUB_TOKEN"] -.-> gh["gh CLI subprocess"]
    api --> gh
    gh --> dep["Dependabot alerts"]
    gh --> sec["secret-scanning alerts"]
    gh --> code["code-scanning alerts"]
    dep --> report["format_alerts_report()"]
    sec --> report
    code --> report
    report --> stdout[("terminal report")]
    report --> save["save_alerts_to_file()"]
    save --> json[(".scitex/security/runtime/<ts>.txt")]

Quick Start

See the Python API block above for the minimal end-to-end example.

Environment Variables

Variable Purpose Default
SCITEX_SECURITY_CONFIG Path to a YAML config file (overrides ~/.scitex/security/config.yaml). unset
SCITEX_SECURITY_DIR Override the alerts output directory (overrides project/user scope). unset (uses <project>/.scitex/security/runtime/ or ~/.scitex/security/runtime/)
SCITEX_DIR Relocate the user-scope root (e.g. /mnt/fast-ssd/scitex). ~/.scitex
GH_TOKEN / GITHUB_TOKEN Auth token used by the underlying gh CLI subprocess. unset

Config precedence: explicit path → $SCITEX_SECURITY_CONFIG~/.scitex/security/config.yaml → built-in defaults. Alert output precedence: --output-dir / --security-dir$SCITEX_SECURITY_DIR → project scope → user scope (respects $SCITEX_DIR).

Status

Standalone fork of scitex.security. Pure stdlib + gh CLI subprocess — zero scitex.* runtime deps. Umbrella scitex.security import path is preserved via a sys.modules-alias bridge.

Part of SciTeX

scitex-security is part of SciTeX. Install via the umbrella with pip install scitex[security] to use as scitex.security (Python) or scitex security ... (CLI).

Four Freedoms for Research

  1. The freedom to run your research anywhere — your machine, your terms.
  2. The freedom to study how every step works — from raw data to final manuscript.
  3. The freedom to redistribute your workflows, not just your papers.
  4. The freedom to modify any module and share improvements with the community.

AGPL-3.0 — because we believe research infrastructure deserves the same freedoms as the software it runs on.

License

AGPL-3.0-only (see LICENSE).


SciTeX

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

scitex_security-0.2.0.tar.gz (37.6 kB view details)

Uploaded Source

Built Distribution

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

scitex_security-0.2.0-py3-none-any.whl (42.9 kB view details)

Uploaded Python 3

File details

Details for the file scitex_security-0.2.0.tar.gz.

File metadata

  • Download URL: scitex_security-0.2.0.tar.gz
  • Upload date:
  • Size: 37.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for scitex_security-0.2.0.tar.gz
Algorithm Hash digest
SHA256 5d39056c50028d0f79c4aa3a464d726561d21a16c416b40dae106f34a711ce40
MD5 e167d0eb469dd2c0c33f5d0cc84a2aaa
BLAKE2b-256 4dac940bf5af21cbefaf9db0c2f4c9d5f5967a7ff3897159d0c64c1e4063a236

See more details on using hashes here.

Provenance

The following attestation bundles were made for scitex_security-0.2.0.tar.gz:

Publisher: pypi-publish-and-github-release-on-tag.yml on ywatanabe1989/scitex-security

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scitex_security-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for scitex_security-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eb2d72cf9608f6cbf77f7f0f94746dc0c70357acd07e44f370216366ca94ad7b
MD5 164b5e6729e7606a43bf09c8b2527a88
BLAKE2b-256 72f2b1f5d5af5f1a2797af53b441a10139dd6a2ee52ee7f5bb384ec3fda69935

See more details on using hashes here.

Provenance

The following attestation bundles were made for scitex_security-0.2.0-py3-none-any.whl:

Publisher: pypi-publish-and-github-release-on-tag.yml on ywatanabe1989/scitex-security

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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