Code Monkey home page Code Monkey logo

python-security-tool-boilerplate's Introduction

python-security-tool-boilerplate

Boilerplate code for Python based security assessment tools that generate HTML reports.

Background

When developing Python-based security assessment tooling, it's difficult to include User Interfaces as a baked-in part of the tool.

Let's say you want to be able to run a command, have the tool generate a report, and you view the report. You have three options:

  1. Output the HTML into a single HTML file.
    • Becomes a nightmare to maintain and read
    • You will hate Jinja2
  2. Output the HTML into a zip file.
    • Report looks great
    • Everyone will complain about having to zip and unzip the files.

ScoutSuite (which is a fantastic tool) does the latter. It looks like the contributors have to include their handwritten HTML per finding.

That would be a templating nightmare. I wanted to avoid this. But I also couldn't stick with Option 1 for much longer - the HTML file had become over 1000 lines, and it looked really ugly.

So I figured out a cool approach that combined the powers of Python, Jinja2, VueJS, and Webpack that:

  • Generates a single HTML file as part of the Python command to display the report.
  • Allows contributors to store their JavaScript in several files in line with standard convention (Vue CLI)
  • Does not require the user to install webpack or anything else except the Python tool

Tutorial

...todo

Using this repository

...todo

Note: When the user wants to add more info to the table, they will have to:

  • Include that in the JSON data output from the python before it gets fed into JS
  • Edit the sampleData.js file to show that new file
  • Edit the TableReport.vue component file to show the new field

python-security-tool-boilerplate's People

Contributors

kmcquade avatar

Stargazers

Eduardo Rabelo avatar  avatar

Watchers

James Cloos avatar  avatar

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.