Commit Graph
96 Commits
Author SHA1 Message Date
ulleo 3fd6fa867d feat: implement LLM keyword extraction and fusion scoring for table matching
- Add extract_keywords() to LLMService with conversation context support,
  using process_stream + start_log/end_log for logging consistency
- Add expand_with_terminology() to expand keywords with synonym matching
- Add fusion scoring in calc_table_embedding(): α * vec_score + (1-α) * keyword_score
- Add calc_keyword_score() with multi-level matching:
  table name exact (1.0), comment exact (0.9), comment substring (0.7),
  table name partial (0.25-0.5), field comment exact (0.5),
  field comment substring (0.4), field name partial (0.3)
- Scoring considers keyword coverage rate to differentiate tables
  with different numbers of matched keywords
- Extracted keywords persisted to ChatRecord for reuse across endpoints
- get_terminology_template() supports comma-separated keyword input
  with per-keyword matching for higher precision
- Add TABLE_EMBEDDING_ALPHA and TABLE_EMBEDDING_KEYWORD_ENABLED config
2026-09-14 17:51:45 +08:00
fit2cloud-chenyw 4ee923c968 Add config to hide default passwords or force password change at first login #1355 2026-09-02 16:41:01 +08:00
fit2cloud-chenywandClaude bbfc4cc8f5 fix(Security): Host header injection auth bypass and forged admin embedded token (CNVD)
- TokenMiddleware/ResponseMiddleware/audit logger use scope['path']
  instead of request.url.path for whitelist checks: a crafted Host
  header (e.g. x/api/v1/mcp) was concatenated into Starlette's URL
  and made protected routes match the /mcp* whitelist entry
- validateEmbedded rejects admin accounts and non-type-4 apps, so a
  self-signed token with account=admin can no longer impersonate the
  administrator
- Add HostValidationMiddleware rejecting malformed Host headers at the
  outermost layer (defense in depth)
- Add regression tests for host validation, whitelist matching and
  source-level guards

