This project fetches secret scanning alerts for a specified GitHub organization and writes the results to a CSV file.
- Node.js (v14 or higher)
- npm (v6 or higher)
- A Fine-Grained GitHub personal access token with "Secret scanning alerts" repository permissions (read) with access against your target Organization
-
Clone the repository:
git clone https://github.com/your-username/get-org-secret-alerts.git cd get-org-secret-alerts
-
Install dependencies:
npm install
-
Create a
.env
file: Create a.env
file in the root directory of the project and add your GitHub personal access token and organization name:GITHUB_TOKEN=your-github-token GITHUB_ORG=your-github-org
-
Update
.gitignore
: Ensure your.env
file and other unnecessary files are ignored by Git:.env node_modules/ dist/ build/ *.log .DS_Store Thumbs.db *.tmp *.swp output.csv
To run the application, execute the following command:
node getOrgSecretAlerts.js