Commit graph

587 commits

Author SHA1 Message Date
Argenis
0fe4d2f712
chore: fix CHANGELOG date for version 0.1.0 (#128) 2026-02-15 08:20:45 -05:00
Argenis
641a5bf917
fix(skills): prevent path traversal in skill remove command
- Fix URL validation to check for https:// or http:// prefixes instead of partial string matching which could be bypassed
- Add path traversal protection in skill remove command to reject .., /, and verify canonical path is inside the skills directory
2026-02-15 08:15:41 -05:00
Argenis
da453f0b4b
fix: prevent panics from byte-level string slicing on multi-byte UTF-8
Uses floor_char_boundary() instead of direct byte indexing to prevent panics when slicing strings containing multi-byte UTF-8 characters.
2026-02-15 08:06:04 -05:00
Argenis
e3791aebcb
fix(imessage): escape newlines in AppleScript string interpolation
Prevents code injection via line breaks by escaping newline and carriage return characters in AppleScript string interpolation.
2026-02-15 08:00:59 -05:00
Argenis
e89415fc9a
chore: add .wt-pr37 Windsurf directory to gitignore
Also removes dead inject_openclaw_identity function and replaces unreachable macros with anyhow bail for cleaner error handling.
2026-02-15 07:44:50 -05:00
Edvard Schøyen
6725eb2995
fix(gateway): use constant-time comparison for WhatsApp verify_token
Uses constant_time_eq for verify_token to prevent timing attacks. Removes unused whatsapp_app_secret signature verification code for simplification.
2026-02-15 07:42:52 -05:00
Edvard Schøyen
bd02d73ecc
test: add comprehensive pairing code consumption tests
Add comprehensive tests for pairing code consumption feature
2026-02-15 07:36:54 -05:00
Argenis
dc654f6835
Merge pull request #121 from theonlyhennygod/docs/ram-update-final
docs: ZeroClaw <5MB RAM
2026-02-15 07:28:08 -05:00
argenis de la rosa
21607a72fa docs: update ZeroClaw RAM spec to <5MB 2026-02-15 07:28:04 -05:00
Argenis
ae97a76e64
Merge pull request #120 from theonlyhennygod/docs/comprehensive-benchmarks
docs: comprehensive benchmarks for ZeroClaw vs Others
2026-02-15 07:13:55 -05:00
argenis de la rosa
3c5166248a docs: add comprehensive benchmarks (NanoBot, PicoClaw, OpenClaw) 2026-02-15 07:12:15 -05:00
argenis de la rosa
80c599f215 fix: correct truncate_with_ellipsis to trim trailing whitespace
- Update truncate_with_ellipsis to trim trailing whitespace for cleaner output
- Fix test expectations to match trimmed behavior
- This resolves merge conflicts and ensures consistent string truncation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 07:06:56 -05:00
argenis de la rosa
b1c2cf865a merge: resolve conflicts with main and update README benchmarks 2026-02-15 07:02:41 -05:00
argenis de la rosa
fa5babb6a9 docs: update README with benchmarks, features, and specs comparison image 2026-02-15 06:58:30 -05:00
argenis de la rosa
085b57aa30 refactor: consolidate CLI command definitions to lib.rs
- Move all CLI command enums (ChannelCommands, SkillCommands, CronCommands, IntegrationCommands, MigrateCommands, ServiceCommands) to lib.rs
- Add clap derives for use in main.rs CLI parsing
- Update all modules to use crate:: prefix instead of super:: for command types
- Add mod util; to main.rs for binary compilation
- Export Config type from lib.rs for main.rs

This refactoring eliminates code duplication between library modules and binary, centralizing all CLI command definitions in one place.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 06:52:33 -05:00
Argenis
7b5e77f03c
fix: use safe Unicode string truncation to prevent panics (CWE-119)
Merge pull request #117 from theonlyhennygod/fix/unicode-truncation-panic
2026-02-15 06:49:48 -05:00
argenis de la rosa
9aaa5bfef1 fix: use safe Unicode string truncation to prevent panics (CWE-119)
Fixes Issue #55: Unicode string truncation causes panics with non-ASCII input

Previously, code used byte-index slicing (`&s[..n]`) which panics when the
slice boundary falls in the middle of a multi-byte UTF-8 character (emoji,
CJK, accented characters).

Changes:
- Added `truncate_with_ellipsis()` helper in `src/util.rs` that uses
  `char_indices()` to find safe character boundaries
- Replaced 2 unsafe truncations in `src/channels/mod.rs` with the safe helper
- Added 12 comprehensive tests covering emoji, CJK, accented chars, and edge cases

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 06:46:37 -05:00
argenis de la rosa
47c5006de4 Merge remote-tracking branch 'origin/feat/whatsapp-email-channels'
# Conflicts:
#	Cargo.lock
#	src/config/schema.rs
#	src/cron/mod.rs
#	src/security/secrets.rs
#	src/service/mod.rs
2026-02-15 06:37:51 -05:00
Argenis
5cc02c5813
fix: add WhatsApp webhook signature verification (X-Hub-Signature-256)
Closes #51

- Add HMAC-SHA256 signature verification for WhatsApp webhooks
- Prevents message spoofing attacks (CWE-345)
- Add whatsapp_app_secret config field with ZEROCLAW_WHATSAPP_APP_SECRET env override
- Add 13 comprehensive unit tests

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 06:17:24 -05:00
jbradf0rd
13748b590c feat: add Windows headless daemon support via Task Scheduler
Adds Windows branches to all 5 service commands (install/start/stop/
status/uninstall) using schtasks to register a "ZeroClaw Daemon"
scheduled task that runs at logon with highest privileges. A wrapper
.cmd script handles stdout/stderr redirection to the logs directory.

Also fixes symlink_tests.rs to compile on Windows by using the
correct std::os::windows::fs::symlink_dir API.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 00:05:17 -06:00
jbradf0rd
9d0e29972c feat: add dedicated GLM provider with JWT auth and GLM-4.7 support
The GLM/Zhipu provider was using the generic OpenAI-compatible provider,
which failed because:
- Zhipu requires JWT authentication (HS256 with sign_type: SIGN header),
  not raw Bearer tokens
- The endpoint uses /v4/chat/completions, not /v1/
- default_model_for_provider() had no GLM case, silently defaulting to
  a Claude model

Changes:
- Add src/providers/glm.rs with JWT token generation, caching, and
  correct Z.AI international endpoint
- Wire GLM provider into factory (mod.rs) replacing the broken
  OpenAI-compatible shim
- Add ring dependency for HMAC-SHA256 signing
- Add GLM-4.7 and GLM-4.7-Flash to onboarding wizard model list
- Fix default_model_for_provider() to return glm-4.7 for GLM provider

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 23:18:00 -06:00
Argenis
026a917544
Merge pull request #76 from ecschoye/fix/provider-warmup-cold-start
fix: add provider warmup to prevent cold-start timeout on first channel message
2026-02-14 22:40:51 -05:00
Argenis
6c445d5db7
Merge pull request #71 from fettpl/fix/bearer-token-hashing
fix: store bearer tokens as SHA-256 hashes instead of plaintext
2026-02-14 22:32:10 -05:00
argenis de la rosa
7a03a01fbf Merge remote-tracking branch 'origin/main' into fix/bearer-token-hashing
# Conflicts:
#	src/security/pairing.rs
2026-02-14 21:51:28 -05:00
Argenis
7468b39693
Merge pull request #68 from fettpl/fix/key-generation-csprng
fix: replace UUID v4 key generation with direct CSPRNG
2026-02-14 21:41:43 -05:00
Argenis
e5cd3f1378
Merge pull request #75 from theonlyhennygod/fix/imessage-sql-injection-50
fix(imessage): replace sqlite CLI path with rusqlite parameterized reads
2026-02-14 21:24:41 -05:00
Argenis
cd2517b5b7
Merge pull request #74 from fettpl/fix/gateway-timeout-layer
fix: apply TimeoutLayer to gateway router for request timeouts
2026-02-14 21:23:31 -05:00
Argenis
f70bf3f943
Merge pull request #72 from fettpl/fix/windows-key-permissions-warning
fix: log warning when Windows key file permissions fail to set
2026-02-14 21:21:30 -05:00
Argenis
c327260e28
Merge pull request #73 from fettpl/fix/constant-time-eq-length-leak
fix: constant_time_eq no longer leaks secret length via early return
2026-02-14 21:20:07 -05:00
Argenis
0a94b54b79
Merge pull request #87 from fettpl/fix/stable-hex-check
fix: replace unstable is_multiple_of with modulo and fix flaky temp test
2026-02-14 20:45:20 -05:00
fettpl
e56bcf7a89 Merge remote-tracking branch 'origin/main' into fix/stable-hex-check
# Conflicts:
#	src/security/secrets.rs
2026-02-15 02:30:30 +01:00
fettpl
6d68e89ef0 Merge remote-tracking branch 'origin/main' into fix/windows-key-permissions-warning
# Conflicts:
#	src/security/secrets.rs
2026-02-15 02:29:59 +01:00
fettpl
82601f17f5 Merge remote-tracking branch 'origin/main' into fix/gateway-timeout-layer
# Conflicts:
#	src/security/secrets.rs
2026-02-15 02:29:40 +01:00
fettpl
b5071c13f3 Merge remote-tracking branch 'origin/main' into fix/constant-time-eq-length-leak
# Conflicts:
#	src/security/secrets.rs
2026-02-15 02:29:24 +01:00
fettpl
65c22ff027 Merge remote-tracking branch 'origin/main' into fix/bearer-token-hashing
# Conflicts:
#	src/security/secrets.rs
2026-02-15 02:29:09 +01:00
fettpl
2741e0f024 Merge remote-tracking branch 'origin/main' into fix/key-generation-csprng
# Conflicts:
#	src/security/secrets.rs
2026-02-15 02:28:52 +01:00
fettpl
33f64c7146 fix: consolidate env-var override tests to eliminate parallel races
Tests that set/remove the same environment variables can race when
cargo test runs them in parallel. Merges each racing pair into a
single test function.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 02:27:13 +01:00
fettpl
e62b7c9153 fix: consolidate env-var override tests to eliminate parallel races
Tests that set/remove the same environment variables can race when
cargo test runs them in parallel. Merges each racing pair into a
single test function.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 02:27:08 +01:00
fettpl
f87cbb28f2 fix: consolidate env-var override tests to eliminate parallel races
Tests that set/remove the same environment variables can race when
cargo test runs them in parallel. Merges each racing pair into a
single test function.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 02:27:02 +01:00
fettpl
882e1320dc fix: consolidate all env-var override tests to eliminate parallel races
Extends the temperature test fix to also cover provider, api_key, port,
and host env-var tests that had the same race condition.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 02:26:51 +01:00
fettpl
65a5c3c1e8 fix: consolidate env-var override tests to eliminate parallel races
Tests that set/remove the same environment variables can race when
cargo test runs them in parallel. Merges each racing pair into a
single test function.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 02:26:39 +01:00
fettpl
cfa44250a7 fix: consolidate env-var override tests to eliminate parallel races
Tests that set/remove the same environment variables (PROVIDER,
PORT, HOST, TEMPERATURE, API_KEY) can race when cargo test runs
them in parallel. Merges each racing pair into a single test function.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 02:26:04 +01:00
argenis de la rosa
04a35144e8 feat: integrate open-skills library and cleanup clippy warnings
- Add open-skills auto-clone/pull/sync support in skills loader
  - Clone https://github.com/besoeasy/open-skills to ~/open-skills
  - Weekly sync via .zeroclaw-open-skills-sync marker
  - Env controls: ZEROCLAW_OPEN_SKILLS_ENABLED, ZEROCLAW_OPEN_SKILLS_DIR
  - Load open-skills markdown files before workspace skills
  - Track Skill.location for accurate prompt rendering

- Update system prompt to render skill.location with fallback
  - Use actual file path when available
  - Maintain backward compatibility with workspace SKILL.md path

- Fix clippy warnings across tests and supporting files
  - Readable timestamp literals
  - Remove underscore bindings in tests
  - Use struct update syntax for Config::default() patterns
  - Fix module inception, duplicate attributes, manual strip
  - Clean raw string hashes and empty string construction

Resolves: #77
2026-02-14 20:25:07 -05:00
fettpl
f7ae04e64e Merge remote-tracking branch 'origin/main' into fix/windows-key-permissions-warning
# Conflicts:
#	src/security/secrets.rs
2026-02-15 02:16:00 +01:00
fettpl
d2afc014b2 fix: replace unstable is_multiple_of with modulo for Rust 1.83 compat
The Docker image uses rust:1.83-slim where is_multiple_of is unstable.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 02:15:38 +01:00
fettpl
0247ac13e8 Merge remote-tracking branch 'origin/main' into fix/gateway-timeout-layer 2026-02-15 02:15:28 +01:00
fettpl
e0341e5996 fix: replace unstable is_multiple_of with modulo for Rust 1.83 compat
The Docker image uses rust:1.83-slim where is_multiple_of is unstable.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 02:15:24 +01:00
fettpl
b3c995c849 Merge remote-tracking branch 'origin/main' into fix/constant-time-eq-length-leak 2026-02-15 02:15:13 +01:00
fettpl
0603bed843 fix: replace unstable is_multiple_of with modulo for Rust 1.83 compat
The Docker image uses rust:1.83-slim where is_multiple_of is unstable.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 02:15:08 +01:00
fettpl
74648717f7 Merge remote-tracking branch 'origin/main' into fix/bearer-token-hashing 2026-02-15 02:14:45 +01:00