Commit graph

10 commits

Author SHA1 Message Date
cae3dbb985 feat: KI-gestützte Inhaltsanalyse via OpenRouter (hash-gegated)
Optionale semantische Prüfung von Text und Bildern (inkl. OCR) auf
problematische Inhalte ohne Link-Signal: Pornografie, Propaganda,
diffamierende/strafbare Texte, versteckter Spam, themenfremde Werbung,
widersprüchliche Aussagen. Bewertet die thematische Passung zum
deklarierten site_context — eingestreute Heimat-Begriffe täuschen die
Erkennung nicht.

Kern:
- scanner/ai_analyzer.py: run_ai_analysis + score_ai_findings.
  Hash-Gate über data/ai_ledger.json → unveränderte Inhalte = Cache-
  Treffer = kein API-Call. Nur neue/geänderte Inhalte kosten etwas.
- Modell-Kette mit zweifacher Eskalation (Stufe 1+2 free, Stufe 3
  günstig bezahlt); eskaliert bei Fehler ODER Timeout (attempt_timeout).
  Erfolgreiches Modell wird im Ledger vermerkt.
- KI-Funde sind auf GELB gedeckelt — ROT bleibt harten Integritäts-
  Signalen vorbehalten. Graceful degradation: ohne Key/bei Fehler wird
  übersprungen, Scan läuft unverändert weiter.

Integration:
- baseline.py: load/save_ai_ledger, dismiss_ai_entries.
- config.py: ai_analysis-Block + ai_* Scoring-Schlüssel.
- __main__.py: Einhängung in cmd_scan/cmd_check, ai-dismiss-Subcommand,
  approve quittiert zugehörige Funde, status-Anzeige, diff-only + report.
- alerter.py + __main__.py: beanstandete Dateien erscheinen mit URL,
  Begründung und Quittier-Fingerprint in E-Mail UND Markdown-Report.
- plain.py: laienverständliche KI-Sätze.

API-Key nur aus Umgebungsvariable (OPENROUTER_API_KEY). Audio/Video als
abschaltbare Hooks vorbereitet (default aus).

Modelle live gegen OpenRouter verifiziert; Demo auf bredelar.info zeigte
korrekte Erkennung (echter Inhalt clean, eingeschleuster Casino-Spam mit
Heimat-Begriffen als hidden_spam erkannt).

Tests: 227 grün (+26 für ai_analyzer, +1 für E-Mail-KI-Abschnitt).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 00:04:33 +02:00
0aaf53135a docs: comprehensive documentation update
README.md:
- Workflow examples updated to URL-first syntax throughout
- report --diff-only added to Incident and Legitimate-Change workflows
- scanner.sh symlink hint added to installation section
- Directory structure overhauled: per-site layout, scanner.sh, template dir
- Removed report --diff-only from "not implemented" extensions list

BEDIENUNGSANLEITUNG.md:
- Section 2: scanner.sh wrapper usage added
- Section 4: manual scan uses URL-first syntax
- Section 9 (alarm): report --diff-only as first investigation step,
  updated all commands to URL-first syntax
- Section 16: directory structure reflects per-site layout + scanner.sh
- Section 19: asset baseline setup now correctly described as automatic

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 22:34:25 +02:00
1dd51809b7 docs: document report --diff-only in README and Bedienungsanleitung
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 22:28:52 +02:00
beb7f274a3 docs: update README + Bedienungsanleitung; fix config.py SMTP defaults
- test-alert subcommand documented in both files
- Cron examples extended with www.bergbauspuren-bredelar.de (03:30)
- "Neue Website hinzufügen" updated to URL-first syntax
- Bedienungsanleitung: sitemap option, CF7 ignore_pattern example, generic header
- config.py: SMTP defaults corrected (smtp_host, smtp_user, from, to)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 22:17:34 +02:00
fcbccce422 feat: URL-first CLI + auto-setup for new targets
- python -m scanner https://domain.de scan  (URL as first positional arg)
- On first use, the domain directory is auto-created from the
  meine-seite.de template with all paths and target URL substituted
- scanner.sh wrapper script for convenient ./scanner.sh usage
- --config syntax fully preserved (cron jobs unchanged)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 16:29:43 +02:00
08566c7807 docs: explain why cron jobs should be staggered (network/CPU load)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 15:48:30 +02:00
c6e72dad9c refactor: rename example.com template to meine-seite.de
Replaces the placeholder domain example.com with meine-seite.de
throughout the template directory and config. Tests and scanner defaults
retain example.com as a generic RFC 2606 placeholder.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 15:43:44 +02:00
Your Name
2f985c8d59 docs: update cron setup for multi-site structure
Both README.md and BEDIENUNGSANLEITUNG.md now show the correct
cron entries using --config <site>/config.yaml, one entry per site
with staggered start times (03:00 / 03:15).

Added "Neue Website hinzufügen" step-by-step guide and updated
log-rotation path to */logs/*.log (covers all sites).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 15:12:25 +02:00
Your Name
bed20db8bd feat: Laientauglichkeit — Auto-Modus, Klartext-Ausgabe, einfachere Doku
Ziel: ein einziger täglicher Befehl genügt, jede Meldung ist auch ohne
IT-Wissen verständlich.

Auto-Modus (ein Cron-Job genügt für alles):
- data/state.json merkt sich, wann die Wochen-Prüfungen zuletzt liefen
  (baseline.py: load_state/save_state/is_check_due/mark_check_run)
- `scan` führt fällige Zusatzprüfungen (Tarnung/externe Links/Dateien)
  automatisch mit aus; Gesamt-Ampel = schlechtestes Teilergebnis;
  EIN kombinierter Report + EIN Alert
- neuer Config-Abschnitt periodic_checks (Default: wöchentlich, an)

Klartext (scanner/plain.py):
- Ampel 🟢/🟡/🔴 + Sätze ohne Fachbegriffe, aus den strukturierten Befunden
- Report: Klartext oben, "Technische Details (für Ihren Dienstleister)" unten
- Terminal-Ausgabe und E-Mail (alerter.py) ebenso umgestellt

Komfort:
- approve --all/--rebuild legt die Datei-Überwachung automatisch mit an
  (Opt-out: --skip-assets); approve-assets bleibt für den Sonderfall
- status zeigt Ampel zuoberst + wann die Wochen-Prüfungen zuletzt liefen
- Onboarding-Text in einfacher Sprache, wenn noch kein Vergleichsstand existiert

Doku: README + BEDIENUNGSANLEITUNG mit "In 3 Schritten"-Einstieg.

Tests: test_state.py, test_plain.py (Fachbegriff-Assertion), Auto-Asset-
Baseline-Test. 165 Tests grün.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 11:14:05 +02:00
Your Name
98e8d11eb5 feat: initial implementation of website integrity scanner
Python-Package zur unabhängigen Überwachung statischer Websites gegen
SEO-Spam und unbefugte Manipulationen. Läuft außerhalb des Hosters.

Kernfunktionen:
- Reiner Python-Crawler (bs4+lxml), kein wget
- Baseline-Management mit manuellem Freigabe-Workflow (niemals automatisch)
- Text-/Link-/Meta-Diff mit Risiko-Scoring (grün/gelb/rot)
- Hidden-Content-Erkennung (CSS inline, noscript, Kommentar-Links)
- Whitelist für externe Domains und interne Pfade
- E-Mail + Webhook Alarmierung
- CLI: init, crawl, check, scan, approve, report, status
- 79 Unit-Tests (pytest), alle grün

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 00:51:41 +02:00