Files
GDPRScanner/.gitignore
T
StyxX65andClaude Sonnet 5 edc820051e
Build — Windows, Linux & macOS / GDPRScanner / linux (push) Has been cancelled
Build — Windows, Linux & macOS / GDPRScanner / macos (push) Has been cancelled
Build — Windows, Linux & macOS / GDPRScanner / windows (push) Has been cancelled
Build — Windows, Linux & macOS / Create GitHub Release (push) Has been cancelled
Fix classification/ directory never matching where data files lived
The code has always expected classification/m365_skus.json and
classification/google_ou_roles.json (present since the initial commit
in m365_connector.py, google_connector.py, and build_gdpr.py's own
skus_dir variable) - but the actual data files lived in skus/ under a
different name (education.json) or just the wrong directory. Both
loaders degrade to a fallback on failure, so this was never fatal, but
it meant:

- M365 SKU-based role classification silently ran on fragment-matching
  only, never touching the real 13 student + 11 staff SKU list.
- Google Workspace OU-based role classification silently used a
  hardcoded 4-prefix fallback missing real categories the actual
  config has - /Elev, /Pupils (student), /Teachers, /Admin (staff).
  _load_ou_roles() had a bare `except Exception: return <fallback>`
  with no logging at all, so this had zero visibility anywhere.

Fix: moved both files to classification/ (git mv, so history is
preserved), updated .gitignore's exception rule from !skus/*.json to
!classification/*.json, fixed the stale "skus/google_ou_roles.json"
docstring, and added a module logger + proper warning/error logging to
_load_ou_roles() matching the pattern _load_sku_data() already used -
so if this class of bug recurs, it won't be silent again.

Verified: both loaders now log successful loads with the real counts
(13+11 SKUs, 4+6 OU prefixes including the previously-missing
categories), all 227 tests still pass, and a full app boot confirms
the startup warning is gone and the app still serves normally.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-03 22:58:24 +02:00

92 lines
3.0 KiB
Plaintext

# VERSION, CHANGELOG.md, LICENSE, README.md — always commit these
# (VERSION is plain text, not JSON, so the *.json rule does not catch it)
# ── Credentials and config (NEVER commit these) ───────────────────────────────
*.json
!lang/*.json
!keywords/*.json
!classification/*.json
!package*.json
# Be explicit about the most sensitive files
.m365_scanner_config.json
.m365_scanner_smtp.json
.m365_scanner_settings.json
.m365_scanner_delta.json
.m365_scanner_checkpoint.json
.m365_scanner_lang
.document_scanner_lang
# ── Databases (contain personal data) ────────────────────────────────────────
*.db
*.sqlite
*.sqlite3
# ── Audit logs (contain personal data) ───────────────────────────────────────
*.jsonl
scanner_audit.jsonl
# ── Python ────────────────────────────────────────────────────────────────────
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
venv/
.venv/
env/
ENV/
*.egg-info/
dist/
build/
.eggs/
pip-wheel-metadata/
*.egg
# ── PyInstaller output ────────────────────────────────────────────────────────
dist/
build/
*.spec
*.exe
*.app
# ── Node (docx generation) ────────────────────────────────────────────────────
node_modules/
npm-debug.log*
# ── macOS ─────────────────────────────────────────────────────────────────────
.DS_Store
.DS_Store?
._*
.Spotlight-V3
.Trashes
Icon?
# ── Windows ───────────────────────────────────────────────────────────────────
Thumbs.db
ehthumbs.db
Desktop.ini
$RECYCLE.BIN/
# ── Editor / IDE ──────────────────────────────────────────────────────────────
.vscode/
.idea/
*.swp
*.swo
*~
.project
.settings/
# ── Test artifacts ────────────────────────────────────────────────────────────
.pytest_cache/
.coverage
htmlcov/
.tox/
# ── Temporary / local ─────────────────────────────────────────────────────────
*.tmp
*.bak
*.orig
tools/
# Tools folder is created by the installer — not part of the repo