Skip to main content

Distributable monitoring & security sentinel toolkit — uptime checks plus self-propagating-worm detection, remediation, and prevention.

Project description

StayAwakeBot

StayAwakeBot is a distributable (pip install-able) Python monitoring and security toolkit. Under one stayawake namespace it ships two bots over a shared core:

  • Health sentinel — a URL/uptime availability monitor (HTTP status, latency, TLS, keyword checks) that writes JSON/markdown reports.
  • Security sentinel — a supply-chain worm hunter that detects, alerts on, and auto-fixes self-propagating malware (obfuscated loaders, fake fonts, VS Code auto-run tasks, and stealth "evil merges"), opening remediation PRs and gating CI.

Run either bot as a console script locally, or as GitHub Actions workflows that commit reports back to the repository — the same packaged code in both places.

Architecture

StayAwakeBot architecture

Quick start

Prerequisites: Python 3.11+ — see docs/PREREQUISITES.md.

pip install stayawakebot                                            # from PyPI (released versions)
# or the latest from source:
pip install "stayawakebot @ git+https://github.com/Ndevu12/stayAwakeBot@main"
stayawake-health-check  --config config/urls.yml                    # uptime check
stayawake-security-scan --config config/security.yml --local-only   # worm scan

The distribution is published as stayawakebot (the name stayawake is taken on PyPI by an unrelated project); the import package and stayawake-* commands are unchanged.

Gate any repo's CI (GitHub Action)

Add the security sentinel to any repository in one step — no install, no clone:

# .github/workflows/worm-guard.yml
on: [pull_request, push]
jobs:
  worm-guard:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with: { fetch-depth: 0 }   # full history so evil merges are detectable
      - uses: Ndevu12/strix@v1             # pin to a SHA in production
        with:
          fail-on-findings: 'true'

Ndevu12/strix ("StayAwakeBot Strix") is the public Action — a thin wrapper that installs the published stayawakebot scanner from PyPI. Pin @<sha> rather than @v1 for tamper-evident runs. See Security baseline.

Run via Docker (no local Python needed)

Prefer not to install a Python toolchain at all? Pull the image and scan a mounted repo:

docker run --rm -v "$PWD:/repo:ro" ghcr.io/ndevu12/stayawakebot \
  stayawake-security-scan --local-only --fail-on-findings

The exit code is the verdict (0 clean, 1 findings). To keep the report file too, mount a writable dir and run as your own user so the bind-mount is writable:

docker run --rm --user "$(id -u):$(id -g)" -v "$PWD:/repo" \
  ghcr.io/ndevu12/stayawakebot \
  stayawake-security-scan --local-only --reports-dir /repo/reports

Tags: :latest, :X.Y.Z, :X.Y, and :sha-<commit>. The image runs as a non-root user, is built from the same wheel published to PyPI, and ships SLSA provenance + SBOM attestations.

Documentation

License

MIT — see LICENSE.

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

stayawakebot-0.1.4.tar.gz (58.6 kB view details)

Uploaded Source

Built Distribution

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

stayawakebot-0.1.4-py3-none-any.whl (82.8 kB view details)

Uploaded Python 3

File details

Details for the file stayawakebot-0.1.4.tar.gz.

File metadata

  • Download URL: stayawakebot-0.1.4.tar.gz
  • Upload date:
  • Size: 58.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for stayawakebot-0.1.4.tar.gz
Algorithm Hash digest
SHA256 78771eac3dc9bfa3ee9f13d3a91ce8a574ec820f5a5d3391bc5c03f6e8f81df8
MD5 efbfe6bab19c2085776289dfc751ea25
BLAKE2b-256 c47e5a333706a34f87bc0d071d015f420129388842d6473e059180808060a832

See more details on using hashes here.

Provenance

The following attestation bundles were made for stayawakebot-0.1.4.tar.gz:

Publisher: release.yml on Ndevu12/stayAwakeBot

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

File details

Details for the file stayawakebot-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: stayawakebot-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 82.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for stayawakebot-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0f902868b06ce3de1ef5b9667bd335baa26d22c7e3d397520c0d972c152a1511
MD5 b15df461c753c484a5bc0bf4d8ae396b
BLAKE2b-256 ba5d5525d53a01614c8585c0bb4fdd0dfd54e96d784927b2ea59e9f518897c26

See more details on using hashes here.

Provenance

The following attestation bundles were made for stayawakebot-0.1.4-py3-none-any.whl:

Publisher: release.yml on Ndevu12/stayAwakeBot

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