cli/pkg/agentic
Snider b819b9432a
Add logging for security events (authentication, access) (#320)
* feat(log): add security events logging for authentication and access control

- Added `Security` method to `log.Logger` with `[SEC]` prefix at `LevelWarn`.
- Added `SecurityStyle` (purple) to `pkg/cli` and `LogSecurity` helper.
- Added security logging for GitHub CLI authentication checks.
- Added security logging for Agentic configuration loading and token validation.
- Added security logging for sandbox escape detection in `local.Medium`.
- Updated MCP service to support logger injection and log tool executions and connections.
- Ensured all security logs include `user` context for better auditability.

* feat(log): add security events logging for authentication and access control

- Added `Security` method to `log.Logger` with `[SEC]` prefix at `LevelWarn`.
- Added `SecurityStyle` (purple) to `pkg/cli` and `LogSecurity` helper.
- Added security logging for GitHub CLI authentication checks.
- Added security logging for Agentic configuration loading and token validation.
- Added security logging for sandbox escape detection in `local.Medium`.
- Updated MCP service to support logger injection and log tool executions and connections.
- Ensured all security logs include `user` context for better auditability.
- Fixed code formatting issues identified by CI.

* feat(log): refine security logging and fix auto-merge CI

- Moved `Security` log level to `LevelError` for better visibility.
- Added robust `log.Username()` helper using `os/user`.
- Differentiated high-risk (Security) and low-risk (Info) MCP tool executions.
- Ensured consistent `user` context in all security-related logs.
- Fixed merge conflict and missing repository context in `auto-merge` CI.
- Fixed comment positioning in `pkg/mcp/mcp.go`.
- Downgraded MCP TCP accept errors to standard `Error` log level.
- Fixed code formatting in `internal/cmd/setup/cmd_github.go`.

* feat(log): finalize security logging and address CI/CodeQL alerts

- Refined `Security` logging: moved to `LevelError` and consistently include `user` context using `os/user`.
- Differentiated MCP tool executions: write/delete are `Security` level, others are `Info`.
- Fixed CodeQL alert: made UniFi TLS verification configurable (defaults to verify).
- Updated UniFi CLI with `--verify-tls` flag and config support.
- Fixed `auto-merge` CI failure by setting `GH_REPO` env var.
- Fixed formatting and unused imports.
- Added tests for UniFi config resolution.

* fix: handle MustServiceFor return values correctly

MustServiceFor returns (T, error), not just T. This was causing build
failures after the rebase.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude <developers@lethean.io>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 10:26:48 +00:00
..
prompts feat(framework): add core DI framework and improve dev commands 2026-01-30 09:02:16 +00:00
client.go feat: infrastructure packages and lint cleanup (#281) 2026-02-04 11:34:43 +00:00
client_test.go feat: infrastructure packages and lint cleanup (#281) 2026-02-04 11:34:43 +00:00
completion.go feat(errors): Unify errors and logging (#180) 2026-02-02 06:48:40 +00:00
completion_test.go fix(agentic): use context.TODO instead of nil Context (#94) 2026-02-01 15:58:26 +00:00
config.go Add logging for security events (authentication, access) (#320) 2026-02-05 10:26:48 +00:00
config_test.go feat: infrastructure packages and lint cleanup (#281) 2026-02-04 11:34:43 +00:00
context.go feat: wire release command, add tar.xz support, unified installers (#277) 2026-02-04 00:49:57 +00:00
context_test.go feat(agentic): add AI collaboration features 2026-01-28 20:04:45 +00:00
embed.go feat(framework): add core DI framework and improve dev commands 2026-01-30 09:02:16 +00:00
service.go Implement Background Goroutines for Long-Running Operations (#309) 2026-02-05 10:26:45 +00:00
types.go feat(agentic): implement core-agentic API client 2026-01-28 19:58:41 +00:00