Giter VIP home page Giter VIP logo

mintos-importer's Introduction

mintos-importer's People

Contributors

mark-stopka avatar

Watchers

 avatar  avatar  avatar

Forkers

alexander30

mintos-importer's Issues

Parse and import statement into database

Take XML vulnerabilities into consideration, when parsing XLSX

There are many attack vectors targeting XML parsers; by default most are susceptible to all or most of the known vulnerabilities. There is DefuseXML Python library to help mitigate against attacks by malicious XML files obtained from non-trusted sources. When working with XLSX documents using xlrd, following wrapper can be used to harden against these attacks.

import defusedxml
from defusedxml.common import EntitiesForbidden
from xlrd import open_workbook
defusedxml.defuse_stdlib()


def secure_open_workbook(**kwargs):
    try:
        return open_workbook(**kwargs)
    except EntitiesForbidden:
        raise ValueError('Please use a xlsx file without XEE')

Upload binary version of Mintos XLSX into database

Upload passed XLSX statement into database, in addition to XLSX blob, also store following information:

  • Statement ID
  • ID of account associated with the statement as foreign key
  • Upload date and time in UTC
  • SHA256 hash of the uploaded file
  • Total amount of transaction in the statement
  • Timestamp of first transaction in the statement
  • Timestamp of last transaction in the statement
  • State of processing as ENUM (new, processing, processed, processing failed)
  • Timestamp of processing start in UTC (can be NULL)
  • Timestamp of processing finish in UTC (can be NULL)

Define database schema v0.1

Define database schema for Mintos platform; all tables related to Mintos platform are to be prefixed with p2p_lending_platform_mintos_.

List of tables

  • p2p_lending_platform_mintos_statements (See Issue #1)
  • p2p_lending_platform_mintos_originators
  • p2p_lending_platform_mintos_loans
  • p2p_lending_platform_mintos_participations
  • p2p_lending_platform_mintos_transaction_types

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.