Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

feat: sort risk rows (#5187)

p0ny6d78a791b718
diff --git a/backend/store/risk.go b/backend/store/risk.go
index 5c9d9a8116..ff2dee3cc8 100644
--- a/backend/store/risk.go
+++ b/backend/store/risk.go
@@ -111,6 +111,7 @@ func (s *Store) ListRisks(ctx context.Context) ([]*RiskMessage, error) {
expression
FROM risk
WHERE row_status = 'NORMAL'
+ ORDER BY source, level DESC, id
`
tx, err := s.db.BeginTx(ctx, &sql.TxOptions{ReadOnly: true})