Vue template secure compilation methods, devices, equipment, and storage media

By parsing Vue component templates into an abstract syntax tree, identifying and tracing injection receivers, the inconsistency in handling cross-site scripting attack risks in the Vue framework is resolved, automated security handling is achieved, and the security of Vue templates is improved.

CN123114437APending Publication Date: 2026-11-17创优数字科技(广东)有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611580586.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-13
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

In existing technologies, the template compilation process of the Vue framework relies on the security awareness and experience of developers, which leads to inconsistent standards for handling cross-site scripting attack risks among different developers, making it easy to overlook risk locations.

Method used

By parsing the Vue component template into an abstract syntax tree, traversing the nodes to identify the injection receiver type, tracing the original data source and determining the data type, performing security processing, generating a new abstract syntax tree, and compiling it into rendering function code.

Benefits of technology

The automated identification and processing of injection receivers eliminates the problems of missed risk identification and inconsistent processing standards caused by differences in developer experience and awareness, thereby improving security and consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123114437A_ABST
    Figure CN123114437A_ABST
Patent Text Reader

Abstract

This application discloses a secure compilation method, apparatus, device, and storage medium for Vue templates. The method involves parsing the Vue component template corresponding to the source code into an abstract syntax tree (Abstract Syntax Tree); traversing each node in the Abstract Syntax Tree to identify whether a node with an injection receiver type exists; for each identified injection receiver type node, tracing the original data source of that node; determining the data type of the original data source; performing security processing on the data source based on the data type to obtain a new Abstract Syntax Tree; and compiling the new Abstract Syntax Tree into rendering function code. This entire process requires no developer intervention, completely eliminating the problems of missed risk identification and inconsistent processing standards caused by differences in security awareness and experience levels among developers.
Need to check novelty before this filing date? Find Prior Art