Commit Graph
3 Commits
Author SHA1 Message Date
samwaf 8e4286150d fix(security): structured whitelist for SQL query API (remove raw SQL)
- Replace raw SQL execution with a structured query (table/mode/columns/filters/top); backend no longer accepts any SQL string
- Fail-closed table & column whitelist: block sensitive tables (auth/key/cert/config/plugin) and columns (password/secret/token/private/key)
- Block EAV/key-value tables (value/params columns) to prevent plaintext secret leak, e.g. system_configs.value
- Parameterize all filter values via GORM clause expressions; operator whitelist; cap filters/IN length
- Add queryable-schema endpoint + query audit logging; harden GetTableInfo to skip sensitive tables/columns
2026-07-03 16:30:53 +08:00
samwaf cbf5428d3d feat: add database table information
#740
2026-04-07 11:03:37 +08:00
samwaf a8f5fa5962 feat:add sql query
#533
2025-11-12 16:32:00 +08:00