49 Commits

Author SHA1 Message Date
7a4db52140 chore: remove internal dev artifacts
Remove planning docs, phase summaries, old installers, and redundant
documentation. These were development-phase artifacts that don't belong
in the shipped project. install.sh replaces setup.sh and
install-system.sh. API docs can be generated with cargo doc.

Removed:
- .planning/ (37 files of threat modeling and review docs)
- CODING_STANDARDS.md, TESTING.md, CHANGELOG.md
- docs/API.md, docs/BENCHMARKS.md
- scripts/setup.sh, scripts/install-system.sh
- tests/PHASE*_TEST_SUMMARY.md

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 15:43:23 +02:00
737743c261 docs: clean up README
Remove duplicate sections, update supported display managers list
(GDM, SDDM, LightDM), consolidate install/uninstall instructions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 15:41:02 +02:00
922f7aa0c9 fix: auto-detect display manager in installer
Support GDM, SDDM, and LightDM for PAM integration. Detect which
display manager is running and configure the correct PAM file. Show
manual instructions if no supported DM is found.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 15:38:40 +02:00
85d4151c6d fix: auto-detect ONNX Runtime library path
Check known install paths (/usr/local/lib/linux-hello/, ~/.local/lib/)
for libonnxruntime.so at startup so users don't need to set
ORT_DYLIB_PATH manually. Applies to both CLI and daemon.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 15:36:05 +02:00
17317d4bd8 feat: single-command installer
Add install.sh that handles the full setup: dependencies, build, ONNX
models, ONNX runtime, IR emitter configuration, system installation,
face enrollment, and PAM lock screen integration. Includes --uninstall.

Simplify README to just: clone, ./install.sh, done.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 15:32:19 +02:00
e359d71db4 feat: wire TPM-backed encrypted template storage into auth pipeline
Replace plain TemplateStore with SecureTemplateStore in the auth
service. Templates are now encrypted with AES-256-GCM via TPM2 when
available, falling back to software encryption with PBKDF2 key
derivation (600k iterations) otherwise.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 15:23:12 +02:00
d6ced0743f docs: rewrite README for end-user simplicity
Replace developer-heavy README with a clean install guide. Focus on
quick install steps, tested hardware, and the one PAM line needed for
lock screen integration. Remove phase-by-phase feature lists and
redundant architecture/development sections.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 15:08:18 +02:00
8c478836d8 feat: ONNX face detection, IR camera support, and PAM authentication
Wire up ONNX RetinaFace detector and MobileFaceNet embeddings in the CLI
and auth pipeline. Add IR camera detection for Windows Hello-style
"Integrated I" cameras and greyscale-only format heuristic. Add histogram
normalization for underexposed IR frames from low-power emitters.

- Add `onnx` feature flag to CLI crate forwarding to daemon
- Wire ONNX detector into `detect` command with fallback to simple detector
- Fix IR camera detection for Chicony "Integrated I" naming pattern
- Add `normalize_if_dark()` for underexposed IR frames in auth pipeline
- Load user config from ~/.config/linux-hello/ as fallback
- Update systemd service for IR emitter integration and camera access
- Add system installation script and ONNX runtime installer
- Update .gitignore for local dev artifacts

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 15:04:52 +02:00
ac5c71c786 docs(phase-2): complete phase execution 2026-02-14 11:43:39 +01:00
59230cb8b4 docs: update STATE.md with Phase 2 gap fixes 2026-02-14 11:40:39 +01:00
19a1a09808 fix(phase2-gaps): remediate bytes vulnerability and add cargo-deny config
- Fix RUSTSEC-2026-0007: bytes crate vulnerability (CVE-2025-47685)
  - Updated bytes to v1.11.1 via workspace.dependencies override
- Create deny.toml with permissive license policy
  - Allows MIT, Apache-2.0, BSD-2/3-Clause, ISC, Zlib, Unlicense, CC0-1.0, Unicode-3.0, GPL-3.0-only
  - Added license to linux-hello-tests crate (was missing)
- Update project license to modern SPDX: GPL-3.0-only (was deprecated GPL-3.0)

Verification:
- cargo audit: PASSED (no vulnerabilities)
- cargo deny check: PASSED (licenses ok, advisories ok, bans ok)
2026-02-14 11:39:58 +01:00
a2e4618836 docs(02-03): complete IPC security verification plan 2026-02-14 11:29:13 +01:00
14ca9b3662 security(02-03): verify IPC security features in daemon
- Task 1: Verified SO_PEERCRED validation (ipc.rs:88-116)
  - Uses getsockopt with SO_PEERCRED to get client pid/uid/gid
  - Proper error handling for credential retrieval

