-
Notifications
You must be signed in to change notification settings - Fork 8
feat(similarity): 相似度检测管理前端 #61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
CodFrm
wants to merge
25
commits into
main
Choose a base branch
from
test/hotfix
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
fd4a47f
update .gitignore
CodFrm 519e45b
feat(similarity): scaffold admin similarity dashboard route + menu
CodFrm d5e6d9e
feat(similarity): add frontend similarity API service client
CodFrm 4ac68c3
feat(similarity): add zh-CN translations for Phase 3 admin panel
CodFrm b977170
feat(similarity): implement PairsTable tab
CodFrm 6a8d525
feat(similarity): implement SuspectsTable tab
CodFrm 5fc30af
fix(similarity): integrity_score 0 rendering and consolidate antd imp…
CodFrm 5dedecb
feat(similarity): implement integrity review queue tab
CodFrm 2249164
fix(similarity): use non-deprecated Drawer props (size/destroyOnHidden)
CodFrm 8606147
fix(similarity): destroy ResolveReviewModal form on close to prevent …
CodFrm 20a2f7c
feat(similarity): add removePairWhitelistByID API client method
CodFrm db34b60
feat(similarity): implement whitelist management tabs
CodFrm 59d57b9
feat(similarity): add admin pair detail page with Monaco diff viewer
CodFrm d02c123
feat(similarity): add semi-public pair evidence page
CodFrm 8e038be
fix(similarity): use Alert.title instead of deprecated message prop
CodFrm 183f844
fix(similarity): use real CSS class for diff highlights and correct b…
CodFrm d0ac8a0
feat(similarity): show integrity rejection alert on script publish/up…
CodFrm 3dc4eb8
feat(similarity): add Phase 3 translations for all supported locales
CodFrm 9e8574e
feat(similarity): Phase 4 backfill control panel + stop-fp refresh
CodFrm b570ceb
fix(similarity): flag deleted scripts in pair list with toggle filter
CodFrm d0a6b7c
feat(similarity): show signal descriptions in integrity review table
CodFrm 33667a4
refactor(similarity): move SIGNAL_DESCRIPTIONS hardcoded Chinese stri…
CodFrm ad30922
feat(i18n): add missing Phase 4 similarity keys to all non-zh-CN locales
CodFrm 600c29e
style: fix prettier formatting in IntegrityReviewTable
CodFrm a9a840c
refactor: extract PairDetailClient and CodeDiffViewer to shared compo…
CodFrm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,5 +47,6 @@ next-env.d.ts | |
| /public/assets/prismjs/* | ||
|
|
||
| .claude | ||
|
|
||
| .omc | ||
| CLAUDE.md | ||
|
|
||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -65,7 +65,8 @@ | |
| "scores": "Score Management", | ||
| "scripts": "Script Management", | ||
| "system_config": "System Config", | ||
| "users": "User Management" | ||
| "users": "User Management", | ||
| "similarity": "Similarity Detection" | ||
| }, | ||
| "no_permission": "You do not have admin permission to access this page.", | ||
| "oauth_apps": { | ||
|
|
@@ -250,6 +251,111 @@ | |
| "title": "User Management", | ||
| "unban_confirm": "Are you sure you want to unban this user?", | ||
| "unban_success": "User unbanned successfully" | ||
| }, | ||
| "similarity": { | ||
| "tab_pairs": "Pairs", | ||
| "tab_suspects": "Suspects", | ||
| "tab_integrity_reviews": "Integrity Reviews", | ||
| "tab_pair_whitelist": "Pair Whitelist", | ||
|
Comment on lines
+255
to
+259
|
||
| "tab_integrity_whitelist": "Integrity Exemptions", | ||
| "col_id": "ID", | ||
| "col_script_a": "Script A", | ||
| "col_script_b": "Script B", | ||
| "col_jaccard": "Jaccard", | ||
| "col_common": "Common Fingerprints", | ||
| "col_earlier": "Earlier Side", | ||
| "col_status": "Status", | ||
| "col_integrity": "Integrity Score", | ||
| "col_actions": "Actions", | ||
| "col_script": "Script", | ||
| "col_max_jaccard": "Max Jaccard", | ||
| "col_coverage": "External Coverage", | ||
| "col_pair_count": "Pair Count", | ||
| "col_detected_at": "Detected At", | ||
| "col_score": "Score", | ||
| "col_createtime": "Created", | ||
| "col_reason": "Reason", | ||
| "col_added_by": "Added By", | ||
| "status_pending": "Pending", | ||
| "status_whitelisted": "Whitelisted", | ||
| "status_resolved": "Resolved", | ||
| "review_pending": "Pending", | ||
| "review_ok": "OK", | ||
| "review_violated": "Violation", | ||
| "action_detail": "Details", | ||
| "action_resolve": "Resolve", | ||
| "action_whitelist": "Whitelist", | ||
| "action_remove": "Remove", | ||
| "confirm_remove_whitelist": "Remove this whitelist entry?", | ||
| "msg_removed": "Removed", | ||
| "modal_add_int_whitelist": "Add Integrity Exemption", | ||
| "label_script_id": "Script ID", | ||
| "label_reason": "Reason", | ||
| "btn_add": "Add", | ||
| "modal_resolve_title": "Mark Integrity Review", | ||
| "label_decision": "Decision", | ||
| "label_note": "Note", | ||
| "decision_ok": "OK", | ||
| "decision_violated": "Violation", | ||
| "msg_review_resolved": "Marked successfully", | ||
| "msg_whitelisted": "Added to whitelist", | ||
| "drawer_review_detail": "Integrity Review Details", | ||
| "label_score": "Total Score", | ||
| "label_sub_scores": "Category Scores", | ||
| "label_hit_signals": "Hit Signals", | ||
| "label_jaccard": "Jaccard", | ||
| "label_common": "Common Fingerprints", | ||
| "label_earlier": "Earlier Side", | ||
| "label_detected_at": "Detected At", | ||
| "label_script_a": "Script A", | ||
| "label_script_b": "Script B", | ||
| "label_code_diff": "Code Diff", | ||
| "script_deleted": "Deleted", | ||
| "filter_exclude_deleted": "Hide pairs with deleted scripts", | ||
| "tab_backfill": "Backfill & Rescan", | ||
| "backfill": { | ||
| "help_title": "Historical Script Backfill", | ||
| "help_body": "After the system is deployed, only newly published or updated scripts are automatically scanned for similarity. To include historical scripts in comparisons, trigger a manual backfill. The backfill sends a scan message for each script, processed asynchronously by background consumers. You can safely leave this page during the process.", | ||
| "status_title": "Backfill Status", | ||
| "label_running": "Status", | ||
| "label_total": "Total", | ||
| "label_cursor": "Cursor", | ||
| "label_progress": "Progress", | ||
| "label_started_at": "Started At", | ||
| "label_finished_at": "Finished At", | ||
| "state_running": "Running", | ||
| "state_idle": "Idle", | ||
| "btn_start": "Start Backfill", | ||
| "btn_restart": "Restart from Beginning", | ||
| "btn_refresh": "Refresh Status", | ||
| "confirm_start_title": "Start backfill?", | ||
| "confirm_start_body": "This will continue sending scan messages from the last cursor position.", | ||
| "confirm_restart_title": "Restart backfill from beginning?", | ||
| "confirm_restart_body": "The cursor will reset to 0, and all scripts in the database will be re-scanned. This is usually only needed on initial deployment or after refreshing the stop-fp list.", | ||
| "msg_started": "Backfill task started", | ||
| "manual_scan_title": "Manually Rescan Single Script", | ||
| "manual_scan_placeholder": "Enter script ID", | ||
| "btn_manual_scan": "Send Scan", | ||
| "msg_manual_scan_published": "Scan message published", | ||
| "stop_fp_title": "Stop-fingerprint Refresh", | ||
| "stop_fp_warn_title": "Manual trigger usually not needed", | ||
| "stop_fp_warn_body": "The stop-fp list is refreshed automatically every hour by a scheduled task. Only trigger manually once after completing the initial full backfill (step 8 in §8.5), so Jaccard calculations filter out common template code.", | ||
| "btn_stop_fp_refresh": "Refresh Now", | ||
| "msg_stop_fp_refreshed": "Stop-fingerprint set refreshed" | ||
| }, | ||
| "signal_desc": { | ||
| "avg_line_length": "Average line length too high (code may be compressed into few long lines)", | ||
| "max_line_length": "Maximum line length too high (contains extremely long lines)", | ||
| "whitespace_ratio": "Whitespace ratio too low (code lacks normal spacing and indentation)", | ||
| "comment_ratio": "Comment ratio too low (code has almost no comments)", | ||
| "single_char_ident_ratio": "Single-character identifier ratio too high (variable names shortened to single characters)", | ||
| "hex_ident_ratio": "Hex identifier ratio too high (uses _0x prefixed obfuscated variable names)", | ||
| "large_string_array": "Large string array detected (common in obfuscation tool string tables)", | ||
| "dean_edwards_packer": "Dean Edwards packer detected", | ||
| "aa_encode": "AAEncode encoding detected", | ||
| "jj_encode": "JJEncode encoding detected", | ||
| "eval_density": "eval/dynamic execution call density too high" | ||
| } | ||
| } | ||
| }, | ||
| "auth": { | ||
|
|
@@ -1883,5 +1989,17 @@ | |
| }, | ||
| "utils": { | ||
| "time_format": "YYYY-MM-DD" | ||
| }, | ||
| "similarity": { | ||
| "evidence": { | ||
| "disclaimer_title": "Preliminary Finding, Not a Final Verdict", | ||
| "disclaimer_body": "This page shows automatically detected similar-code evidence. It is informational only. Please do not draw definitive conclusions about the author from this data." | ||
| } | ||
| }, | ||
| "errors": { | ||
| "integrity_rejected": { | ||
| "title": "Code Failed Integrity Check", | ||
| "help": "If this is a false positive, please apply for an exemption via the admin contact listed in the site FAQ." | ||
| } | ||
| } | ||
| } | ||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New similarity UI references additional translation keys (e.g. tab_backfill, backfill.*, script_deleted, filter_exclude_deleted) that are not present in this locale file. Add these keys here to avoid missing-message fallbacks at runtime.