Safescript
An open-source secure scripting language based on a subset of TypeScript with Turing-incomplete characteristics, which performs static security policy verification through compile-time data-flow graphs and taint analysis.
Timeline (last 90 days)
Safescript is currently a niche open-source solution, and its ecosystem maturity, available libraries, and integration with existing TypeScript toolchains all require time to be validated.
In the interception case the compiler rejected the edit, reporting a data-flow policy violation: db:customers flowing to hooks.slack.com.
Source-to-sink policies are declarative security rules that specify which data sources are allowed to flow to which destinations.
Turing incompleteness results in unbounded loops being removed, and iterating over collections of unknown length requires additional abstraction.
Safescript is an open-source project with the package name @uri/safescript, released under the MIT license.
Safescript is a subset of TypeScript that supports JSX but removes unbounded loops, eval and dynamic host strings.
Safescript is a Turing-incomplete language.
Safescript can be compiled into a static data-flow graph, with security checks completed at compile time.
In Safescript, each database query emits a namespace label (such as db:customers), each secret read emits a secret:<NAME> label, and labels propagate along the data flow.
Safescript uses taint analysis to track the propagation of sensitive data and refuses compilation if taint flows to an unauthorized sink.
5 more timeline events
All Facts (15)
Safescript is currently a niche open-source solution, and its ecosystem maturity, available libraries, and integration with existing TypeScript toolchains all require time to be validated.
50%UnverifiedIn the interception case the compiler rejected the edit, reporting a data-flow policy violation: db:customers flowing to hooks.slack.com.
50%UnverifiedSource-to-sink policies are declarative security rules that specify which data sources are allowed to flow to which destinations.
50%UnverifiedTuring incompleteness results in unbounded loops being removed, and iterating over collections of unknown length requires additional abstraction.
50%UnverifiedSafescript is an open-source project with the package name @uri/safescript, released under the MIT license.
50%UnverifiedSafescript is a subset of TypeScript that supports JSX but removes unbounded loops, eval and dynamic host strings.
50%UnverifiedSafescript is a Turing-incomplete language.
50%UnverifiedSafescript can be compiled into a static data-flow graph, with security checks completed at compile time.
50%UnverifiedIn Safescript, each database query emits a namespace label (such as db:customers), each secret read emits a secret:<NAME> label, and labels propagate along the data flow.
50%UnverifiedSafescript uses taint analysis to track the propagation of sensitive data and refuses compilation if taint flows to an unauthorized sink.
50%UnverifiedThe original article gives a 12-line JSX CRM example that uses SQLite tables, writing via dbTransact and reading via dbQuery.
50%UnverifiedIn the interception case, the application approved the two external hosts hooks.slack.com and api.stripe.com, and the egress policy for db:customers allows only api.stripe.com.
50%UnverifiedSafescript is a restricted sandbox language with no loops, arbitrary file access, raw shell commands, or unrestricted network access.
50%UnverifiedAll network requests in Safescript are statically analyzed against an explicit allowlist derived from key policies, and requests to unknown hosts are rejected before execution.
50%UnverifiedThe three-layer architecture proposed by the author consists of: a first-layer sandboxed edge code (Safescript), a second-layer decision model (System 1), and a third-layer full LLM agent loop (System 2).
50%