Transpiler-Based Security Scanner for TypeScript Vulnerability Detection
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Software code written in less established programming languages, such as TypeScript, often lacks support for automated security vulnerability scanning, leading to costly and time-consuming manual reviews, which can result in delays and increased exposure to security risks.
Innovation Solution
Converting source code from an unsupported language into a supported language, like JavaScript, using a transpiler, and creating a map to associate vulnerabilities detected in the converted code back to their original locations, enabling efficient scanning and identification of security flaws.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If manual review is used to scan code in unsupported languages, then security vulnerabilities can be detected, but the process becomes time-consuming and expensive
Solution Approach 1:
The patent introduces an intermediary translation layer that converts code from unsupported languages (TypeScript, CoffeeScript, Dart) into JavaScript, which can then be scanned by existing vulnerability scanners. This mediator enables automated scanning without requiring manual review, resolving the contradiction between detection reliability and time efficiency.
Solution Approach 2:
The system performs preliminary translation of the source code into a supported language before vulnerability scanning occurs. By pre-converting the code to JavaScript and maintaining mapping information, the system enables subsequent automated scanning to be both reliable and efficient, eliminating the need for time-consuming manual review.
2Productivity
If automated scanning is used for unsupported languages, then scanning efficiency improves, but vulnerability detection accuracy deteriorates due to lack of direct scanner support
Solution Approach 1:
The translation intermediary preserves semantic equivalence between the original code and translated code while maintaining detailed mapping information. This allows automated scanners to work efficiently on the translated JavaScript code while the mapping ensures accurate identification of vulnerabilities in the original source code, maintaining both productivity and measurement precision.
Solution Approach 2:
The system replaces the need for language-specific scanner mechanisms with a universal JavaScript scanner. By substituting the mechanical scanning process with a translation-based approach, the system achieves high scanning efficiency while maintaining accuracy through the preservation of code semantics and mapping relationships.
3Adaptability or versatility
If code translation is performed, then scanner compatibility improves, but system complexity increases due to mapping and transpilation requirements
Solution Approach 1:
The system achieves universality by using JavaScript as a common target language for translating multiple source languages. This single translation target provides multi-functionality, allowing the same vulnerability scanner to handle code from TypeScript, CoffeeScript, Dart, and other languages, thereby improving adaptability without proportionally increasing complexity.
Solution Approach 2:
The system creates a copied version of the original code in JavaScript with preserved semantic structure and maintains mapping relationships. This copying approach enables scanner compatibility while managing complexity through the use of established translation tools and standardized mapping formats rather than requiring complex custom integration.
4Loss of information
If transpilation mapping is created, then vulnerability source identification improves, but processing overhead increases
Solution Approach 1:
The system extracts only the essential mapping information needed for vulnerability location identification, rather than preserving all possible code transformation details. This selective extraction maintains sufficient information to trace vulnerabilities back to their source while minimizing processing overhead and resource consumption.
Solution Approach 2:
The system performs partial translation and mapping only for the portions of code that are relevant to vulnerability scanning, rather than fully translating and mapping entire codebases. This partial action approach maintains adequate vulnerability location information while reducing unnecessary processing overhead.
Data Source
AI summary
A method of scanning software code to identify security flaws or risks and reporting those flaws or risks to a software developer or other interested party, where the software code is written in a language for which a vulnerability scanner is not available.


