enable-security-alerts-sample
This repository contains sample scripts for Node and Bash which can be used to enable security vulnerability alerts in all of the repositories in a given organization.
This project is a being provided as a sample only which illustrates how to enable vulnerability alerts in all repositories in a given organization.
Node script
Prerequisites
- Install Node
- Clone this repository
- At the commandline, run
npm install - Generate a new personal access token with
repoandread:orgpermissions - Update
config.jsonand include your new personal access token in theaccessTokenvalue.
Calling this script
- At the commandline, run
node index.js myorgnamewheremyorgnameis your organization. This will enable security vulnerability alerts on all private repositories in your organization.
Shell script
Prerequisites
- Ensure that you have
bashshell available on your system. If you're running Windows, additional setup may be required. How to install Bash on Windows 10 - Generate a new personal access token with
repoandread:orgpermissions
Calling this script
- At the commandline, run
./shell_script/enable_vulnerability_alerts.sh myorgname accessTokenwheremyorgnameis your organization, andaccessTokenis the personal access token you generated earlier.
Contributing
If you'd like to contribute to this sample with fixes, or support for other platforms, please follow the contribution guidelines.
License
This project is available under the MIT license.