sitevigil 0.8.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sitevigil-0.8.0/LICENSE +21 -0
- sitevigil-0.8.0/PKG-INFO +149 -0
- sitevigil-0.8.0/README.md +136 -0
- sitevigil-0.8.0/pyproject.toml +22 -0
- sitevigil-0.8.0/setup.cfg +4 -0
- sitevigil-0.8.0/src/sitevigil/__init__.py +2 -0
- sitevigil-0.8.0/src/sitevigil/__main__.py +6 -0
- sitevigil-0.8.0/src/sitevigil/audit.py +1131 -0
- sitevigil-0.8.0/src/sitevigil/cli.py +172 -0
- sitevigil-0.8.0/src/sitevigil/mcp_server.py +140 -0
- sitevigil-0.8.0/src/sitevigil.egg-info/PKG-INFO +149 -0
- sitevigil-0.8.0/src/sitevigil.egg-info/SOURCES.txt +14 -0
- sitevigil-0.8.0/src/sitevigil.egg-info/dependency_links.txt +1 -0
- sitevigil-0.8.0/src/sitevigil.egg-info/entry_points.txt +2 -0
- sitevigil-0.8.0/src/sitevigil.egg-info/top_level.txt +1 -0
- sitevigil-0.8.0/tests/test_audit.py +311 -0
sitevigil-0.8.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Aql Edna Salam
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
sitevigil-0.8.0/PKG-INFO
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: sitevigil
|
|
3
|
+
Version: 0.8.0
|
|
4
|
+
Summary: One-command website security audit for humans and AI agents: security headers, cookies, TLS, CORS and exposed files, scored 0-100 with a concrete fix for every finding.
|
|
5
|
+
Author-email: Aql <aql@ednasalam.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/aqles/sitevigil
|
|
8
|
+
Keywords: security,audit,headers,mcp,cli,tls
|
|
9
|
+
Requires-Python: >=3.10
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Dynamic: license-file
|
|
13
|
+
|
|
14
|
+
# SiteVigil
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
. o . o .
|
|
18
|
+
______ _____ _______ ______ __ __ _____ ______ _____ _
|
|
19
|
+
/ ____/ |_ _||__ __|| ____|\ \ / /|_ _| / ____/ |_ _|| |
|
|
20
|
+
| (___ | | | | | |__ \ \ / / | | | | ___ | | | |
|
|
21
|
+
\___ \ | | | | | __| \ \/ / | | | | |_ | | | | |
|
|
22
|
+
____) | _| |_ | | | |____ \ / _| |_ | |___| | _| |_ | |____
|
|
23
|
+
|_____/ |_____| |_| |______| \/ |_____| \_____/ |_____||______|
|
|
24
|
+
| | |
|
|
25
|
+
. . \___/
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
**One command. A security audit of any website — scored, explained, and with the fix written out for you.**
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
sitevigil aqles.github.io
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
https://aqles.github.io
|
|
36
|
+
Score: 75/100 Grade: C HTTP 200
|
|
37
|
+
|
|
38
|
+
[MEDIUM ] Missing Content-Security-Policy header
|
|
39
|
+
No CSP header; the page has no second line of defence against XSS.
|
|
40
|
+
Fix: Add a CSP that fits your site, starting strict, e.g. Content-Security-Policy: default-src 'self'
|
|
41
|
+
[LOW ] Missing X-Content-Type-Options: nosniff
|
|
42
|
+
Header absent or not set to 'nosniff'.
|
|
43
|
+
Fix: Add: X-Content-Type-Options: nosniff
|
|
44
|
+
[MEDIUM ] No clickjacking protection
|
|
45
|
+
Neither X-Frame-Options (DENY/SAMEORIGIN) nor CSP frame-ancestors is set.
|
|
46
|
+
Fix: Add: X-Frame-Options: DENY (or SAMEORIGIN), or frame-ancestors 'none' in your CSP.
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
SiteVigil is a small Python tool with **zero dependencies** — standard library only. It runs the checks that turn up again and again when real websites get audited, it works as a plain CLI for humans, and it speaks MCP so AI coding agents (Claude Code, Cursor, …) can run the same audit and fix what it finds.
|
|
50
|
+
|
|
51
|
+
## Why not just use a free web checker?
|
|
52
|
+
|
|
53
|
+
Fair question — sites like SecurityHeaders or Mozilla Observatory grade a page for free, and for a one-off look they're fine. SiteVigil exists for everything around that moment:
|
|
54
|
+
|
|
55
|
+
- **It hands you the patch, not just the grade.** `--fix` generates a ready-to-commit config for your actual platform (Vercel, Netlify, Cloudflare Pages, nginx, Apache). On GitHub Pages it tells you plainly that headers are a platform limit and gives you the portable `_headers` file instead of a lecture.
|
|
56
|
+
- **It lives where you work.** Terminal, CI (`--fail-under`, `--baseline`), and inside your AI agent via MCP — a web page can't fail your deploy or re-check a fix.
|
|
57
|
+
- **It checks more than headers.** Exposed `.env`/`.git` (verified by content, not status codes), CORS reflection, cookie flags, mixed content, missing SRI, TRACE, TLS expiry, security.txt.
|
|
58
|
+
- **It remembers.** Save a report, come back next week, and `--baseline` shows exactly what regressed and what got fixed — web checkers have no memory of your last scan.
|
|
59
|
+
|
|
60
|
+
## What it checks
|
|
61
|
+
|
|
62
|
+
| Area | Checks |
|
|
63
|
+
| --- | --- |
|
|
64
|
+
| Transport | HTTPS in place, HTTP → HTTPS redirect, TLS protocol, certificate expiry, redirect chains (downgrade hops, chains over 3 hops) |
|
|
65
|
+
| Security headers | HSTS, Content-Security-Policy (incl. `unsafe-inline` / `unsafe-eval` / wildcard sources), X-Content-Type-Options, clickjacking, Referrer-Policy, Permissions-Policy |
|
|
66
|
+
| Cookies | Secure, HttpOnly (on session-like cookies), SameSite |
|
|
67
|
+
| CORS | Arbitrary-origin reflection, `*` combined with credentials |
|
|
68
|
+
| Exposed files | `/.env`, `/.git/HEAD`, `/.git/config` |
|
|
69
|
+
| Page content | Mixed content (HTTP subresources on an HTTPS page), cross-origin scripts without Subresource Integrity |
|
|
70
|
+
| Methods & discovery | HTTP TRACE enabled, missing `/.well-known/security.txt` |
|
|
71
|
+
| Isolation | Cross-Origin-Opener-Policy, Cross-Origin-Resource-Policy, CSP hardening directives (object-src / base-uri) |
|
|
72
|
+
| Domain (via DNS) | SPF and DMARC (only when the domain receives mail), CAA |
|
|
73
|
+
| Known vulnerabilities | Software/version fingerprints (nginx, Apache, PHP, OpenSSL, IIS, WordPress, Drupal, Joomla) matched against NVD CVEs, verified against each CVE's vulnerable version ranges — plus jQuery and WordPress plugins (Elementor, WooCommerce, Contact Form 7, Akismet) fingerprinted from the page source |
|
|
74
|
+
| Info disclosure | `Server`, `X-Powered-By` |
|
|
75
|
+
|
|
76
|
+
The full catalog — 30+ checks, each with its reference — is one command away: `sitevigil --checks`. Checks are versioned as a **ruleset** (currently `2026.11`); every report names the ruleset that produced it, and changes land in [CHANGELOG.md](CHANGELOG.md), never silently. To keep a site up to date automatically, drop in the weekly GitHub Action from [examples/github-action](examples/github-action/sitevigil-weekly.yml): it re-audits on a schedule and fails on score drops or regressions.
|
|
77
|
+
|
|
78
|
+
Every finding includes what was actually observed and a concrete fix — not just a warning label.
|
|
79
|
+
|
|
80
|
+
Two details that took real-world pain to learn:
|
|
81
|
+
|
|
82
|
+
- **No soft-404 false positives.** Many sites (SPAs, some hosts) answer `200` with their homepage for *every* path. SiteVigil only reports an exposed file when the response content actually matches a real `.env` / git file — a bare `200` is never enough.
|
|
83
|
+
- **CVE matches are verified, not googled.** NVD search happily returns CVEs that only *mention* your software. SiteVigil re-checks every candidate against the CVE's own vulnerable configurations and version ranges before reporting it, scores it with NVD's primary CVSS, and prints the backport caveat next to every match — a version string alone never proves a server is unpatched.
|
|
84
|
+
- **Proxy-aware TLS.** If you sit behind a corporate proxy (`https_proxy`), the TLS check tunnels through it with `CONNECT` instead of dying with `WRONG_VERSION_NUMBER`.
|
|
85
|
+
|
|
86
|
+
## Install
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
pip install sitevigil # once published to PyPI
|
|
90
|
+
# or straight from the repo:
|
|
91
|
+
pip install git+https://github.com/aqles/sitevigil
|
|
92
|
+
# or just run it from a clone, no install needed:
|
|
93
|
+
python -m sitevigil example.com
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Requires Python 3.10+. That's it — nothing else gets installed.
|
|
97
|
+
|
|
98
|
+
## Use it
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
sitevigil example.com # human-readable report
|
|
102
|
+
sitevigil example.com --json # structured output, for scripts and agents
|
|
103
|
+
sitevigil example.com --markdown # a report you can paste into an issue
|
|
104
|
+
sitevigil example.com --html > report.html # one self-contained HTML report
|
|
105
|
+
sitevigil a.com b.com c.com # audit several sites, with a summary table
|
|
106
|
+
sitevigil example.com --fail-under 80 # CI mode: exit 1 if the score is below 80
|
|
107
|
+
sitevigil example.com --fix # + a ready-to-commit header config for your platform
|
|
108
|
+
sitevigil example.com --json > monday.json # save a baseline
|
|
109
|
+
sitevigil example.com --baseline monday.json # next week: what regressed? (exit 1 on new findings)
|
|
110
|
+
sitevigil example.com --crawl 10 # audit up to 10 pages (sitemap.xml, else homepage links)
|
|
111
|
+
sitevigil example.com --badge > badge.svg # an SVG score badge for your README
|
|
112
|
+
sitevigil example.com --no-cve # skip the CVE lookup (faster, fully offline)
|
|
113
|
+
sitevigil example.com --html --output report.html # write any format straight to a file
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Scoring starts at 100 and loses points per finding (critical 25, high 15, medium 8, low 3), ending in a grade from A to F.
|
|
117
|
+
|
|
118
|
+
## Let your AI agent use it
|
|
119
|
+
|
|
120
|
+
SiteVigil ships an MCP server (still stdlib-only). Local agents use stdio; hosted agents can use the HTTP transport:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
sitevigil --mcp # stdio, for desktop/CLI agents
|
|
124
|
+
sitevigil --mcp-http 8900 # HTTP on localhost, for hosted agents
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
MCP is a shared protocol, so **one server works with every MCP-compatible agent** — Claude Code, Claude Desktop, Cursor, Windsurf, VS Code, Gemini CLI — no per-agent builds. Only the config file's location changes; ready-to-paste snippets for each agent live in [examples/mcp](examples/mcp/README.md). Interoperability is not just claimed: the server is tested against the official MCP Python SDK client (initialize → tool list → a real `audit_site` call).
|
|
128
|
+
|
|
129
|
+
Your agent gets two tools: `audit_site` (the full scored report) and `suggest_fix` (the audit plus a ready-to-commit, platform-specific header config). It can check a site before telling you it's "secure" — or audit the fix it just deployed.
|
|
130
|
+
|
|
131
|
+
## Honest limits
|
|
132
|
+
|
|
133
|
+
- It audits the response of the URL you give it (plus `/.env` / `/.git` probes). It is not a vulnerability scanner and it does not fuzz, brute-force, or log in anywhere.
|
|
134
|
+
- Only audit sites you own or have permission to test. The probes are read-only `GET`s, but scanning other people's property without permission is still a bad idea.
|
|
135
|
+
- A high score means these basics are in place. It is not a guarantee that a site is secure.
|
|
136
|
+
|
|
137
|
+
## Development
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
git clone https://github.com/aqles/sitevigil
|
|
141
|
+
cd sitevigil
|
|
142
|
+
PYTHONPATH=src python -m unittest discover -s tests -v
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
The test fixture is a local HTTP server that deliberately serves a soft-404 for unknown paths and a real-looking `.env` file — the audit has to catch one and ignore the other.
|
|
146
|
+
|
|
147
|
+
## License
|
|
148
|
+
|
|
149
|
+
MIT — see [LICENSE](LICENSE). Use it, fork it, ship it; just keep the copyright notice. If SiteVigil saves you from shipping a site with an exposed `.env`, a star is the going rate.
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# SiteVigil
|
|
2
|
+
|
|
3
|
+
```
|
|
4
|
+
. o . o .
|
|
5
|
+
______ _____ _______ ______ __ __ _____ ______ _____ _
|
|
6
|
+
/ ____/ |_ _||__ __|| ____|\ \ / /|_ _| / ____/ |_ _|| |
|
|
7
|
+
| (___ | | | | | |__ \ \ / / | | | | ___ | | | |
|
|
8
|
+
\___ \ | | | | | __| \ \/ / | | | | |_ | | | | |
|
|
9
|
+
____) | _| |_ | | | |____ \ / _| |_ | |___| | _| |_ | |____
|
|
10
|
+
|_____/ |_____| |_| |______| \/ |_____| \_____/ |_____||______|
|
|
11
|
+
| | |
|
|
12
|
+
. . \___/
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
**One command. A security audit of any website — scored, explained, and with the fix written out for you.**
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
sitevigil aqles.github.io
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
https://aqles.github.io
|
|
23
|
+
Score: 75/100 Grade: C HTTP 200
|
|
24
|
+
|
|
25
|
+
[MEDIUM ] Missing Content-Security-Policy header
|
|
26
|
+
No CSP header; the page has no second line of defence against XSS.
|
|
27
|
+
Fix: Add a CSP that fits your site, starting strict, e.g. Content-Security-Policy: default-src 'self'
|
|
28
|
+
[LOW ] Missing X-Content-Type-Options: nosniff
|
|
29
|
+
Header absent or not set to 'nosniff'.
|
|
30
|
+
Fix: Add: X-Content-Type-Options: nosniff
|
|
31
|
+
[MEDIUM ] No clickjacking protection
|
|
32
|
+
Neither X-Frame-Options (DENY/SAMEORIGIN) nor CSP frame-ancestors is set.
|
|
33
|
+
Fix: Add: X-Frame-Options: DENY (or SAMEORIGIN), or frame-ancestors 'none' in your CSP.
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
SiteVigil is a small Python tool with **zero dependencies** — standard library only. It runs the checks that turn up again and again when real websites get audited, it works as a plain CLI for humans, and it speaks MCP so AI coding agents (Claude Code, Cursor, …) can run the same audit and fix what it finds.
|
|
37
|
+
|
|
38
|
+
## Why not just use a free web checker?
|
|
39
|
+
|
|
40
|
+
Fair question — sites like SecurityHeaders or Mozilla Observatory grade a page for free, and for a one-off look they're fine. SiteVigil exists for everything around that moment:
|
|
41
|
+
|
|
42
|
+
- **It hands you the patch, not just the grade.** `--fix` generates a ready-to-commit config for your actual platform (Vercel, Netlify, Cloudflare Pages, nginx, Apache). On GitHub Pages it tells you plainly that headers are a platform limit and gives you the portable `_headers` file instead of a lecture.
|
|
43
|
+
- **It lives where you work.** Terminal, CI (`--fail-under`, `--baseline`), and inside your AI agent via MCP — a web page can't fail your deploy or re-check a fix.
|
|
44
|
+
- **It checks more than headers.** Exposed `.env`/`.git` (verified by content, not status codes), CORS reflection, cookie flags, mixed content, missing SRI, TRACE, TLS expiry, security.txt.
|
|
45
|
+
- **It remembers.** Save a report, come back next week, and `--baseline` shows exactly what regressed and what got fixed — web checkers have no memory of your last scan.
|
|
46
|
+
|
|
47
|
+
## What it checks
|
|
48
|
+
|
|
49
|
+
| Area | Checks |
|
|
50
|
+
| --- | --- |
|
|
51
|
+
| Transport | HTTPS in place, HTTP → HTTPS redirect, TLS protocol, certificate expiry, redirect chains (downgrade hops, chains over 3 hops) |
|
|
52
|
+
| Security headers | HSTS, Content-Security-Policy (incl. `unsafe-inline` / `unsafe-eval` / wildcard sources), X-Content-Type-Options, clickjacking, Referrer-Policy, Permissions-Policy |
|
|
53
|
+
| Cookies | Secure, HttpOnly (on session-like cookies), SameSite |
|
|
54
|
+
| CORS | Arbitrary-origin reflection, `*` combined with credentials |
|
|
55
|
+
| Exposed files | `/.env`, `/.git/HEAD`, `/.git/config` |
|
|
56
|
+
| Page content | Mixed content (HTTP subresources on an HTTPS page), cross-origin scripts without Subresource Integrity |
|
|
57
|
+
| Methods & discovery | HTTP TRACE enabled, missing `/.well-known/security.txt` |
|
|
58
|
+
| Isolation | Cross-Origin-Opener-Policy, Cross-Origin-Resource-Policy, CSP hardening directives (object-src / base-uri) |
|
|
59
|
+
| Domain (via DNS) | SPF and DMARC (only when the domain receives mail), CAA |
|
|
60
|
+
| Known vulnerabilities | Software/version fingerprints (nginx, Apache, PHP, OpenSSL, IIS, WordPress, Drupal, Joomla) matched against NVD CVEs, verified against each CVE's vulnerable version ranges — plus jQuery and WordPress plugins (Elementor, WooCommerce, Contact Form 7, Akismet) fingerprinted from the page source |
|
|
61
|
+
| Info disclosure | `Server`, `X-Powered-By` |
|
|
62
|
+
|
|
63
|
+
The full catalog — 30+ checks, each with its reference — is one command away: `sitevigil --checks`. Checks are versioned as a **ruleset** (currently `2026.11`); every report names the ruleset that produced it, and changes land in [CHANGELOG.md](CHANGELOG.md), never silently. To keep a site up to date automatically, drop in the weekly GitHub Action from [examples/github-action](examples/github-action/sitevigil-weekly.yml): it re-audits on a schedule and fails on score drops or regressions.
|
|
64
|
+
|
|
65
|
+
Every finding includes what was actually observed and a concrete fix — not just a warning label.
|
|
66
|
+
|
|
67
|
+
Two details that took real-world pain to learn:
|
|
68
|
+
|
|
69
|
+
- **No soft-404 false positives.** Many sites (SPAs, some hosts) answer `200` with their homepage for *every* path. SiteVigil only reports an exposed file when the response content actually matches a real `.env` / git file — a bare `200` is never enough.
|
|
70
|
+
- **CVE matches are verified, not googled.** NVD search happily returns CVEs that only *mention* your software. SiteVigil re-checks every candidate against the CVE's own vulnerable configurations and version ranges before reporting it, scores it with NVD's primary CVSS, and prints the backport caveat next to every match — a version string alone never proves a server is unpatched.
|
|
71
|
+
- **Proxy-aware TLS.** If you sit behind a corporate proxy (`https_proxy`), the TLS check tunnels through it with `CONNECT` instead of dying with `WRONG_VERSION_NUMBER`.
|
|
72
|
+
|
|
73
|
+
## Install
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
pip install sitevigil # once published to PyPI
|
|
77
|
+
# or straight from the repo:
|
|
78
|
+
pip install git+https://github.com/aqles/sitevigil
|
|
79
|
+
# or just run it from a clone, no install needed:
|
|
80
|
+
python -m sitevigil example.com
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Requires Python 3.10+. That's it — nothing else gets installed.
|
|
84
|
+
|
|
85
|
+
## Use it
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
sitevigil example.com # human-readable report
|
|
89
|
+
sitevigil example.com --json # structured output, for scripts and agents
|
|
90
|
+
sitevigil example.com --markdown # a report you can paste into an issue
|
|
91
|
+
sitevigil example.com --html > report.html # one self-contained HTML report
|
|
92
|
+
sitevigil a.com b.com c.com # audit several sites, with a summary table
|
|
93
|
+
sitevigil example.com --fail-under 80 # CI mode: exit 1 if the score is below 80
|
|
94
|
+
sitevigil example.com --fix # + a ready-to-commit header config for your platform
|
|
95
|
+
sitevigil example.com --json > monday.json # save a baseline
|
|
96
|
+
sitevigil example.com --baseline monday.json # next week: what regressed? (exit 1 on new findings)
|
|
97
|
+
sitevigil example.com --crawl 10 # audit up to 10 pages (sitemap.xml, else homepage links)
|
|
98
|
+
sitevigil example.com --badge > badge.svg # an SVG score badge for your README
|
|
99
|
+
sitevigil example.com --no-cve # skip the CVE lookup (faster, fully offline)
|
|
100
|
+
sitevigil example.com --html --output report.html # write any format straight to a file
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Scoring starts at 100 and loses points per finding (critical 25, high 15, medium 8, low 3), ending in a grade from A to F.
|
|
104
|
+
|
|
105
|
+
## Let your AI agent use it
|
|
106
|
+
|
|
107
|
+
SiteVigil ships an MCP server (still stdlib-only). Local agents use stdio; hosted agents can use the HTTP transport:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
sitevigil --mcp # stdio, for desktop/CLI agents
|
|
111
|
+
sitevigil --mcp-http 8900 # HTTP on localhost, for hosted agents
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
MCP is a shared protocol, so **one server works with every MCP-compatible agent** — Claude Code, Claude Desktop, Cursor, Windsurf, VS Code, Gemini CLI — no per-agent builds. Only the config file's location changes; ready-to-paste snippets for each agent live in [examples/mcp](examples/mcp/README.md). Interoperability is not just claimed: the server is tested against the official MCP Python SDK client (initialize → tool list → a real `audit_site` call).
|
|
115
|
+
|
|
116
|
+
Your agent gets two tools: `audit_site` (the full scored report) and `suggest_fix` (the audit plus a ready-to-commit, platform-specific header config). It can check a site before telling you it's "secure" — or audit the fix it just deployed.
|
|
117
|
+
|
|
118
|
+
## Honest limits
|
|
119
|
+
|
|
120
|
+
- It audits the response of the URL you give it (plus `/.env` / `/.git` probes). It is not a vulnerability scanner and it does not fuzz, brute-force, or log in anywhere.
|
|
121
|
+
- Only audit sites you own or have permission to test. The probes are read-only `GET`s, but scanning other people's property without permission is still a bad idea.
|
|
122
|
+
- A high score means these basics are in place. It is not a guarantee that a site is secure.
|
|
123
|
+
|
|
124
|
+
## Development
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
git clone https://github.com/aqles/sitevigil
|
|
128
|
+
cd sitevigil
|
|
129
|
+
PYTHONPATH=src python -m unittest discover -s tests -v
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
The test fixture is a local HTTP server that deliberately serves a soft-404 for unknown paths and a real-looking `.env` file — the audit has to catch one and ignore the other.
|
|
133
|
+
|
|
134
|
+
## License
|
|
135
|
+
|
|
136
|
+
MIT — see [LICENSE](LICENSE). Use it, fork it, ship it; just keep the copyright notice. If SiteVigil saves you from shipping a site with an exposed `.env`, a star is the going rate.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "sitevigil"
|
|
7
|
+
version = "0.8.0"
|
|
8
|
+
description = "One-command website security audit for humans and AI agents: security headers, cookies, TLS, CORS and exposed files, scored 0-100 with a concrete fix for every finding."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
license = { text = "MIT" }
|
|
12
|
+
keywords = ["security", "audit", "headers", "mcp", "cli", "tls"]
|
|
13
|
+
authors = [{ name = "Aql", email = "aql@ednasalam.com" }]
|
|
14
|
+
|
|
15
|
+
[project.scripts]
|
|
16
|
+
sitevigil = "sitevigil.cli:main"
|
|
17
|
+
|
|
18
|
+
[project.urls]
|
|
19
|
+
Homepage = "https://github.com/aqles/sitevigil"
|
|
20
|
+
|
|
21
|
+
[tool.setuptools.packages.find]
|
|
22
|
+
where = ["src"]
|