GitHub Actions [JavaScript]

Integrating Reshift with GitHub Actions for Javacript.
In GitHub, select the project you would like to integrate Reshift with.

1. Create an Action

To create an action click 'actions' and set up the workflow with your language card.

2. Create a Secret

First, create a secret in the GitHub 'settings' tab. Give the secret a name (RESHIFT_TOKEN for this example), and paste your scan token as the value.

3. Configure your Workflow

Add a .yml file to the base directory of your code repository to configure GitHub Actions to run Reshift scans. You're file should look like this.
name: Reshift NPM scan
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install -g @reshiftsecurity/reshift-plugin-npm
- run: reshift-scan -t ${{ secrets.RESHIFT_TOKEN }}

3. Start a Commit

Click 'start commit' to kick off the Reshift Scan.
In GitHub, you will see your scan results in the "Actions" tab. Results will also be updated and reflected on your Reshift Dashboard.
If you have any more questions, please email us at [email protected]!