GithubHelp home page GithubHelp logo

gregswindle / frisky_sleuth Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 2.0 61 KB

Inspect repository resources against a list of patterns to detect sensitive or dangerous information by file contents, extension, name, and path.

License: Apache License 2.0

dlp

frisky_sleuth's People

Contributors

fossabot avatar gregswindle avatar

Watchers

 avatar  avatar  avatar

frisky_sleuth's Issues

feat(data-loss-prevention): export signatures to Gitlab files_blacklist.yml

Feature request

As a Gitlab administrator or repo Maintainer,
I want to export extension, filename, and path Signature to YAML
In order to identify risky push events with a pre-receive hook.

Notes

Need a class like this:

"""
frisky_sleuth.export.to.gitlab.files_blacklist
"""

class FilesBlacklist():

  """
  Constructor
  """

  def __init__(self, signatures):
     self.signatures = signatures
     self.entries = self.from_signatures(self.signatures)

  """
  Convert signatures to YAML comments and list entries.
  """

  def from_signatures(self, signatures):
    entries = []
    for signature in signatures:
      entry = f"# Detect {signature.caption.lower()}s\n# by {signature.part} {signature.type}."
      if signature.description:
        entry = text + f"\n\n# @description\n# {signature.description}"
      entry + f"\n\n- {signature.pattern}\n\n"
      entries.append(entry)
    return entries

  """
  Generate valid YAML strings.
  """

  def __str__(self):
    return self.entries.join('\n\n')

refactor(frisky): extract modules into package "frisky_sleuth"

1. User story summary

As a consumer and contributor,
I want frisky refactored into modules
In order to extend the library and reuse its codebase.

2. Acceptance criteria

We'll be done when:

  • 1. frisky's features are extracted into modules.
  • 2. We can recursively inspect all files within a directory.
  • 3. The frisky_sleuth package returns the same results as frisky.

3. Notes

Is your feature request related to a problem? Please describe.

frisky is difficult to unit test. Breaking features into modules makes testing possible.

Describe the solution you'd like

  • A package for API consumption
  • A CLI "wrapper" (i.e., Terminal controller) that inspects a local repository (just like frisky currently does).

Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

Additional context

Add any other context or screenshots about the feature request here.

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.