- Task 2: Verified authorization boundaries (ipc.rs:123-149, 584/635/677)
  - Root (UID 0) has full access
  - Regular users can only operate on their own account
  - getpwnam null returns properly handled
  - Authorization enforced on all IPC operations

- Task 3: Verified rate limiting (ipc.rs:152-242)
  - 10 connections/second per UID limit
  - Exponential backoff (5s → 60s max)
  - Auto-cleanup after 60s of inactivity
  - Per-UID tracking prevents global bypass

- Task 4: Verified message size limits (ipc.rs:71, 492-521)
  - MAX_MESSAGE_SIZE = 64KB properly defined
  - Pre-read validation before parsing
  - Oversized messages rejected with error response

Created: ipc-security-verification.md with complete analysis
2026-02-14 11:27:39 +01:00
3c93698ede docs: update STATE.md for plan 02-02 completion
- Updated current plan to 02-02 (Complete)
- Added 02-02 metrics: 5 min, 5 tasks, 5 files
2026-02-14 11:24:59 +01:00
c7e4d7de86 docs(02-02): complete manual code security review plan
- Created SUMMARY.md with all review results
- All 5 tasks completed: unsafe inventory, FFI review, input validation, error handling, logging
2026-02-14 11:24:34 +01:00
7cbe13f9ad docs(02-02): add logging security review
- Reviewed all tracing/log statements in daemon modules
- No credentials, templates, embeddings, or biometric data logged
- Username logging for audit purposes only (acceptable)
- Similarity scores only at debug level (not production)
- Risk: LOW - logging follows security best practices
2026-02-14 11:23:11 +01:00
9734d88a04 docs(02-02): add error handling security review
- Reviewed error messages in auth, camera, storage, TPM modules
- Authentication errors are generic (doesn't reveal if user exists)
- No template/embedding/key material in error messages
- Error.rs has explicit security note about information disclosure
- Risk: LOW - no actionable issues
2026-02-14 11:22:06 +01:00
1eb454d705 docs(02-02): add input validation review
- Reviewed IPC, config, camera, D-Bus, and template storage
- IPC has proper message size limits (64KB) and rate limiting
- Config lacks explicit bounds validation (minor, admin-controlled)
- Template storage lacks path traversal checks (recommendation added)
- Overall risk: LOW
2026-02-14 11:21:14 +01:00
dee7999f63 docs(02-02): add FFI boundary security review
- Reviewed all FFI boundaries: SO_PEERCRED, getpwnam, mlock/munlock
- TPM2 uses safe tss-esapi bindings (no direct FFI)
- Camera uses safe v4l crate for V4L2
- All return values checked, null pointers handled
- No memory safety issues found
2026-02-14 11:19:38 +01:00
8c058c8f6c docs(02-02): add unsafe code inventory with justifications
- Documented 11 unsafe blocks across ipc.rs, secure_memory.rs, camera/linux.rs
- Each block includes file path, line numbers, purpose, safety justification, risk level
- 9 LOW risk, 1 LOW-MEDIUM, 1 MEDIUM (camera transmute)
- No HIGH risk blocks found
2026-02-14 11:18:33 +01:00
8a76e6354b docs(02-01): complete security tooling plan
- Created SUMMARY.md documenting all 4 security tool runs
- Updated STATE.md to reflect phase 2 progress
- Fixed clippy warnings in 7 files

Key findings:
- 1 HIGH vulnerability (bytes crate)
- Need deny.toml for license policy
- Miri limited by system call support
2026-02-14 11:16:00 +01:00
fd5d8c87d5 fix(02-01): fix clippy warnings to pass lint checks
- config.rs: Added Default derive, removed manual impl
- template.rs: Simplified iterator with flatten()
- camera/linux.rs: Added transmute annotations, fixed doc syntax
- camera/mod.rs: Allow unused imports from linux module
- ipc.rs: Renamed default() to with_default_path(), simplified closures
- secure_memory.rs: Use is_multiple_of() instead of modulo
- phase3_security_test.rs: Use std::f32::consts::PI
2026-02-14 11:14:41 +01:00
f80d051b8a docs(02-01): add security tooling results
- tool-audit-results.md: cargo-audit findings (1 high vulnerability in bytes)
- deny-check-results.md: cargo-deny findings (license policy needed)
- clippy-results.md: clippy findings (style warnings, no security issues)
- miri-results.md: Miri findings (limited by system call support)

These are the output artifacts from running security tooling.
2026-02-14 11:14:34 +01:00
372ed79bdc docs(phase2): create phase plan 2026-02-14 10:29:50 +01:00
22f41ec224 docs(02): research phase 2 - rust code security review 2026-02-14 10:25:56 +01:00
4e6bfda5b3 docs(phase-1): complete phase execution 2026-02-14 10:21:16 +01:00
588e337064 docs(01-02): complete STRIDE threats + security controls plan
- Created STRIDE threat analysis (433 lines, 6 categories)
- Created security control mapping (384 lines)
- Updated STATE.md with progress (2/20 plans, 10%)
2026-02-14 10:18:03 +01:00
8cbb5adc2a docs(01-02): map security controls to threats
- Created comprehensive security control mapping document
- Documented IPC, cryptographic, memory, authorization, and PAD controls
- Each control includes implementation location and effectiveness rating
- Included gap analysis identifying missing mitigations
- Links STRIDE threats to corresponding security controls
2026-02-14 10:16:17 +01:00
0f018ba4fe docs(01-02): perform STRIDE threat analysis
- Created comprehensive threat analysis for all DFD components
- Covered all 6 STRIDE categories: Spoofing, Tampering, Repudiation,
  Information Disclosure, Denial of Service, Elevation of Privilege
- Included risk ratings (likelihood x impact) for each threat
- Priority matrix ranking top 10 threats by risk rating
- References attack-surface.md and dfd.md
2026-02-14 10:15:14 +01:00
f59cec3813 docs(01-01): complete DFD + attack surface enumeration plan
- Created system DFD with 5 trust boundaries
- Enumerated attack surface with risk ratings
- 2 tasks completed in 3 minutes
2026-02-14 10:12:31 +01:00
444c4303d2 feat(01-01): enumerate attack surface with risk ratings
- IPC interfaces: Unix Socket and D-Bus with existing security controls
- Storage interfaces: Template storage (encrypted), TPM key storage, config files
- Hardware interfaces: V4L2 camera, TPM2 device
- Configuration vectors: Environment variables, command-line arguments, config files
- Biometric-specific: ONNX models, camera frame input, template replay
- Risk ratings: HIGH (socket, camera, ONNX), MEDIUM (most others), LOW (hardware TPM)
- Follows OWASP Attack Surface Analysis methodology
2026-02-14 10:10:59 +01:00
96b31add26 feat(01-01): create system DFD with trust boundaries
- Documents all external entities: User (face), PAM module, CLI, GNOME/KDE settings
- Describes linux-hello-daemon internal modules: camera, detection, matching, anti-spoofing, secure memory
- Enumerates data stores: template storage, TPM key storage, config files
- Defines 5 trust boundaries: Unix Socket IPC, Encrypted Storage/TPM, Hardware Interfaces, D-Bus, System Integration
- Includes ASCII diagrams following OWASP Threat Dragon methodology
2026-02-14 10:10:47 +01:00
06b1338425 docs(phase-1): create phase plans for architecture & threat modeling 2026-02-14 09:55:50 +01:00
fd862032b7 docs(phase-1): research architecture & threat modeling 2026-02-14 09:53:07 +01:00
3be9531686 docs: create roadmap (5 phases) 2026-02-14 09:47:09 +01:00
c1ae77cf86 docs: define v1 requirements 2026-02-14 09:44:46 +01:00
b9f4a4d3b1 docs: complete project research (STACK, FEATURES, ARCHITECTURE, PITFALLS, SUMMARY) 2026-02-14 09:44:01 +01:00
e7c9a0f8ea chore: add project config 2026-02-14 09:22:53 +01:00
1c583f3c47 docs: initialize project 2026-02-14 09:20:24 +01:00
2034281ad7 Prepare public release v0.1.0 2026-01-30 09:44:12 +01:00
75be95fdf7 fixing some issues 2026-01-15 23:16:15 +01:00
23230cb745 updating doc 2026-01-15 22:50:18 +01:00
1e7f296635 Development over 2026-01-15 22:40:51 +01:00
2f6b16d946 Fixed warnings, lots of stubs in the code, will be implemented later. 2026-01-03 08:15:51 +01:00
a3fefa4179 fe 2026-01-02 21:25:12 +01:00
7c1f77a469 Add project logo to README
- Add logo.png to public directory
- Update README to display logo at the top
- Remove logo from .gitignore to allow tracking
2026-01-02 21:25:00 +01:00
d118f3a599 Remove status.md and development_path.md from repository
These are internal development documents and should not be tracked in the repo.
2026-01-02 21:06:47 +01:00
abe5476157 Add comprehensive README and update project status
- Add README.md with project overview, features, installation, and usage
- Document current Phase 3 completion status
- Include architecture diagrams and security information
- Add roadmap for Phase 4-5
- Update status.md to reflect current codebase state
2026-01-02 21:04:57 +01:00
fdf37aa7b4 first commit 2026-01-02 19:08:56 +01:00