Erica Stith
63f485e56a
feat(security): Add prompt injection defense and leak detection ( #1433 )
...
Contributed from RustyClaw (MIT licensed).
## PromptGuard (src/security/prompt_guard.rs)
Detects and blocks/warns about prompt injection attacks:
- System prompt override attempts ("ignore previous instructions")
- Role confusion attacks ("you are now...", "act as...")
- Tool call JSON injection
- Secret extraction attempts
- Command injection patterns in tool arguments
- Jailbreak attempts (DAN mode, developer mode, etc.)
Features:
- Configurable sensitivity (0.0-1.0)
- Configurable action (Warn/Block/Sanitize)
- Pattern-based detection with regex
- Normalized scoring across categories
## LeakDetector (src/security/leak_detector.rs)
Prevents credential exfiltration in outbound content:
- API key patterns (Stripe, OpenAI, Anthropic, Google, GitHub)
- AWS credentials (Access Key ID, Secret Access Key)
- Generic secrets (passwords, tokens in config)
- Private keys (RSA, EC, OpenSSH PEM blocks)
- JWT tokens
- Database connection URLs (PostgreSQL, MySQL, MongoDB, Redis)
Features:
- Automatic redaction of detected secrets
- Configurable sensitivity
- Returns both detection info and redacted content
## Integration
Both modules are exported from `security` module:
```rust
use zeroclaw::security::{PromptGuard, GuardResult, LeakDetector, LeakResult};
```
## Attribution
RustyClaw: https://github.com/rexlunae/RustyClaw
License: MIT
2026-02-23 07:48:18 -05:00
Will Sarg
c47fb22d03
Merge pull request #1385 from zeroclaw-labs/codex/homebrew-secret-fallback
...
ci(homebrew): handle existing upstream remote and main base
2026-02-22 05:16:58 -05:00
Will Sarg
b96a5477f2
ci(homebrew): handle existing upstream remote and main base
2026-02-22 05:16:49 -05:00
Will Sarg
9800895a0c
Merge pull request #1384 from zeroclaw-labs/codex/homebrew-secret-fallback
...
ci(homebrew): prefer HOMEBREW_UPSTREAM_PR_TOKEN with fallback
2026-02-22 05:15:49 -05:00
Will Sarg
2406e6bd35
ci(homebrew): prefer HOMEBREW_UPSTREAM_PR_TOKEN with fallback
2026-02-22 05:15:42 -05:00
Will Sarg
5ab3b870d2
Merge pull request #1375 from zeroclaw-labs/dev
...
chore(ci): promote dev to main for Homebrew auth hardening
2026-02-22 04:45:01 -05:00
Vernon Stinebaker
7e6491142e
fix(provider): preserve reasoning_content in tool-call conversation history
...
Thinking/reasoning models (Kimi K2.5, GLM-4.7, DeepSeek-R1) return a
reasoning_content field in assistant messages containing tool calls.
ZeroClaw was silently dropping this field when constructing conversation
history, causing provider APIs to reject follow-up requests with 400
errors: "thinking is enabled but reasoning_content is missing in
assistant tool call message".
Add reasoning_content: Option<String> as an opaque pass-through at every
layer of the pipeline: ChatResponse, ConversationMessage, NativeMessage
structs, parse/convert/build functions, and dispatcher. The field is
skip_serializing_if = None so it is invisible for non-thinking models.
Closes #1327
2026-02-22 17:40:48 +08:00
Will Sarg
eb8c8a2428
Merge pull request #1377 from zeroclaw-labs/codex/dev-main-resync-homebrew
...
chore(sync): resolve dev/main Homebrew workflow conflict
2026-02-22 04:36:27 -05:00
Will Sarg
753c1d118b
merge(main): resync dev while preserving Homebrew auth hardening
2026-02-22 04:34:14 -05:00
agorevski
8331c65bcc
fix(telegram): prevent non-image files from getting [IMAGE:] markers
...
Add file extension validation before generating [IMAGE:] markers for
incoming Telegram attachments. Non-image files (e.g. .md, .txt, .pdf)
now always use [Document:] format regardless of how Telegram classifies
them, preventing false vision capability errors.
Extract format_attachment_content() and is_image_extension() helpers
to centralize the logic and make it testable.
Fixes #1274
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-22 17:29:53 +08:00
Will Sarg
905e714659
ci(homebrew): use gh-managed auth with explicit fork access checks ( #1372 )
2026-02-22 04:28:15 -05:00
Chummy
8db161a8e0
feat(channel): split lark and feishu providers
2026-02-22 14:10:34 +08:00
Will Sarg
a117be64fd
chore(release): promote dev to main for v0.1.6 ( #1334 )
...
* chore(license): make apache primary while preserving dual-license (#1307 )
* fix(license): adopt rust-style dual-license layout for github detection (#1308 )
* fix(license): restore canonical apache-2.0 text for detection (#1309 )
* ci(policy): restrict main PR authors and target bot PRs to dev (#1310 )
* ci(intake): warn and retarget non-promotion PRs from main to dev (#1319 )
* ci(release): add bot-owned Homebrew publish workflow (#1323 )
* fix(onboard): serialize quick-setup env tests safely
* chore(release): bump version to v0.1.5
* ci(build-fast): align toolchain with stable release build
* ci(homebrew): fix bot fork auth clone path (#1329 )
* ci(homebrew): authenticate git ops via header-safe token flow
* ci(homebrew): fix patch step indentation in workflow
* chore(release): bump version to v0.1.6 (#1330 )
* chore(release): promote dev to main for v0.1.5 (#1325 ) (#1332 )
* chore(license): make apache primary while preserving dual-license (#1307 )
* fix(license): adopt rust-style dual-license layout for github detection (#1308 )
* fix(license): restore canonical apache-2.0 text for detection (#1309 )
* ci(policy): restrict main PR authors and target bot PRs to dev (#1310 )
* ci(intake): warn and retarget non-promotion PRs from main to dev (#1319 )
* ci(release): add bot-owned Homebrew publish workflow (#1323 )
* fix(onboard): serialize quick-setup env tests safely
* chore(release): bump version to v0.1.5
* ci(build-fast): align toolchain with stable release build
2026-02-21 21:59:51 -05:00
Will Sarg
836f0baeb9
Merge pull request #1333 from zeroclaw-labs/codex/dev-main-sync-mergecommit
...
chore(sync): merge main into dev (merge commit)
2026-02-21 21:56:22 -05:00
Will Sarg
e85605968a
merge(main): sync main into dev for release promotion
2026-02-21 21:55:11 -05:00
Will Sarg
38c22195ea
chore(release): promote dev to main for v0.1.5 ( #1325 ) ( #1332 )
...
* chore(license): make apache primary while preserving dual-license (#1307 )
* fix(license): adopt rust-style dual-license layout for github detection (#1308 )
* fix(license): restore canonical apache-2.0 text for detection (#1309 )
* ci(policy): restrict main PR authors and target bot PRs to dev (#1310 )
* ci(intake): warn and retarget non-promotion PRs from main to dev (#1319 )
* ci(release): add bot-owned Homebrew publish workflow (#1323 )
* fix(onboard): serialize quick-setup env tests safely
* chore(release): bump version to v0.1.5
* ci(build-fast): align toolchain with stable release build
2026-02-21 21:54:47 -05:00
Will Sarg
6622015408
chore(release): bump version to v0.1.6 ( #1330 )
2026-02-21 21:49:47 -05:00
Will Sarg
43c6f64080
ci(homebrew): fix bot fork auth clone path ( #1329 )
...
* ci(homebrew): authenticate git ops via header-safe token flow
* ci(homebrew): fix patch step indentation in workflow
2026-02-21 21:45:33 -05:00
Will Sarg
13daa872c6
chore(release): promote dev to main for v0.1.5 ( #1325 )
...
* chore(license): make apache primary while preserving dual-license (#1307 )
* fix(license): adopt rust-style dual-license layout for github detection (#1308 )
* fix(license): restore canonical apache-2.0 text for detection (#1309 )
* ci(policy): restrict main PR authors and target bot PRs to dev (#1310 )
* ci(intake): warn and retarget non-promotion PRs from main to dev (#1319 )
* ci(release): add bot-owned Homebrew publish workflow (#1323 )
* fix(onboard): serialize quick-setup env tests safely
* chore(release): bump version to v0.1.5
* ci(build-fast): align toolchain with stable release build
2026-02-21 21:14:34 -05:00
Will Sarg
d3fc42bdd7
Merge pull request #1324 from zeroclaw-labs/codex/v0.1.5-prep
...
chore(release): prepare v0.1.5 baseline
2026-02-21 20:52:39 -05:00
Will Sarg
fdf7f4eac5
ci(build-fast): align toolchain with stable release build
2026-02-21 20:49:17 -05:00
Will Sarg
403620a763
chore(release): bump version to v0.1.5
2026-02-21 20:46:05 -05:00
Will Sarg
7864118c40
fix(onboard): serialize quick-setup env tests safely
2026-02-21 20:46:02 -05:00
Will Sarg
0178d7d6e3
Merge remote-tracking branch 'origin/main' into codex/v0.1.5-prep
2026-02-21 20:18:38 -05:00
Will Sarg
44cac0755c
ci(release): add bot-owned Homebrew publish workflow ( #1323 )
2026-02-21 20:18:08 -05:00
Will Sarg
fbc0c8a053
ci(intake): warn and retarget non-promotion PRs from main to dev ( #1319 )
2026-02-21 17:45:50 -05:00
Will Sarg
6195d1bb79
ci(policy): restrict main PR authors and target bot PRs to dev ( #1310 )
2026-02-21 17:00:45 -05:00
Will Sarg
1afec64a17
fix(license): restore canonical apache-2.0 text for detection ( #1309 )
2026-02-21 16:49:58 -05:00
Will Sarg
19f7682e4d
fix(license): adopt rust-style dual-license layout for github detection ( #1308 )
2026-02-21 16:48:22 -05:00
Will Sarg
f44c93598f
chore(license): make apache primary while preserving dual-license ( #1307 )
2026-02-21 16:43:36 -05:00
Alex Gorevski
b2fefa98f5
Merge pull request #1289 from zeroclaw-labs/dependabot/cargo/main/which-8.0.0
...
chore(deps): bump which from 7.0.3 to 8.0.0
2026-02-21 13:33:55 -08:00
Alex Gorevski
518a540da2
Merge pull request #1288 from zeroclaw-labs/dependabot/cargo/main/rppal-0.22.1
...
chore(deps): bump rppal from 0.19.0 to 0.22.1
2026-02-21 13:33:40 -08:00
Alex Gorevski
b72645c840
Merge pull request #1287 from zeroclaw-labs/dependabot/cargo/main/rust-all-e29f2bb1a7
...
chore(deps): bump the rust-all group with 4 updates
2026-02-21 13:33:26 -08:00
Alex Gorevski
f74e957f5e
Merge pull request #1286 from zeroclaw-labs/dependabot/github_actions/main/actions-all-f6e1870857
...
chore(deps): bump github/codeql-action from 4.32.3 to 4.32.4 in the actions-all group
2026-02-21 13:32:58 -08:00
Will Sarg
569806b1a7
Merge pull request #1284 from zeroclaw-labs/dev
...
chore(release): promote dev to main
2026-02-21 14:03:24 -05:00
Will Sarg
acac02fde5
Merge pull request #1292 from zeroclaw-labs/codex/sync-main-into-dev-mergecommit
...
chore(branch): merge main into dev (preserve merge ancestry)
2026-02-21 14:00:44 -05:00
Will Sarg
56c29c37b8
Merge remote-tracking branch 'origin/main' into codex/sync-main-into-dev-mergecommit
2026-02-21 13:59:07 -05:00
Will Sarg
2e85845429
ci(docker): restrict image publish to v* tag pushes ( #1280 ) ( #1291 )
2026-02-21 13:58:29 -05:00
Will Sarg
4bc1385aed
chore(branch): reconcile dev for clean main promotion ( #1290 )
...
* ci(docker): restrict image publish to v* tag pushes (#1280 )
* ci(workflow): adopt main/dev split with dev->main promotion gate (#1283 )
* ci(docker): restrict image publish to v* tag pushes (#1280 )
* ci(workflow): adopt dev->main promotion flow
2026-02-21 13:56:32 -05:00
Will Sarg
ce3d87e405
ci(docker): restrict image publish to v* tag pushes ( #1280 ) ( #1285 )
2026-02-21 13:49:17 -05:00
dependabot[bot]
e3267016fe
chore(deps): bump which from 7.0.3 to 8.0.0
...
Bumps [which](https://github.com/harryfei/which-rs ) from 7.0.3 to 8.0.0.
- [Release notes](https://github.com/harryfei/which-rs/releases )
- [Changelog](https://github.com/harryfei/which-rs/blob/master/CHANGELOG.md )
- [Commits](https://github.com/harryfei/which-rs/compare/7.0.3...8.0.0 )
---
updated-dependencies:
- dependency-name: which
dependency-version: 8.0.0
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
2026-02-21 18:47:10 +00:00
dependabot[bot]
d7d5ac3b72
chore(deps): bump rppal from 0.19.0 to 0.22.1
...
Bumps [rppal](https://github.com/golemparts/rppal ) from 0.19.0 to 0.22.1.
- [Release notes](https://github.com/golemparts/rppal/releases )
- [Changelog](https://github.com/golemparts/rppal/blob/master/CHANGELOG.md )
- [Commits](https://github.com/golemparts/rppal/compare/0.19.0...0.22.1 )
---
updated-dependencies:
- dependency-name: rppal
dependency-version: 0.22.1
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2026-02-21 18:46:47 +00:00
dependabot[bot]
e5a6ab41cc
chore(deps): bump the rust-all group with 4 updates
...
Bumps the rust-all group with 4 updates: [clap](https://github.com/clap-rs/clap ), [toml](https://github.com/toml-rs/toml ), [anyhow](https://github.com/dtolnay/anyhow ) and [nusb](https://github.com/kevinmehall/nusb ).
Updates `clap` from 4.5.58 to 4.5.60
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.58...clap_complete-v4.5.60 )
Updates `toml` from 1.0.1+spec-1.1.0 to 1.0.3+spec-1.1.0
- [Commits](https://github.com/toml-rs/toml/compare/toml-v1.0.1...toml-v1.0.3 )
Updates `anyhow` from 1.0.101 to 1.0.102
- [Release notes](https://github.com/dtolnay/anyhow/releases )
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.101...1.0.102 )
Updates `nusb` from 0.2.1 to 0.2.2
- [Release notes](https://github.com/kevinmehall/nusb/releases )
- [Commits](https://github.com/kevinmehall/nusb/compare/v0.2.1...v0.2.2 )
---
updated-dependencies:
- dependency-name: clap
dependency-version: 4.5.60
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rust-all
- dependency-name: toml
dependency-version: 1.0.3+spec-1.1.0
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rust-all
- dependency-name: anyhow
dependency-version: 1.0.102
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rust-all
- dependency-name: nusb
dependency-version: 0.2.2
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rust-all
...
Signed-off-by: dependabot[bot] <support@github.com>
2026-02-21 18:46:25 +00:00
dependabot[bot]
9fd9bc82dd
chore(deps): bump github/codeql-action in the actions-all group
...
Bumps the actions-all group with 1 update: [github/codeql-action](https://github.com/github/codeql-action ).
Updates `github/codeql-action` from 4.32.3 to 4.32.4
- [Release notes](https://github.com/github/codeql-action/releases )
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md )
- [Commits](9e907b5e64...89a39a4e59 )
---
updated-dependencies:
- dependency-name: github/codeql-action
dependency-version: 4.32.4
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: actions-all
...
Signed-off-by: dependabot[bot] <support@github.com>
2026-02-21 18:44:44 +00:00
Will Sarg
dbb2c80c1a
ci(workflow): adopt main/dev split with dev->main promotion gate ( #1283 )
...
* ci(docker): restrict image publish to v* tag pushes (#1280 )
* ci(workflow): adopt dev->main promotion flow
2026-02-21 13:39:07 -05:00
Will Sarg
3e29c6d1eb
ci(docker): restrict image publish to v* tag pushes ( #1280 )
2026-02-21 13:27:44 -05:00
Will Sarg
ebb2ad8008
ci(policy): enforce root license edits by willsarg only ( #1279 )
2026-02-21 12:27:12 -05:00
Will Sarg
15bd708ec3
fix(release): avoid duplicate SHA256SUMS upload in GitHub release ( #1277 )
2026-02-21 12:25:53 -05:00
Will Sarg
5e453549e0
fix(release): make tag publish resilient and include license assets ( #1276 )
2026-02-21 12:12:30 -05:00
Will Sarg
afdfee14cb
fix(docker): create fallback embedded web dist during image build ( #1275 )
2026-02-21 11:46:16 -05:00