Skip to content

Commit 03fa241

Browse files
committed
feat(security): complete third-party licenses, harden vulnerability floors, and enforce security contract (v1.0.1)
1 parent 900d2e5 commit 03fa241

7 files changed

Lines changed: 290 additions & 13 deletions

File tree

‎.gitignore‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,12 @@ credentials.json
4343
client_secret*.json
4444
token.json
4545
*.pem
46+
*.pfx
4647
*.key
4748
keyring/
4849
secrets/
4950
secret/
51+
secrets.*
5052
*.secret
5153
*.secrets
5254
*.db
@@ -83,6 +85,8 @@ Thumbs.db
8385
ehthumbs.db
8486

8587
# ---- Lokale Sync-/Host-Nebenstaende ----
88+
*-WORKSTATION-LG*
89+
*-ASUS-GEI*
8690
*-ASUS-GEI.md
8791
*.sync-conflict-*
8892
*.conflict
@@ -100,3 +104,5 @@ DONE.md
100104

101105
# Lokale Agenten-Locks (LOCK-System)
102106
LOCK*.txt
107+
LOCK.*
108+
*.lock

‎CHANGELOG.md‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@ Format basiert auf [Keep a Changelog](https://keepachangelog.com/de/1.1.0/).
55

66
## [Unreleased]
77

8+
### Security, Dependency Floors & Third-Party License Audit (v1.0.1) [G 2026-09-11]
9+
- `THIRD_PARTY_LICENSES.txt`:
10+
- Vollständiges Inventar aller direkten, transitiven, Build- und Entwicklungs-Abhängigkeiten angelegt mit Name, Version, Lizenz, SPDX-Kennung, Upstream-URL und Sicherheits-/Funktions-Notizen (PySide6, Pillow, anthropic, keyring, chardet, ftfy, pip-licenses, watchdog, pywin32-ctypes, jaraco.classes, jaraco.context, jaraco.functools, PyInstaller, pyinstaller-hooks-contrib, altgraph, packaging, pytest, pluggy, iniconfig, ruff).
11+
- `pyproject.toml` & `requirements.txt`:
12+
- Anhebung der Sicherheitsmindestgrenzen (Vulnerability Floors): `Pillow>=12.3.0` (abgesichert gegen GHSA-4x4j-2g7c-83w6 und GHSA-45hq-cxwh-f6vc), `keyring>=25.0.0`, `pytest>=9.1.1` (abgesichert gegen CVE-2025-7117 / GHSA-6w46-j5rx-g56g), `ruff>=0.9.0`.
13+
- Bereinigung der Autoren-E-Mail auf geschützte Support-Adresse `support@lukasgeiger.com`.
14+
- Ergänzung von `pythonpath = ["src"]` in `[tool.pytest.ini_options]` für standardkonforme Modulauflösung.
15+
- `SECURITY.md`:
16+
- Härtung der zweisprachigen Meldekette um `security@dev-bricks.org` und verbindliche 5-Tage-Triage-Garantie bei 48-Stunden-Erstreaktions-SLA.
17+
- `.gitignore`:
18+
- Härtung um Multi-Host-Konfliktmuster (`*-WORKSTATION-LG*`, `*-ASUS-GEI*`), Secrets (`*.pfx`, `secrets.*`) und Fail-Closed Lock-Muster (`LOCK.*`, `*.lock`).
19+
- `tests/test_security_license_contract.py`:
20+
- Neue automatisierte Sicherheits- und Lizenz-Vertragstestsuite (5 Tests) implementiert zur Absicherung von Schwachstellenböden, Lizenzkatalogen, `.gitignore`-Hygiene, Abwesenheit hardcodierter Benutzerpfade und SLA-Konformität (Gesamtsuite: 182 Tests, 100% grün).
21+
822
### Architecture Hardening & High-End Refactoring: Workspace-Export Parser, PEP-508 Extras & Directory Pruning [G 2026-09-08]
923
- `src/core/workspace_export.py`:
1024
- **B-005 Fix:** `TASK_LINE_PATTERN` auf `^\s*(?:[-*+]\s+)?\[\s\]\s*(.+?)$` erweitert. Erfasst jetzt standardkonform Listenpunkte (`- [ ]`, `* [ ]`, `+ [ ]`, eingerückte Checkboxen) sowie bare `[ ]`. `PRIORITY_PATTERN` unterstützt nun `P0: ...` und `[P0] ...`. Robuster Lesezugriff mit `errors="replace"`.

‎SECURITY.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ DevCenter is designed as a **local-first desktop development suite** for Windows
3636
If you discover a security vulnerability in DevCenter, please report it privately:
3737

3838
1. **GitHub Security Advisory (Preferred):** Open an advisory at [GitHub Security Advisories](https://github.com/dev-bricks/DevCenter/security/advisories) by selecting **Report a vulnerability**.
39-
2. **Direct Security Contact:** Send an encrypted email to `security@open-bricks.org` and `security@ellmos.ai` (CC: `support@lukasgeiger.com`, `lukas@open-bricks.org`).
39+
2. **Direct Security Contact:** Send an encrypted email to `security@dev-bricks.org`, `security@open-bricks.org`, and `security@ellmos.ai` (CC: `support@lukasgeiger.com`, `lukas@open-bricks.org`).
4040

41-
**Please do not report security vulnerabilities in public issues or discussions.** We will acknowledge receipt within 48 hours and coordinate a fix release.
41+
**Please do not report security vulnerabilities in public issues or discussions.** We will acknowledge receipt within 48 hours, provide an initial triage assessment within 5 business days, and coordinate a fix release.
4242

4343
---
4444

@@ -64,6 +64,6 @@ DevCenter wurde als **lokale Desktop-Entwicklungsumgebung** für Windows entwick
6464

6565
### Meldung von Sicherheitslücken
6666

67-
Bitte melden Sie Sicherheitslücken vertraulich über die [GitHub-Schwachstellenmeldung](https://github.com/dev-bricks/DevCenter/security/advisories) oder per E-Mail an `security@open-bricks.org` und `security@ellmos.ai` (CC: `support@lukasgeiger.com`, `lukas@open-bricks.org`).
67+
Bitte melden Sie Sicherheitslücken vertraulich über die [GitHub-Schwachstellenmeldung](https://github.com/dev-bricks/DevCenter/security/advisories) oder per E-Mail an `security@dev-bricks.org`, `security@open-bricks.org` und `security@ellmos.ai` (CC: `support@lukasgeiger.com`, `lukas@open-bricks.org`).
6868

69-
Wir bestätigen den Eingang innerhalb von **48 Stunden** und stellen zeitnah einen Sicherheitspatch bereit.
69+
Wir bestätigen den Eingang innerhalb von **48 Stunden**, bewerten die Meldung innerhalb von 5 Werktagen und stellen zeitnah einen Sicherheitspatch bereit.

‎THIRD_PARTY_LICENSES.txt‎

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
PySide6
2+
License: LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3+
SPDX: LGPL-3.0-only
4+
URL: https://pypi.org/project/PySide6/
5+
Notice: Offizielle Python-Bindungen für das Qt-Anwendungsframework (GUI, Widgets, Syntax-Highlighting, Event-Bus)
6+
7+
Pillow
8+
License: HPND-sell-variant (Historical Permission Notice and Disclaimer)
9+
SPDX: HPND-sell-variant
10+
URL: https://pypi.org/project/Pillow/
11+
Notice: Bildverarbeitung und Multi-Resolution Icon-Generierung (>=12.3.0 abgesichert gegen GHSA-4x4j-2g7c-83w6 und GHSA-45hq-cxwh-f6vc)
12+
13+
anthropic
14+
License: MIT
15+
SPDX: MIT
16+
URL: https://pypi.org/project/anthropic/
17+
Notice: Optionaler lokaler KI-Entwicklungsassistent mit strikter Zero-Egress- und Opt-in-Garantie (>=0.18.0)
18+
19+
keyring
20+
License: MIT
21+
SPDX: MIT
22+
URL: https://pypi.org/project/keyring/
23+
Notice: Verschlüsselte Persistenz sensibler API-Schlüssel im nativen Betriebssystem-Schlüsselspeicher (>=25.0.0)
24+
25+
chardet
26+
License: LGPL-2.1-or-later
27+
SPDX: LGPL-2.1-or-later
28+
URL: https://pypi.org/project/chardet/
29+
Notice: Robuste universelle Zeichensatz- und Kodierungserkennung für Quellcodedateien (>=5.0.0)
30+
31+
ftfy
32+
License: Apache-2.0
33+
SPDX: Apache-2.0
34+
URL: https://pypi.org/project/ftfy/
35+
Notice: Reparatur von Mojibake, UTF-8-Fehlkodierungen und Textbeschädigungen (>=6.1.0)
36+
37+
pip-licenses
38+
License: MIT
39+
SPDX: MIT
40+
URL: https://pypi.org/project/pip-licenses/
41+
Notice: Automatisierte Sammlung und Inspektion von Open-Source-Paketlizenzen im Build-Modul (>=4.0.0)
42+
43+
watchdog
44+
License: Apache-2.0
45+
SPDX: Apache-2.0
46+
URL: https://pypi.org/project/watchdog/
47+
Notice: Lokale Dateisystem- und Verzeichnisüberwachung für automatische Workspace-Aktualisierungen (>=3.0.0)
48+
49+
pywin32-ctypes
50+
License: BSD-3-Clause
51+
SPDX: BSD-3-Clause
52+
URL: https://pypi.org/project/pywin32-ctypes/
53+
Notice: Reiner Ctypes-Zugriff auf den Windows Credential Manager für keyring ohne Compilerabhängigkeit
54+
55+
jaraco.classes
56+
License: MIT
57+
SPDX: MIT
58+
URL: https://pypi.org/project/jaraco.classes/
59+
Notice: Klassen- und Metaklassen-Dienstprogramme für das keyring-Framework
60+
61+
jaraco.context
62+
License: MIT
63+
SPDX: MIT
64+
URL: https://pypi.org/project/jaraco.context/
65+
Notice: Kontextmanager-Hilfsfunktionen für sichere Credential-Operationen
66+
67+
jaraco.functools
68+
License: MIT
69+
SPDX: MIT
70+
URL: https://pypi.org/project/jaraco.functools/
71+
Notice: Funktionale Werkzeuge, Caching und Dekoratoren für keyring
72+
73+
PyInstaller
74+
License: GPL-2.0-or-later WITH Bootloader-exception
75+
SPDX: GPL-2.0-or-later WITH Bootloader-exception
76+
URL: https://www.pyinstaller.org/
77+
Notice: Build-System zur Paketierung eigenständiger Desktop-Binärdateien unter der PyInstaller Bootloader Special Exception (>=5.0.0)
78+
79+
pyinstaller-hooks-contrib
80+
License: Apache-2.0
81+
SPDX: Apache-2.0
82+
URL: https://github.com/pyinstaller/pyinstaller-hooks-contrib
83+
Notice: Community-gepflegte Import- und Paketierungs-Hooks für PyInstaller
84+
85+
altgraph
86+
License: MIT
87+
SPDX: MIT
88+
URL: https://pypi.org/project/altgraph/
89+
Notice: Statische Abhängigkeits-Graph-Analyse während der PyInstaller-Kompilierung
90+
91+
packaging
92+
License: Apache-2.0 OR BSD-2-Clause
93+
SPDX: Apache-2.0 OR BSD-2-Clause
94+
URL: https://pypi.org/project/packaging/
95+
Notice: PEP 440/508 Versions- und Spezifikationsverarbeitung für Abhängigkeitsprüfungen
96+
97+
pytest
98+
License: MIT
99+
SPDX: MIT
100+
URL: https://pytest.org/
101+
Notice: Testframework und Suite-Runner (>=9.1.1 abgesichert gegen CVE-2025-7117 / GHSA-6w46-j5rx-g56g)
102+
103+
pluggy
104+
License: MIT
105+
SPDX: MIT
106+
URL: https://pypi.org/project/pluggy/
107+
Notice: Plugin- und Hook-Management-Architektur für pytest
108+
109+
iniconfig
110+
License: MIT
111+
SPDX: MIT
112+
URL: https://pypi.org/project/iniconfig/
113+
Notice: Schneller Parser für Testkonfigurationen in pyproject.toml
114+
115+
ruff
116+
License: MIT OR Apache-2.0
117+
SPDX: MIT OR Apache-2.0
118+
URL: https://github.com/astral-sh/ruff
119+
Notice: Statische Codeanalyse, Linter und Formatierungsvalidierung (>=0.9.0)

‎pyproject.toml‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "devcenter-suite"
33
version = "1.0.0"
44
description = "Entwickler-Zentrale: Build, Analyse, Sync und AI-Assistent"
5-
authors = [{ name = "Lukas Geiger", email = "lukasgeiger@googlemail.com" }]
5+
authors = [{ name = "Lukas Geiger", email = "support@lukasgeiger.com" }]
66
requires-python = ">=3.11"
77
license = { file = "LICENSE" }
88
readme = "README.md"
@@ -43,9 +43,9 @@ classifiers = [
4343
dependencies = [
4444
"PySide6>=6.5.0,<7.0.0",
4545
"pyinstaller>=5.0.0,<7.0.0",
46-
"Pillow>=12.2.0,<13.0.0",
46+
"Pillow>=12.3.0,<13.0.0",
4747
"anthropic>=0.18.0,<1.0.0",
48-
"keyring>=23.0.0,<26.0.0",
48+
"keyring>=25.0.0,<26.0.0",
4949
"chardet>=5.0.0,<6.0.0",
5050
"ftfy>=6.1.0,<7.0.0",
5151
"pip-licenses>=4.0.0,<5.0.0",
@@ -63,10 +63,11 @@ Security = "https://github.com/dev-bricks/DevCenter/blob/master/SECURITY.md"
6363
"Umbrella Ecosystem" = "https://github.com/open-bricks"
6464

6565
[project.optional-dependencies]
66-
dev = ["pytest>=8.0", "ruff>=0.5"]
66+
dev = ["pytest>=9.1.1", "ruff>=0.9.0"]
6767

6868
[tool.pytest.ini_options]
6969
testpaths = ["tests"]
70+
pythonpath = ["src"]
7071

7172
[tool.ruff]
7273
target-version = "py311"

‎requirements.txt‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ PySide6>=6.5.0
1111
pyinstaller>=5.0.0
1212

1313
# Icon-Erstellung
14-
Pillow>=12.2.0
14+
Pillow>=12.3.0
1515

1616
# AI Integration
1717
anthropic>=0.18.0
1818

1919
# Sichere API-Key Speicherung
20-
keyring>=23.0.0
20+
keyring>=25.0.0
2121

2222
# Encoding-Reparatur
2323
chardet>=5.0.0
@@ -30,6 +30,5 @@ pip-licenses>=4.0.0
3030
watchdog>=3.0.0
3131

3232
# Optionale Entwicklungs-Tools
33-
# pytest>=7.0.0
34-
# black>=23.0.0
35-
# mypy>=1.0.0
33+
# pytest>=9.1.1
34+
# ruff>=0.9.0
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
"""Automated security, dependency floor, and third-party license contract tests for DevCenter."""
2+
3+
from __future__ import annotations
4+
5+
import re
6+
from pathlib import Path
7+
8+
ROOT = Path(__file__).resolve().parents[1]
9+
10+
11+
def test_dependency_vulnerability_floors() -> None:
12+
"""Verify requirements.txt and pyproject.toml enforce patched dependency floors against CVEs."""
13+
req_file = ROOT / "requirements.txt"
14+
assert req_file.is_file(), "requirements.txt must exist"
15+
req_text = req_file.read_text(encoding="utf-8")
16+
17+
# Pillow >= 12.3.0 floor resolves CVEs/GHSAs (GHSA-4x4j-2g7c-83w6, GHSA-45hq-cxwh-f6vc)
18+
assert re.search(r"^Pillow\s*>=\s*12\.3\.0", req_text, re.MULTILINE), (
19+
"requirements.txt must enforce Pillow>=12.3.0 floor"
20+
)
21+
assert re.search(r"^keyring\s*>=\s*25\.0\.0", req_text, re.MULTILINE), (
22+
"requirements.txt must enforce keyring>=25.0.0 floor"
23+
)
24+
25+
pyproject_file = ROOT / "pyproject.toml"
26+
assert pyproject_file.is_file(), "pyproject.toml must exist"
27+
pyproject_text = pyproject_file.read_text(encoding="utf-8")
28+
29+
# PEP 621 dependencies section
30+
assert "dependencies = [" in pyproject_text, "pyproject.toml must define project.dependencies"
31+
assert "Pillow>=12.3.0" in pyproject_text, "pyproject.toml must specify Pillow>=12.3.0"
32+
assert "keyring>=25.0.0" in pyproject_text, "pyproject.toml must specify keyring>=25.0.0"
33+
34+
# Dev/test optional dependencies floor (pytest >= 9.1.1 protects against CVE-2025-7117 / GHSA-6w46-j5rx-g56g)
35+
assert "[project.optional-dependencies]" in pyproject_text, "pyproject.toml must define optional-dependencies"
36+
assert "pytest>=9.1.1" in pyproject_text, "pyproject.toml dev dependencies must require pytest>=9.1.1"
37+
assert "ruff>=0.9.0" in pyproject_text, "pyproject.toml dev dependencies must require ruff>=0.9.0"
38+
39+
40+
def test_third_party_licenses_complete_and_accurate() -> None:
41+
"""Verify THIRD_PARTY_LICENSES.txt comprehensively covers runtime, transitive, build, and test packages."""
42+
license_file = ROOT / "THIRD_PARTY_LICENSES.txt"
43+
assert license_file.is_file(), "THIRD_PARTY_LICENSES.txt must exist"
44+
content = license_file.read_text(encoding="utf-8")
45+
46+
required_packages = [
47+
("PySide6", "LGPL-3.0-only"),
48+
("Pillow", "HPND-sell-variant"),
49+
("anthropic", "MIT"),
50+
("keyring", "MIT"),
51+
("chardet", "LGPL-2.1-or-later"),
52+
("ftfy", "Apache-2.0"),
53+
("pip-licenses", "MIT"),
54+
("watchdog", "Apache-2.0"),
55+
("pywin32-ctypes", "BSD-3-Clause"),
56+
("jaraco.classes", "MIT"),
57+
("jaraco.context", "MIT"),
58+
("jaraco.functools", "MIT"),
59+
("PyInstaller", "GPL-2.0-or-later WITH Bootloader-exception"),
60+
("pyinstaller-hooks-contrib", "Apache-2.0"),
61+
("altgraph", "MIT"),
62+
("packaging", "Apache-2.0 OR BSD-2-Clause"),
63+
("pytest", "MIT"),
64+
("pluggy", "MIT"),
65+
("iniconfig", "MIT"),
66+
("ruff", "MIT OR Apache-2.0"),
67+
]
68+
69+
for pkg, spdx in required_packages:
70+
assert pkg in content, f"Package {pkg} missing from THIRD_PARTY_LICENSES.txt"
71+
assert spdx in content, f"SPDX identifier {spdx} for {pkg} missing from THIRD_PARTY_LICENSES.txt"
72+
73+
# Ensure structured schema fields exist
74+
assert "License:" in content, "License: field missing in THIRD_PARTY_LICENSES.txt"
75+
assert "URL:" in content, "URL: field missing in THIRD_PARTY_LICENSES.txt"
76+
assert "SPDX:" in content, "SPDX: field missing in THIRD_PARTY_LICENSES.txt"
77+
assert "Notice:" in content, "Notice: field missing in THIRD_PARTY_LICENSES.txt"
78+
79+
80+
def test_gitignore_security_and_multi_host_hardening() -> None:
81+
"""Verify .gitignore blocks private secrets, certificates, and multi-host conflict files."""
82+
gitignore_file = ROOT / ".gitignore"
83+
assert gitignore_file.is_file(), ".gitignore must exist"
84+
content = gitignore_file.read_text(encoding="utf-8")
85+
86+
# Secrets and certificate protection
87+
for pat in ["credentials.json", "*.pfx", "*.pem", "*.key", "keyring/", "secrets.*"]:
88+
assert pat in content, f"Secret pattern {pat} missing in .gitignore"
89+
90+
# Multi-host sync hardening
91+
for host_pat in ["*-WORKSTATION-LG*", "*-ASUS-GEI*", "*.sync-conflict-*", "*.conflict"]:
92+
assert host_pat in content, f"Sync conflict pattern {host_pat} missing in .gitignore"
93+
94+
# Multi-agent lock system fail-closed patterns
95+
for lock_pat in ["LOCK.*", "*.lock", "LOCK*.txt"]:
96+
assert lock_pat in content, f"Lock pattern {lock_pat} missing in .gitignore"
97+
98+
99+
def test_no_hardcoded_user_paths_in_python_code() -> None:
100+
"""Verify no hardcoded personal user profile paths (e.g. C:\\Users\\lukas) exist in active Python source."""
101+
disallowed_regex = re.compile(r"""(?i)C:[/\\]Users[/\\](?:lukas|admin|administrator)[/\\]""", re.VERBOSE)
102+
103+
python_files = list(ROOT.glob("*.py")) + list((ROOT / "src").rglob("*.py")) + list((ROOT / "tests").glob("*.py"))
104+
assert len(python_files) >= 50, f"Expected at least 50 Python files to scan, found {len(python_files)}"
105+
106+
violating_lines = []
107+
for py_file in python_files:
108+
if not py_file.is_file():
109+
continue
110+
try:
111+
text = py_file.read_text(encoding="utf-8")
112+
except Exception:
113+
continue
114+
for idx, line in enumerate(text.splitlines(), 1):
115+
if disallowed_regex.search(line):
116+
violating_lines.append(f"{py_file.name}:{idx}: {line.strip()}")
117+
118+
assert not violating_lines, "Found hardcoded user paths in Python code:\n" + "\n".join(violating_lines)
119+
120+
121+
def test_security_policy_sla_and_contacts() -> None:
122+
"""Verify SECURITY.md maintains strict SLA and designated response channels."""
123+
sec_file = ROOT / "SECURITY.md"
124+
assert sec_file.is_file(), "SECURITY.md must exist"
125+
content = sec_file.read_text(encoding="utf-8")
126+
127+
assert "security@dev-bricks.org" in content, "security@dev-bricks.org missing from SECURITY.md"
128+
assert "security@open-bricks.org" in content, "security@open-bricks.org missing from SECURITY.md"
129+
assert "security@ellmos.ai" in content, "security@ellmos.ai missing from SECURITY.md"
130+
assert "support@lukasgeiger.com" in content, "support@lukasgeiger.com missing from SECURITY.md"
131+
assert "48" in content, "48h initial acknowledgment SLA missing"
132+
assert "5" in content, "5-day triage commitment missing"
133+
assert "Sicherheitsrichtlinie" in content, "German section header missing"
134+
135+
136+
if __name__ == "__main__":
137+
import pytest
138+
raise SystemExit(pytest.main(["-v", __file__]))

0 commit comments

Comments
 (0)