Improving JavaScript Security

Guardia is declarative DSL that allows developers to express and enforce security policies on JavaScript applications. We provide a predefined set of fundamental policies that can be composed to build more complex ones.


GG().onCall(window, "alert").deny()
				

Predefined Fundamental Set Of Policies

Fundamental policies alleviate the developer of the burden of correctly writing security policies, and the built-in composability mechanisms provides the flexibility of imperative specifications.


GG().onCall(document, "createElement")
	.with(GG().arg(GG.equals, 
	               GG().targ(0, String),
		       'iframe'))
	.deny();    
					

Quick Start

Guardia installation requires almost no effort. The unique requirement that you need to use Guardia is inlude its implementation in your code. This can be done by using an script tag in an HTML page or by requiring Guardia's npm package.


const GG = require('guardia');