Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses several low-level issues across multiple components, focusing on improved error handling, input validation, and test infrastructure enhancements.
Changes:
- Added trust domain validation with comprehensive test coverage
- Improved error messages throughout the codebase for better debugging
- Added security protections including request body size limits
- Refactored test infrastructure to support configurable propagation delays
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/verifier/verifier_test.go | New comprehensive test suite for trust domain validation |
| pkg/verifier/verifier.go | Added trust domain validation function and integrated it into GHVerifier |
| pkg/verifier/multi.go | Improved error messages in getIssuer function |
| pkg/fetcher/bundle.go | Enhanced error messages, added layer validation, and implemented size limits for bundle reading |
| pkg/cainjector/injector_test.go | Updated test to use new test-friendly API with configurable delay |
| pkg/cainjector/injector.go | Refactored to support configurable propagation delays and improved documentation |
| cmd/aaop/aaop.go | Added request body size limit and improved error handling with sanitized error messages |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // validTrustDomain validates that a trust domain contains only safe | ||
| // characters. Trust domains should be alphanumeric with hyphens, similar | ||
| // to DNS labels. | ||
| func validTrustDomain(td string) bool { |
There was a problem hiding this comment.
Could we use some regex matching here?
There was a problem hiding this comment.
Yeah, that's fair. Maybe easier to work with.
No description provided.