Giter VIP home page Giter VIP logo

security-badger's Introduction

Security Badger

GitHub Action Installation

Note, in order for this to work, be sure to have a token available with required permissions to leverage the GitHub GraphQL API: Authenticating with GraphQL

Example Usage

name: Security Badger

on:
  schedule:
    # Every weekday every 2 hours during working hours, send notification
    - cron: '0 8-17/2 * * 1-5'

jobs:
  pr-reviews-reminder:
    runs-on: ubuntu-latest
    steps:
      uses: SparkPost/security-badger@main
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_API_TOKEN }}
        GITHUB_REPOSITORY: ${{ github.repository }}
        SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
      with:
        slackChannel: '#general'

Local Development

  1. Install dependencies via npm install
  2. Create a local .env file (which is ignored by git). Fill in values relevant to the target repo and Slack channel being tested:
GITHUB_REPOSITORY='<github/repo>'
GITHUB_TOKEN='<github-personal-access-token>'
SLACK_WEBHOOK_URL='<slack-app-webhook-url>'
SLACK_CHANNEL='<#slack-channel>'
  1. Run npm start

Compiling

After installing dependencies, Security Badger can be compiled via npm run build. This helps Security Badger run more quickly, avoiding a dependency installation step where it's integrated.

ES Modules

Though Node now supports ES Modules, custom GitHub actions do not yet support them as the runner is restricted to using Node version 12.

See relevant GitHub support thread.

security-badger's People

Contributors

bkemper avatar dependabot[bot] avatar nicklemmon avatar

Watchers

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

Forkers

pombredanne

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.