Coder Social home page Coder Social logo

cmorten / permission-guard Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 1.0 218 KB

A zero-dependency, minimal permission guard for Deno.

Home Page: https://asos-craigmorten.github.io/permission-guard/

License: MIT License

Makefile 3.89% TypeScript 96.11%
deno deno-module denojs denoland security security-hardening permissions permission-manager permission-guard protection

permission-guard's Introduction

Permission Guard

A zero-dependency, minimal permission guard for Deno to prevent overly permissive execution of your applications.

Current version Current test status Deno docs PRs are welcome permission-guard issues permission-guard stars permission-guard forks permission-guard license permission-guard is maintained Published on nest.land

permission-guard latest /x/ version permission-guard dependency count permission-guard dependency outdatedness permission-guard cached size


Table of Contents

Getting Started

import { guard } from "https://deno.land/x/[email protected]/mod.ts";

await guard();

console.log("Execute my code...!");

Installation

This is a Deno module available to import direct from this repo and via the Deno Registry.

Before importing, download and install Deno.

You can then import Permission Guard straight into your project:

import { guard } from "https://deno.land/x/[email protected]/mod.ts";

Permission Guard is also available on nest.land, a package registry for Deno on the Blockchain.

import { guard } from "https://x.nest.land/[email protected]/mod.ts";

Note: Permission Guard makes use of the unstable Deno Permissions API which requires --unstable to be passed in the Deno run command. You can use Permission Guard in applications and not provide the --unstable flag, Permission Guard will simply return as a no-op and not provide any defenses.

Features

  • Protection against unnecessary top-level permissions. Including ability to revoke undesired permissions.
  • Protection against missing required permissions.
  • Recommendations where permissions could be better scoped (if log: true provided).
  • Useful logs detailing the missing or insecure permissions (if log: true provided).

Documentation

Examples

To run the examples, you have two choices:

  1. Clone the Permission Guard repo locally:

    git clone git://github.com/asos-craigmorten/permission-guard.git --depth 1
    cd permission-guard

    Then run the example you want:

    deno run --unstable ./examples/defaults/index.ts

All the examples contain example commands in their READMEs to help get you started.

Contributing

Contributing guide


License

Permission Guard is licensed under the MIT License.

permission-guard's People

Contributors

asos-craigmorten avatar cmorten avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

dendisuhubdy

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.