feat: core infrastructure improvements and production hardening#28
feat: core infrastructure improvements and production hardening#28
Conversation
Implement foundational infrastructure features: - Remote policy extends with URL-based inheritance - TLS support for hushd with certificate configuration - Prometheus metrics endpoint for observability - Custom guard registration and runtime - Enhanced audit logging with structured schema - Prompt security module for Python SDK - Policy event improvements and validation tooling - Comprehensive documentation and ruleset updates Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 84e734f960
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
crates/hushd/src/remote_extends.rs
Outdated
| let resp = client | ||
| .get(url) | ||
| .send() | ||
| .map_err(|e| Error::ConfigError(format!("Failed to fetch remote policy: {}", e)))?; |
There was a problem hiding this comment.
Enforce allowlist after redirects
The allowlist check happens before the request, but reqwest::blocking::Client follows redirects by default. If an allowlisted host returns a 3xx to a non-allowlisted host, send() will follow and fetch from that new host without re-validating the allowlist, which bypasses the origin restrictions (and can enable SSRF/policy sourcing from unapproved origins). Consider disabling redirects or checking resp.url() against the allowlist after send().
Useful? React with 👍 / 👎.
…ture # Conflicts: # crates/clawdstrike/src/engine.rs # crates/hush-cli/src/policy_event.rs
…ture # Conflicts: # crates/hush-cli/src/main.rs # crates/hushd/Cargo.toml # crates/hushd/src/api/check.rs # crates/hushd/src/api/metrics.rs # crates/hushd/src/api/policy.rs # crates/hushd/src/config.rs # crates/hushd/src/lib.rs # crates/hushd/src/metrics.rs # crates/hushd/src/state.rs # deploy/README.md # deploy/config.yaml
Summary
Test plan
🤖 Generated with Claude Code