You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds Security Agent Auto Remediation, including product spec, user controls, remediation attempt tracking, Cloud Agent orchestration, and PR-facing UI.
Why this change is needed
Security Agent could triage and analyze vulnerable dependencies, but users had no durable way to turn eligible findings into remediation PRs, track attempts, prevent duplicate work, or understand why fix actions were unavailable.
Incoming Security Agent UI changes also refactored finding rows, dialogs, and settings sections, so remediation controls need to match current Kilo design-system structure.
How this is addressed
Defines Auto Remediation rules in .specs/security-agent.md, ADR/context docs, and planning docs.
Adds database schema, generated migration, repositories, and lifecycle state for remediation attempts.
Adds manual and automatic remediation admission, duplicate suppression, cancellation, retry, and Worker processing.
Connects Cloud Agent remediation execution to Security Agent callbacks and PR-opened/no-changes/failure outcomes.
Adds manual remediation controls, live polling, PR links, unavailable-state copy, and attempt history in Security Agent findings UI.
Adds Auto Remediation settings in refactored settings layout.
Human Verification
Extensive end-to-end local testing of manual and automatic remediation flows.
Opened http://localhost:3000/security-agent/findings with agent-browser; route loaded and displayed the GitHub installation gate for the current local account.
Reviewer Notes
Human Reviewer Flags
Manual remediation is allowed after human review for manual-review or unknown-exploitability findings when concrete fix path exists; automatic remediation still requires stricter eligibility.
Persistent remediation-attempt tables and generated migration need schema, retention, ownership, and GDPR soft-delete review.
Reconciler dispatching attempts already in queued state
✅ Addressed — reconciler deferred from v1, documented in plan
Other Observations (not in diff, carried forward)
cancelRemediation fire-and-forget improvement (services/security-auto-analysis/src/remediation.ts): interruptCloudAgentSession now wraps the CLOUD_AGENT_NEXT fetch in try/catch and logs non-OK responses. This resolves the previously noted silent swallowing. The response body is still not consumed, but non-OK status is now logged as a warning.
applyAutoRemediationCommand 200-finding limit (services/security-auto-analysis/src/remediation.ts): The scan limit is now extracted as APPLY_AUTO_REMEDIATION_SCAN_LIMIT = 200 constant, truncated flag is computed and logged as a warning when hit, and the result type now includes candidateCount, scanLimit, and truncated fields. Observability gap addressed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Security Agent Auto Remediation, including product spec, user controls, remediation attempt tracking, Cloud Agent orchestration, and PR-facing UI.
Why this change is needed
Security Agent could triage and analyze vulnerable dependencies, but users had no durable way to turn eligible findings into remediation PRs, track attempts, prevent duplicate work, or understand why fix actions were unavailable.
Incoming Security Agent UI changes also refactored finding rows, dialogs, and settings sections, so remediation controls need to match current Kilo design-system structure.
How this is addressed
.specs/security-agent.md, ADR/context docs, and planning docs.Human Verification
Browser smoke
Opened
http://localhost:3000/security-agent/findingswithagent-browser; route loaded and displayed the GitHub installation gate for the current local account.Reviewer Notes
Human Reviewer Flags
Code Reviewer Agent
Code Reviewer Notes
@kilocode/worker-utils/security-remediation-policy.security-auto-analysis.View PRstops row propagation and uses incoming row action slot.0162_sloppy_luke_cage.sqlafter latestorigin/mainadded0161_smiling_wallop.sql.