npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

threatdown

v1.0.2

Published

`threatdown` creates visualizations from **threatdown** formatted text.

Downloads

5

Readme

threatdown

threatdown creates visualizations from threatdown formatted text.

Usage

> npx threatdown my-threatdown.td
# OR
> npx threatdown my-markdown.md

When provided a threatdown file (with the extension .td) the entire file is parsed as threatdown. When provided a markdown file (with the extension .md) the markdown will be read, and threatdown code blocks found inside will be commented out and parsed output inserted in its place.

Options

  • --type <outputType>: outputType must be one of json, mermaid or svg (defaults to mermaid)
  • --output <outputPath>: writes the parsed results to the file outputPath, if unspecified results will be logged instead of written
  • --color/--no-color: enable/disable styling, defaults to enabled

What is threatdown?

Threatdown is a simple and familiar notation syntax for documenting attack trees in describing threat models.

Threatdown is an open standard that can be interpreted into a mermaid graph using the threatdown tool.

Threatdown looks like this:


__Root attacker goal__
- method which in order to be viable
  + requires both this condition to be true
    + [ ] TODO that would mitigate this
    + [x] install condition blocker #31, #35
  + AND this condition, which depends on either
    - x to be true
    - or y to be true
- another method 
  - a condition that depends on some assumptions
     +? this might be a problem
     +? but only if this is also a problem
  - another condition

From which threatdown-graph will produce:

flowchart TD
  A0{Root attacker goal}
    A0---B1(((OR)))
      B1---C1(method which in order to be viable)
        C1---D1(((AND)))
          D1---E1(requires both this condition to be true)
            E1---F1(((AND)))
              F1-. mitigated by .-G1(TODO that would mitigate this)
              F1-- mitigated by ---G2(install condition blocker #31, #35)
          D1---E2(AND this condition, which depends on either)
            E2---F2(((OR)))
              F2---G3(x to be true)
              F2---G4(or y to be true)
      B1---C2(another method )
        C2---D2(((OR)))
          D2---E3(a condition that depends on some assumptions)
            E3---F3(((AND)))
              F3---G5>this might be a problem]
              F3---G6>but only if this is also a problem]
          D2---E4(another condition)