Coder Social home page Coder Social logo

getsentry / probot-censor Goto Github PK

View Code? Open in Web Editor NEW
19.0 55.0 7.0 105 KB

A probot app that removes sensitive information from issues, pull requests and comments

License: BSD 3-Clause "New" or "Revised" License

JavaScript 100.00%
probot probot-app github-app tag-archived

probot-censor's Introduction

Probot: Censor

a GitHub App built with probot that removes sensitive stuff from issues, pull requests and comments

Usage

  1. Configure the GitHub App
  2. Create .github/censor.yml based on the following template
  3. It will start scanning for sensitive information in issues and comments and edit them.

A .github/censor.yml file is required to enable the plugin. The file must specify rules for the bot to scan in the following format:

# An optional generic message to reply after censoring
message: "Hi there, I just edited this for you."
# The required list of rules
rules:
    # A required pattern to scan for. Accepts anything that is a valid JavaScript regular expression
  - pattern: "(private_key|auth_token)=\w+"
    # The text to replace all matches with. Can refer to matching groups with $
    replacement: "$1=๐Ÿ”‘"
    # Optional modifiers for the above regular expression. Defaults to "gi"
    modifier: "gi"
    # Optional message to reply to if this rule matches. If empty, no message is sent
    message: "Please **never post your private tokens**."

Development

# Install dependencies
yarn

# Run the bot
yarn start

# Run test watchers
yarn test:watch

We use prettier for auto-formatting and eslint as linter. Both tools can automatically fix a lot of issues for you. To invoke them, simply run:

yarn fix

It is highly recommended to use VSCode and install the suggested extensions. They will configure your IDE to match the coding style, invoke auto formatters every time you save and run tests in the background for you. No need to run the watchers manually.

Deployment

If you would like to run your own instance of this app, see the docs for deployment.

This app requires these Permissions for the GitHub App:

  • Repository contents: Read-only
  • Issues: Read & write
  • Pull requests: Read & write

Also, the following Events need to be subscribed:

  • Issues: Issue opened or edited
  • Pull request: Pull request opened or edited
  • Issue comment: Issue comment created, edited, or deleted

probot-censor's People

Contributors

jan-auer avatar kant avatar markstory avatar snyk-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.