security-report-check
Screenshots
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "security-report-check" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-6f046f72a3c37fc4041e279006c47268fcee3396f29c729cd7146669d36ecf4e. Verify the upstream source and version against https://github.com/microsoft/TypeScript before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
An informational document about conducting security research or reporting security issues in this repository. Describes what guarantees and non-guarantees the document provides; consult it before reporting vulnerabilities or undertaking security research.
Introduction source: third_party · microsoft · 0.0.1 Reference
SkillPi interpretation
- Tasks
- The TypeScript compiler (`tsc`) is a **build tool**, not a sandbox. It transforms TypeScript source files into JavaScript output files and reports potential errors. This document describes what `tsc` guarantees and does not guarantee when invoked on untrusted input.
- Audience
- Not specified in the source documentation.
- Inputs and outputs
- If an attacker has control of an input TS file, they can of course control the contents of the output JS file. Attacks that depend on control of the input file and execution of the output file are not considered compiler security issues, because the attacker already has control of the input file.
- Software, accounts and paid services
- Not specified in the source documentation.
- Limits and differences
- Not specified in the source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: security-report-check
description: >
Are you doing security research on this repo?
This document covers what guarantees and non-guarantees are provided.
Consult this document before reporting a security issue or conducting security research.Security Properties of tsc
Overview
The TypeScript compiler (tsc) is a build tool, not a sandbox.
It transforms TypeScript source files into JavaScript output files and reports potential errors.
This document describes what tsc guarantees and does not guarantee when invoked on untrusted input.
Security Guarantees
No arbitrary code execution
Running tsc on a malicious .ts or tsconfig.json file will never cause the input code to be executed.
The compiler parses, type-checks, and emits; it does not evaluate the programs it compiles.
There is no eval-at-compile-time, no macro system, and no plugin mechanism that runs author-supplied code during compilation.
This is the core security property of tsc.
Exception: If content mappers are enabled, this does enable execution of third-party code.
Only pass the --runExternalCode flag if you have validated which content mappers are available and that you are OK with running them.
Limited default side effects.
Outside of explicitly enabled external code, compiler invocations interact with the system through file-system operations and process I/O. Depending on the options, tsc may write compiler, build-info, trace, or profile files, update output timestamps, or delete build outputs (for example, with --build --clean).
The compiler does not make HTTP requests or spawn child processes except through content mappers.
Safe exit. Certain adversarial inputs may cause crashes, but these crashes will unwind the process normally, and will not be a source of buffer overrun or other memory safety exploit vectors.
Non-Guarantees
Arbitrary file writes
tsc writes compiler output to paths derived from its configuration (outDir, outFile, declarationDir, etc.) and the structure of the input project.
It is expected that a given tsconfig.json can direct output to any path writable by the calling user.
This is by design: writing files to disk is the point of a compiler.
Callers who need to constrain output locations must do so externally (e.g., filesystem permissions, containers, sandboxing).
Similarly, running tsc --build --clean may delete files from disk; crafted .tsbuildinfo or tsconfig.jsons may cause any file to be deleted.
Input code is output code
If an attacker has control of an input TS file, they can of course control the contents of the output JS file. Attacks that depend on control of the input file and execution of the output file are not considered compiler security issues, because the attacker already has control of the input file.
File read sandboxing
tsc will read files from paths specified in input files, and transitive references from there, including import paths and reference directives.
An attacker in control of these files may therefore cause a read of any file path the tsc process has privileges to read, and tsc may reprint certain file contents in its output messages.
In other words, for example, it is not generally safe to run tsc on untrusted code and print back the error message contents to an untrusted party, as this could expose local filesystem contents to the attacker.
Use of standard sandboxing strategies is recommended to secure scenarios similar to this.
Resource consumption
TypeScript's type system is Turing-complete.
A crafted input file can cause tsc to consume unbounded CPU time or memory during type-checking, and in fact small type constructs that can consume a large amount of time are common and intentional.
Routine compilations of normal code can legitimately take multiple minutes and gigabytes of memory, so there is no reliable way to distinguish between a "normal" long-running compilation and an adversarially-constructed one.
Callers operating on untrusted input should enforce resource limits externally (e.g., ulimit, cgroups, process timeouts).
You should not assume that an adverserially-constructed program will successfully typecheck in any bounded amount of time.
"Local Denial of Service (DoS)" is thus not a security report; if you encounter a performance problem, you can report this through the normal issue tracker.
Crashes
tsc may gracefully crash, hang, or produce unexpected diagnostics when given adversarial input.
While crashes in "normal" code are treated as bugs and fixed when reported, the compiler does not guarantee non-crashing in the presence of all possible malformed inputs (e.g. an unbounded series of f(f(f(f(...).
tsbuildinfo
The .tsbuildinfo file is a cache of compiler state that is used to speed up incremental compilation.
If this file is modified, it can cause tsc to e.g. fail to build a file because it thinks the file is up-to-date, or to recompile a file that has not changed.
.tsbuildinfo files should be considered as sensitive as tsconfig.json files in terms of security; an attacker who can modify them can cause arbitrary file reads and writes.
Language Service
The TypeScript Language Service (LS) only executes in the context of a trusted workspace (VS Code) or trusted folder (VS). Similar to tsc, there are no guaranteed resource caps in the LS, and "hangs" may occur in the presence of adversarial inputs.
Examples
Hypothetically Valid Security Reports
- Running
tsc malicious.tsexecutes top-level code frommalicious.ts, even though--runExternalCodewas not passed. - A specially crafted source file causes
tscto launch an attacker-chosen executable, even though--runExternalCodewas not passed. - A malformed input exploits a memory-safety flaw to execute arbitrary native code rather than merely causing the
tscprocess to exit.
Hypothetically Invalid Security Reports
- A recursive conditional type causes the reporter's local
tscprocess to use all available CPU or memory, hang, or terminate with a stack overflow. - A malicious
tsconfig.jsondirects emitted JavaScript or declarations to an unexpected path that is writable by the user runningtsc. - A project causes
tsc --build --cleanto delete a file that the invoking user has permission to delete. - An import or reference directive causes
tscto read a local file, and a diagnostic reveals some of that file's contents to the caller. - Attacker-controlled TypeScript produces attacker-controlled JavaScript that performs a malicious action when executed.
- A malformed source file crashes
tscwithout escaping the process or causing memory corruption. - A content mapper executes code after the caller explicitly enables content mappers with
--runExternalCode.
Version history
-
vscode-typescript/v1.0.2
GitHub ↗
Original release notes
Bundles TypeScript 7.0.2 from commit b37cbdc6886df3c2a34cbde8d20fbb4637a35503.
-
vscode-typescript/v1.0.1
GitHub ↗
Original release notes
Bundles TypeScript 7.0.2 from commit b6eaace9d7cfd63c018ab25340ba463baae07fb5.
-
v7.0.2
GitHub ↗
Original release notes
https://devblogs.microsoft.com/typescript/announcing-typescript-7-0/ This tag was originally released at: https://github.com/microsoft/typescript-go/releases/tag/typescript%2Fv7.0.2
-
v6.0.3
GitHub ↗
Original release notes
For release notes, check out the [release announcement blog post](https://devblogs.microsoft.com/typescript/announcing-typescript-6-0/). * [fixed issues query for TypeScript 6.0.0 (Beta)](https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&q=milestone%3A%22TypeScript+6.0.0%22). * [fixed issues query for TypeScript 6.0.1 (RC)](https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&q=milestone%3A%22TypeScript+6.0.1%22). * [fixed issues query for TypeScript 6.0.2 (Stable)](https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&q=milestone%3A%22TypeScript+6.0.2%22). * [fixed issues query for TypeScript 6.0.3 (Stable)](https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&q=milestone%3A%22TypeScript+6.0.3%22). Downloads are available on: * [npm](https://www.npmjs.com/package/typescript)
-
v6.0.2
GitHub ↗
Original release notes
For release notes, check out the [release announcement blog post](https://devblogs.microsoft.com/typescript/announcing-typescript-6-0/). * [fixed issues query for TypeScript 6.0.0 (Beta)](https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&q=milestone%3A%22TypeScript+6.0.0%22). * [fixed issues query for TypeScript 6.0.1 (RC)](https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&q=milestone%3A%22TypeScript+6.0.1%22). * [fixed issues query for TypeScript 6.0.2 (Stable)](https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&q=milestone%3A%22TypeScript+6.0.2%22). Downloads are available on: * [npm](https://www.npmjs.com/package/typescript)
Only the five most recent versions are shown. View full version history at the source ↗
Current listing version
0.0.1
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Areas to improve
-
文档长度较长 Reported severity: Minor
文档内容约450行,虽未超限但建议适当拆分或添加导航
Recommendation: 考虑将文档拆分为多个子文档或添加目录导航提升可读性
Highlights
- 专业性强,面向安全研究人员提供明确指导
- 内容详实,覆盖安全审计的关键场景和边界情况
Highlights
- 触发词清晰明确,覆盖安全研究相关场景
- description准确描述了文档用途和适用场景
Highlights
- 结构完整,章节划分清晰
- frontmatter完整,包含必要元数据
- 提供具体示例帮助理解
Highlights
- 内容准确严谨,逻辑清晰
- 覆盖主要异常场景和边界情况
- 对安全边界有明确说明
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Domains or addresses referenced in the document
These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.
- code.visualstudio.com
- learn.microsoft.com
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Not specified in the source documentation.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.