Co-Authored-By: Claude <[email protected]>
2026-08-31 11:05:05 +08:00
fit2cloud-chenyw dc2b0788f4 perf: Add API documentation toggle control 2026-06-24 09:59:39 +08:00
ulleo 5b94406c3a fix: Fix SQL injection / LLM Prompt Injection vulnerability causing unauthorized queries
Security hardening:
- Add SQLBOT_ALLOW_METADATA_QUERIES config option, disable SHOW/DESCRIBE/EXPLAIN by default
- Add table whitelist check, use sqlglot to parse actual SQL table names and compare with authorized table list
- Add dangerous function check, block LOAD_FILE, INTO OUTFILE, EXEC etc. by database type
- Improve check_sql_read to return specific error reasons for better debugging
2026-06-11 17:29:38 +08:00
fit2cloud-chenyw 559c80c5b9 perf: Optimize frontend localStorage key conflicts 2026-04-14 12:04:13 +08:00
fit2cloud-chenyw 5c136b46c5 perf: Optimize Embedded Assistant Cache Settings 2026-03-17 14:38:42 +08:00
fit2cloud-chenyw 6d63dcefc5 fix: Clickjacking Attack 2026-03-16 15:44:57 +08:00
ulleo 5cdfc07169 feat: add context record count configuration to chat
#773
2026-01-26 17:21:56 +08:00
fit2cloud-chenyw e626d13971 fix: dynamic access path setup failure 2026-01-24 14:40:05 +08:00
junjun 3ec03fa859 fix: Fix external database password containing special characters connection failure 2026-01-07 10:49:02 +08:00
fit2cloud-chenyw c78fc5d88b perf: Supports dynamic access paths 2026-01-06 12:14:08 +08:00
xuwei-fit2cloud c6909c5e28 refactor: Code security optimization 2025-12-26 16:38:47 +08:00
fit2cloud-chenyw 52b094a344 perf: Global Transaction Mechanism 2025-12-24 11:52:14 +08:00
ulleo b9b3376396 feat: support command in mcp 2025-12-22 16:46:41 +08:00
ulleo 3812d5308f feat: implement parameter configuration in chat 2025-12-16 16:13:50 +08:00
fit2cloud-chenyw 941167c460 feat: API documentation for user and workspace (#615) 2025-12-12 16:18:02 +08:00
junjun 2952c87d16 feat: Add Api Docs 2025-12-11 14:52:27 +08:00
fit2cloud-chenyw 1669ba3ed1 fix: Error occurs when re-uploading after the license expires 2025-12-10 16:45:43 +08:00
fit2cloud-chenyw 20ded06556 perf(X-Pack): Optimize OAuth2 customization logic (#478) 2025-11-21 16:55:16 +08:00
fit2cloud-chenyw c5ce41fdbf perf(X-Pack): Optimize the OAuth2 Logout Flow 2025-11-21 10:40:47 +08:00
ulleo 6d406f8cb0 feat: import Sample SQL 2025-11-17 20:17:15 +08:00
ulleo 46d8530d78 feat: support use lowercase boolean parameter in environment variables 2025-11-04 16:25:38 +08:00
junjun b389e860f2 feat: add oracle instant client to support oracle version 11 2025-10-24 16:01:47 +08:00
junjun 7ad8d82e13 feat: Vector retrieval matches datasource 2025-10-22 18:25:30 +08:00
ulleo 55fb063f6e feat: improve generate sql template
1.Add parameter: GENERATE_SQL_QUERY_LIMIT_ENABLED (default value is True to control data return Limit 1000 rows)
2.Use different SQL example templates based on different data sources.
2025-10-15 18:34:47 +08:00
junjun 2ebac00f87 feat: Vector retrieval matches tables 2025-10-10 16:37:15 +08:00
Junjun 818a93ffbd revert settings 2025-09-29 10:24:05 +08:00
ParkMinsu c2531c33f0 korean update 2025-09-29 10:24:05 +08:00
xcrzh 3dc4b8ece3 fix: add type annotation for TABLE_EMBEDDING_ENABLED 2025-09-26 20:25:47 +08:00
junjun 8cc15583a4 feat: Vector retrieval matches tables 2025-09-26 17:04:34 +08:00
ulleo cc150c3206 feat: support parse <think> reasoning block 2025-09-23 19:00:51 +08:00
junjun 7537fb27ca refactor: add parameter control table count 2025-09-23 17:49:10 +08:00
junjun 487c8e358d feat: Vector retrieval matches tables 2025-09-23 14:53:30 +08:00
ulleo cefa0bb80c feat: MCP mcp/mcp_question support param to disable streaming 2025-09-22 18:35:38 +08:00
ulleo dca52ce1b2 feat: MCP mcp/mcp_question support param to disable streaming 2025-09-22 18:35:38 +08:00
ulleo 7405c48fd6 feat: add SQL examples in prompt 2025-09-17 15:03:21 +08:00
ulleo f86b2f60cf feat: add SQL examples in prompt 2025-09-16 18:08:53 +08:00
junjun 44362635f6 fix: mcp images path error 2025-09-16 11:32:25 +08:00
junjun 1976d79796 refactor: Increase database connection pool 2025-09-10 12:20:36 +08:00
junjun 5b32418292 refactor: Increase database connection pool 2025-09-10 10:39:33 +08:00
ulleo 589de88c34 fix: out of range error while MCP_IMAGE_HOST is empty 2025-09-08 13:46:36 +08:00
junjun 3adf31264c build: allinone 2025-09-04 13:51:26 +08:00
fit2cloud-chenyw c346af050b perf: Cache Disabled for MCP Service 2025-09-04 13:19:53 +08:00
ulleo 4faa2bd689 feat: use terminology during chat 2025-08-27 14:29:18 +08:00
fit2cloud-chenyw 2f1b477549 fix: Spelling error in the cache component 2025-08-26 13:49:36 +08:00
ulleo 393fd8c5b5 feat: add terminology management 2025-08-25 16:34:44 +08:00
fit2cloud-chenyw 4264d8e4ad perf: Optimize Formatted Pagination Query Results 2025-08-21 14:12:45 +08:00
fit2cloud-chenyw d2a220c5a5 perf(X-Pack): Open permission configuration and page embedding function 2025-08-20 13:10:00 +08:00
fit2cloud-chenyw 329cf74456 feat(X-Pack): Page embedding feature 2025-08-19 17:58:46 +08:00