Git Product home page Git Product logo

report-creation-on-python's Introduction

Report-Creation-on-Python

Generate my Security Report with a Python module.

1. Prior to installation

To make this module works properly, you need to install several external modules.

You need :

Install Python 3 on your operating system following the Python website's instructions.

The easiest way to do this is to use the pip installer.

pip install xlsxwriter or python3.x -m pip install xlsxwriter
pip install python-pptx or python3.x -m pip install python-ppx

To develop this program, I use Visual Studio Code with the Python extension.

Visual Studio Code and Python Extension

Be sure to change your Python interpreter to Python3 as this program was developed for Python3. In Visual Studio Code, you can do this very easily following the instructions here.

2. Installation

Download the zip file from Github or clone the repository.

As Python is an interpreted language, you just need the source files to make it work.

3. Set up your directories

  1. Describe your phases as root directory.
  2. Describe the projects and objects you need to follow inside each phase directory.

Your folder hierarchy should be as followed :

Security Projects Folder Hierarchy

The directory of project and object must be described as followed : "Phase - Project Name - Object Name"

The Phase must be one of the following :

  • Done
  • In Progress
  • On Hold
  • Not Started
  • Not Evaluated

4. Launch the application

Then you only need to run the writereport.py module in your terminal.

py /path/to/writereport.py --help

Your Excel and Powerpoint reports are located into the 'ReportHistory' folder.

5. Explanation about creating command alias on Windows, MacOS and Linux

To launch the reports creation in a easier and quicker, you can use alias on macOS and Linux or Powershell Alias on Windows.

See the explanations above. For Windows : https://technet.microsoft.com/en-us/library/ee176913.aspx

change the Execution policy if you don't have any rights to launch powershell profiles : https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-5.1&viewFallbackFrom=powershell-Microsoft.PowerShell.Core

For MacOS and Linux : Create the .bash_profile file using the command line program called ‘nano’ if it doesn’t exist:

nano ~/.bash_profile

Add this line the end of your file:

alias writereport='python3 /path/to/writereport.py'

Save your file

ctrl-x y

Refresh the bash shell environment:

source ~/.bash_profile

If you use the fish shell, just type that command:

alias writereport 'python3 /path/to/writereport.py'

or check the documentation here.

📚 Doc : Add explanation on how to create an alias on macOS In order for the user to have a shortcut to the app and don't require to enter the all path the 'writereport.py' python file.

Released under the Mozilla Public License, version 2.0
Made with ❤️ in Paris 🇫🇷

report-creation-on-python's People

Contributors

shosta avatar

Stargazers

 avatar

Watchers

 avatar  avatar

report-creation-on-python's Issues

Add a new "Comment" column in the Excel file.

Add a new "Comment" column in the Excel file.
This comment is going to highlight any information about an object.

Comments are stored in the "project_info.xml" file for each object in a "Comments" tag.

Add an "On Hold" state for an objet

Objects in any Security phase has 4 possible states :

  • Not Started
  • Not Evaluated
  • In Progress
  • Done

We must add a new one, "On Hold" to highlight when an object delivery is blocked.

Add "acceptedRiskCounter" to the project info and treat it into the report

Add a "acceptedRiskCounter" value in the "project_info.xml" file and update it accordingly to the project delivery.
Add it into the report file.
We must add a hint in the PPT report file to explain what we mean by an "Accepted Risk".

An "Accepted Risk" is a risk that is either :

  • Mitigated
  • Transferred
  • Accepted

Add a eIoT category of object.

Add an "EIOT" category of object along the "B2C" and "B2B" ones.

Each "project_info.xml" file must add the new "EIOT" category and set it to true or false regarding its owner/destination.

Change "B2B" category to "Others"

"B2B" described all the objects that were not for the public (aka B2C).
But we want to separate the "B2B" projects through "eIoT" and "Other" projects.

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.