Skip to content

Conversation

@linw1995
Copy link
Owner

@linw1995 linw1995 commented Jan 5, 2026

  • Add BashConfig struct with safe_commands_path and safe_commands_mode (append/override)
  • Implement BashConfigLayers to support global and workspace-specific safe command configurations
  • Add configure_safe_commands() function to apply safe command layers in order (global → workspace)
  • Update bash_executor.rs to use dynamic safe command rules with thread-safe OnceLock<RwLock>
  • Support relative and absolute paths for safe command configuration files
  • Add comprehensive tests for layer application order and mode combinations
  • Integrate bash configuration loading into main config system with proper error handling

- Add `BashConfig` struct with `safe_commands_path` and `safe_commands_mode` (append/override)
- Implement `BashConfigLayers` to support global and workspace-specific safe command configurations
- Add `configure_safe_commands()` function to apply safe command layers in order (global → workspace)
- Update `bash_executor.rs` to use dynamic safe command rules with thread-safe `OnceLock<RwLock>`
- Support relative and absolute paths for safe command configuration files
- Add comprehensive tests for layer application order and mode combinations
- Integrate bash configuration loading into main config system with proper error handling
@linw1995 linw1995 added the enhancement New feature or request label Jan 5, 2026
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 66.45963% with 54 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.22%. Comparing base (fad69e0) to head (25f19f0).
⚠️ Report is 5 commits behind head on dev.

Files with missing lines Patch % Lines
src/agent/bash_executor.rs 79.48% 24 Missing ⚠️
src/config/mod.rs 38.88% 22 Missing ⚠️
src/agent.rs 0.00% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev      #75      +/-   ##
==========================================
- Coverage   59.25%   59.22%   -0.04%     
==========================================
  Files          77       77              
  Lines       15488    15822     +334     
==========================================
+ Hits         9177     9370     +193     
- Misses       6311     6452     +141     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@linw1995 linw1995 merged commit 2f0a8be into dev Jan 5, 2026
3 checks passed
@linw1995 linw1995 deleted the feature/bash-whitelist-config branch January 5, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants