Skip to content

Conversation

fenyf
Copy link

@fenyf fenyf commented Sep 17, 2025

What type of PR is this?

type-feature
module-datasecurity

What this PR does / why we need it:

This PR implements the front-end components and logic for the new AI-based sensitive column identification feature. It provides users with an intuitive interface to configure, trigger, and view the results of AI-powered scans, working in conjunction with the back-end services.

Implementation Overview

  • Updated Scan Interface: The sensitive column scanning page has been updated to support a new "AI-Enhanced" mode, allowing users to select both traditional and AI-based rules.
  • Dynamic UI State: The "AI-Enhanced" option and AI rule selections are dynamically enabled or disabled based on the server's AI configuration status, which is checked on page load.
  • Passive Scan Indicators: A new, non-intrusive status component has been created to display the status of passive scans. It shows a "Scanning..." message, followed by the scan result (e.g., "Found 3 sensitive columns") in two key locations:
    1. When viewing a table's structure.
    2. Above the results grid after executing a SQL query.
  • Client-Side Caching: Implemented a multi-level client-side caching strategy (in-memory for 5 mins, localStorage for 24 hours) to store scan results. This significantly improves performance on repeated views of the same table and reduces redundant API calls.

Which issue(s) this PR fixes:

Fixes #73

Special notes for your reviewer:

Testing Suggestions

  • 1. Dynamic Configuration: Please test the UI with the backend AI service configured correctly and incorrectly. Verify that the "AI-Enhanced" mode in the scan settings becomes available/unavailable as expected.
  • 2. Passive Scan Flow: The core user experience to check is the passive scanning. Please:
    • Navigate to a table's structure page and confirm the "Scanning..." -> "Result" flow in the top-right.
    • Execute a SELECT query and observe the same status flow above the results panel.
  • 3. Caching Logic: This is a key non-functional requirement. Please use the browser's Developer Tools to verify the caching behavior:
    • First visit: A network request to the scan API should be visible.
    • Navigate away and back (within 5 mins): The result should load instantly from memory with no new network request.
    • Refresh the page (or visit after 5 mins): The result should still load instantly from localStorage, again with no new network request.

@CLAassistant
Copy link

CLAassistant commented Sep 17, 2025

CLA assistant check
All committers have signed the CLA.

取消置信度功能

完善预设敏感类别映射
敏感列扫描外观修复,缓存刷新逻辑修复

修复主动扫描的逻辑

修改部分扫描逻辑
@fenyf fenyf changed the base branch from main to feat/summer-ospp September 29, 2025 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add UI for AI-sensitive column identification

2 participants