spidercob-sentinel
Open-source security triage & autofix agent for startups.
Free scanners (Dependabot, Semgrep OSS, free Snyk tiers) already tell you what's wrong. The actual problem for a team with no dedicated security headcount is noise: forty findings a week, no idea which three matter, and nobody with time to write the fix PR.
pip install spidercob-sentinel
sentinel scan .
3 finding(s) (12 total, 9 not dead code)
[HIGH] SQL Injection — app/views.py:42
User-controlled data from a request is passed to 'execute()'.
Fix: Use parameterised queries: cursor.execute('SELECT * FROM users WHERE id = %s', (user_id,)). Never interpolate user input into SQL strings.
[CRITICAL] aws_access_key — config/settings.py:8
AWS Access Key ID
Fix: Rotate key immediately via AWS IAM console. Store in AWS Secrets Manager or as environment variables — never in source code.
(autofix available — rerun with --autofix-diff to see the patch)
[HIGH] CVE-2024-XXXXX — requirements.txt
requests 2.25.0: known vulnerability
Fix: Upgrade requests to 2.31.0.
(autofix available — rerun with --autofix-diff to see the patch)
What it does
Three scanners, one unified output:
- Secrets & PII — via
dlp-patterns, zero-dependency regex engine. - Real vulnerabilities — Semgrep-backed AST/dataflow static analysis (SQLi, SSRF, command injection, path traversal, ...), plus a Python-AST reachability pass so dead code doesn't get reported at the same severity as something actually reachable from a route handler.
- Known CVEs in your dependencies — via
dep-scanner(osv-scan), the free OSV.dev API.
Then the part that's actually new: triage. Point it at an LLM key you already have (OpenAI, Anthropic, or a local Ollama) and it ranks the pile of findings down to the handful that matter, with a plain-English paragraph on each — not a textbook CWE definition, an answer to "do I need to care about this today." No key configured? It still works, just severity-sorted with no prose — nothing here requires an API key or sends your code anywhere.
Check if a package is safe to add — before you install it
sentinel check pypi requests
sentinel check npm left-pad 1.3.0
No manifest file, no scan of your whole project — just "should I add this
one dependency." Combines known CVEs (osv-scan) with signals the public
registry actually exposes: package age, maintainer count, whether it runs
code on install (preinstall/install/postinstall — the classic
supply-chain vector: event-stream, ua-parser-js), and a typosquat check
against the most-downloaded packages in the ecosystem (edit-distance 1–2
from something like colorama or requests, while not being it, is a real
pattern real attacks use). Rule-based, same as autofix — never an LLM
guessing whether a supply-chain risk is real.
PyPI and npm only for now; a rust/other-ecosystem name degrades to
"unsupported" rather than a wrong answer. No network access needed for the
typosquat check itself (the reference lists ship with the package); the
registry/CVE lookups do need it and degrade to "unknown" on failure rather
than crashing — this has to work as a quick answer, not demand a retry.
Autofix — deliberately narrow
Two sources only, both deterministic, never LLM-generated:
- A Semgrep rule's own vetted
fix:snippet, if the rule that matched ships one. - A dependency version bump to a known-patched release.
A security tool that writes its own security patches via a
hallucination-prone LLM is a credibility risk the moment it's wrong once.
The LLM here only ever writes prose (the triage explanation) — never a diff.
sentinel scan . --autofix-diff prints a unified diff for everything it can
fix; it never edits files in place or opens anything on its own in v1.
What this honestly doesn't do
- No interprocedural/cross-file taint tracking. A source and sink split across two functions or files won't be connected — that's Semgrep Pro, a paid product. This tool doesn't pretend otherwise.
- No IDOR or race-condition detection. Both are about a missing check, not a bad pattern present in the text — outside what static analysis can prove at all.
- Autofix coverage is real but modest — only the subset of vendored
Semgrep rules that ship a
fix:, plusrequirements.txt-style dependency bumps (other manifest formats are detected and explained, not yet auto-patched). - Directory scans are slow today. Each file gets its own
semgrepsubprocess invocation, and loading the vendored rule set costs ~9s per invocation on its own (measured against the Python rule set alone) — scanning N files costs roughly N × 9s, not a one-time fixed cost. Fine forsentinel scan path/to/one_file.pyin a pre-commit hook; a full-repo or whole-PR scan with many changed files will visibly add up. Batching all files of one language into a singlesemgrepinvocation (it natively accepts multiple paths) would amortize that cost instead of paying it per file — tracked as a roadmap item, not yet done.
Install
pip install spidercob-sentinel
That's enough for sentinel check (package trust) and secrets/dependency
scanning. sentinel scan's vulnerability pass additionally needs the real
semgrep CLI — it's an optional extra, not pulled in by default, since
check/secrets/dependency-CVE scanning have nothing to do with it and
semgrep is multi-GB with its own native deps:
pip install "spidercob-sentinel[scanner]"
./scripts/fetch_rules.sh # sparse-clones github.com/semgrep/semgrep-rules into ./semgrep_rules
CLI
sentinel check pypi requests # is this dependency safe to add? no install needed
sentinel check npm left-pad 1.3.0
sentinel scan <path> # file or directory — needs the [scanner] extra above
sentinel scan . --json
sentinel scan . --min-severity HIGH
sentinel scan . --explain # needs SENTINEL_LLM_PROVIDER / SENTINEL_LLM_API_KEY
sentinel scan . --autofix-diff # print diffs, never writes files
sentinel scan . --fail-on-findings # exit 1 if anything at/above --min-severity (for CI)
Environment variables for --explain (or pass --llm-provider/--llm-api-key directly):
| Variable | Values |
|---|---|
SENTINEL_LLM_PROVIDER |
openai | anthropic | ollama |
SENTINEL_LLM_API_KEY |
your key (not needed for ollama) |
SENTINEL_LLM_MODEL |
optional, defaults to a sensible per-provider model |
SENTINEL_OLLAMA_URL |
optional, defaults to http://localhost:11434 |
Library
import asyncio
from spidercob_sentinel import scan_path
report = asyncio.run(scan_path("./my-project"))
print(report.total, "findings,", len(report.blocking), "worth a look")
for f in report.sorted_by_severity():
print(f.severity, f.type, f.file, f.line, "-", f.remediation)
from spidercob_sentinel import check_package
report = check_package("npm", "left-pad")
print(report.overall, report.version)
for s in report.signals:
print(s.status, s.name, "-", s.detail)
GitHub App: runs on every PR
The webhook server (sentinel-github-app) runs the full scan + triage
pipeline on every pull_request event, posts a Check Run and inline review
comments, and opens an autofix PR into the PR's own branch for anything with
a mechanical fix. There's no Spidercob-run instance of this to install from
a marketplace — you register your own GitHub App, same as any other
self-hosted integration.
Deploy it somewhere reachable
cp .env.example .env # fill in after the next step
docker compose up --build -d
It needs a public URL GitHub can reach for the webhook (your own domain,
a reverse-proxied box, an ngrok tunnel for testing — anything that resolves
to http://localhost:8000 from the outside).
Register your own GitHub App (manifest flow — no form-filling)
GitHub's app manifest flow
lets you create a fully-configured app with one click instead of filling in
a dozen fields by hand. Save this as register.html, replace
YOUR_DOMAIN_HERE, open it in a browser while logged into GitHub, and click
through:
<!doctype html>
<form id="f" action="https://github.com/settings/apps/new" method="post">
<input type="hidden" name="manifest" id="manifest">
</form>
<script>
const manifest = {
name: "My Spidercob Sentinel",
url: "https://YOUR_DOMAIN_HERE",
hook_attributes: { url: "https://YOUR_DOMAIN_HERE/github/webhooks" },
redirect_url: "https://YOUR_DOMAIN_HERE/",
public: false,
default_events: ["pull_request"],
default_permissions: {
contents: "read", pull_requests: "write", checks: "write", metadata: "read",
},
};
document.getElementById('manifest').value = JSON.stringify(manifest);
document.getElementById('f').submit();
</script>
After you click "Create GitHub App" on GitHub's confirmation screen, it
redirects to redirect_url with ?code=... in the address bar. Exchange
that code once (it's single-use) for your real credentials:
curl -s -X POST https://api.github.com/app-manifests/THE_CODE_FROM_THE_URL/conversions \
| python3 -c "import json,sys; d=json.load(sys.stdin); print('GITHUB_APP_ID='+str(d['id'])); print('GITHUB_WEBHOOK_SECRET='+d['webhook_secret']); print('GITHUB_PRIVATE_KEY<<<'); print(d['pem'])"
Put id → GITHUB_APP_ID, webhook_secret → GITHUB_WEBHOOK_SECRET, and
pem → GITHUB_PRIVATE_KEY (with \n for newlines, or your platform's
multi-line env var syntax) into .env, then restart the container and
install the app on whichever repos you want it watching (Settings → your
app → Install App).
Roadmap
- Semgrep + reachability + secrets + dependency-CVE scanning, unified
- CLI with JSON output, CI exit codes
- LLM triage layer (bring your own key)
- Deterministic autofix diffs (Semgrep
fix:+ dependency bumps) - GitHub App: runs on every PR, posts a Check Run + review comments, opens autofix PRs for mechanical fixes
- Docker image /
docker compose upself-hosting -
sentinel check— package trust check (CVEs, typosquat, maintainer/age/install-script signals), zero install required for the hosted version at spidercob.com - OpenSSF Scorecard integration for
sentinel check -
sentinel checkfor Go/crates.io/Maven (osv-scan already covers their CVEs; age/maintainer/typosquat signals aren't wired up for them yet) - Slack Q&A ("are we exposed to CVE-XXXX?")
- Broader autofix coverage (more manifest formats)
- Batch Semgrep invocations per language instead of one process per file
Not planned: cloud/infra config scanning, cross-file taint tracking, LLM-generated code patches.
License
Apache-2.0
Metadata
Release files for spidercob-sentinel 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| spidercob_sentinel-0.2.0.tar.gz | 72.3 kB | Without provenance | Details for spidercob_sentinel-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| spidercob_sentinel-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for spidercob_sentinel-0.2.0-py3-none-any.whl |
Total release size: 143.2 kB
Release files / spidercob_sentinel-0.2.0.tar.gz
| Download URL | spidercob_sentinel-0.2.0.tar.gz |
|---|---|
| Size | 72.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0f96e928fb2c686aefe0517a517cb51eb2ef5ca70c3fa61ba852720c58b362b6
|
|
BLAKE2b-256 checksum How to use checksums |
011c240da8e5ec2de27d5d6685ca15e2ac0dd40e5d0b3a7eccd23de81989edbd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / spidercob_sentinel-0.2.0-py3-none-any.whl
| Download URL | spidercob_sentinel-0.2.0-py3-none-any.whl |
|---|---|
| Size | 71.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
25cfe9879e6ca66b8702f8d476ef33d5ae11e9689953978381fd9c7493b4bfb5
|
|
BLAKE2b-256 checksum How to use checksums |
13d4eadf57080bd6bfb7f334ef09c4787c4c54ff5b9622be3dca6da74882d345
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Security for spidercob-sentinel 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.