Skip to main content

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

Coming soon

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"

Health check

stayawake-health-check  --config config/urls.yml      

Uptime check (remote-only bot)

saw scan --config config/security.yml --local                       # worm scan (local security CLI)

The distribution is published as stayawakebot. Local security runs through the terse saw command (see the CLI guide).

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.

Don't hand-maintain that workflow — let saw manage it. saw guard setup writes (or surgically pin-bumps) exactly this gate for you — locally to review + commit, or --pr to open a rolling PR — and saw guard check verifies a repo's gate is present, SHA-pinned, current, and required by branch protection. Both sweep many repos at once (local by default, or --remote/--user/--org), just like saw scan/saw fix:

saw guard check                       # is this repo's gate present + SHA-pinned + current?
saw guard setup --pr                  # install/bump the gate → one rolling PR (never pushes main)
saw guard check --org UB-TechDEV -f   # CI gate: fail if any repo lacks a required gate

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 \
  saw scan /repo

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 \
  saw scan /repo --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.

Note: that provenance attests saw's own build. When saw scans a target it is purely behavioral — it never treats a scanned package's SLSA / PEP-740 / sigstore attestation as a trust signal (Shai-Hulud 2.0 shipped valid provenance). See SECURITY_ARCHITECTURE.md → Provenance is not trust.

Documentation

License

stayAwakeBot is dual-licensed (from v0.1.9 onward):

  • AGPL-3.0-or-later — free and open source. You must preserve attribution, and if you modify it and convey it or offer it over a network (e.g. as a hosted service), you must release your corresponding source under the AGPL too.
  • Commercial license — a paid, proprietary-use option for closed-source or proprietary-SaaS use without the AGPL's source-disclosure obligations. Contact the author for terms.

Releases up to and including v0.1.8 were published under the MIT license and remain MIT for those versions.

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.4.0.tar.gz (1.2 MB view details)

Uploaded Source

Built Distribution

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

stayawakebot-0.4.0-py3-none-any.whl (1.2 MB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for stayawakebot-0.4.0.tar.gz
Algorithm Hash digest
SHA256 0fbdc83e4bd492859160737f206d819cae97bed89a1e5223e91a3be9a673f5a5
MD5 38745f75b163eec6f958613047eb494c
BLAKE2b-256 a8bda2a32f2d5f8871fed4a510f6f0995c203443a922ad46d63fa751dff3b9ab

See more details on using hashes here.

Provenance

The following attestation bundles were made for stayawakebot-0.4.0.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.4.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for stayawakebot-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0ff88549e60b2ec8587b3294c3dbf776e18d3bf9a420a062fea4e63323a9b9c0
MD5 7cc659a23ccbda31f7ca42a958e29d51
BLAKE2b-256 51eeea9d51ab2c58a0228b14de312db78c882a07c17c05729656c91e6e4f81b2

See more details on using hashes here.

Provenance

The following attestation bundles were made for stayawakebot-0.4.0-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.

Release history Release notifications | RSS feed

0.6.3

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0

2 files

0.4.1

2 files

This release

0.4.0 This release

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

0.1.19

2 files

0.1.18

2 files

0.1.17

2 files

0.1.16

2 files

0.1.15

2 files

0.1.14

2 files

0.1.13

2 files

0.1.12

2 files

0.1.11

2 files

0.1.10

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.0

2 files

Supported by

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