https://github.com/stanfrbd/bitsight_findings_affect_rating
Export Bitsight findings that affect rating in CSV format.
https://github.com/stanfrbd/bitsight_findings_affect_rating
Last synced: over 1 year ago
JSON representation
Export Bitsight findings that affect rating in CSV format.
- Host: GitHub
- URL: https://github.com/stanfrbd/bitsight_findings_affect_rating
- Owner: stanfrbd
- Created: 2022-11-21T15:56:23.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-29T11:09:46.000Z (over 2 years ago)
- Last Synced: 2025-02-14T04:52:13.889Z (over 1 year ago)
- Language: Python
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# bitsight_findings_affect_rating
For a better understanding, refer to the official Bitsight API documentation: https://help.bitsighttech.com/hc/en-us/articles/360022913734-GET-Finding-Details
# Dependencies
You might want to create a [`venv`](https://docs.python.org/3/library/venv.html) before installing the dependencies.
- `python3`
- `requests`
```
pip install requests
```
# Quick start
## Edit the config file
```
cp config-sample.json config.json
```
Then edit the config with the good values.
| Variable | Explaination |
|----------|--------------|
|`guid`| the GUID of your company|
|`name`| the display name of your company|
|`api_token`| mandatory|
|`proxy_url`| the proxy, if you need one.|
```
{
"companies": [{
"guid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"name": "My company1"
},
{
"guid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"name": "My company2"
},
{
"guid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"name": "My company3"
}
],
"api_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"proxy_url": ""
}
```
## Execute the script
```
PS C:\Users\Me\Test> python bitsight_findings_affect_rating.py
```
or
```
python3 bitsight_findings_affect_rating.py
```
## Output
- A CSV file will be created with `bitsight_findings_affect_rating-` + current date + `-export.csv`.
```
PS C:\Users\Me\Test> python .\bitsight_findings_affect_rating.py
... (output)
Generated CSV: ./bitsight_findings_affect_rating-2022-11-10-15_14_54-export.csv
```
# Errors
If the `config.json` is not properly filled.
```
General error: HTTP error: 401 check your config file and API Token
```