https://github.com/leboncoin/patrowl-slack-reporter
This tool gets the last assets found on PatrOwl, scans them and reports them on Slack
https://github.com/leboncoin/patrowl-slack-reporter
blue-team patrowl
Last synced: 8 months ago
JSON representation
This tool gets the last assets found on PatrOwl, scans them and reports them on Slack
- Host: GitHub
- URL: https://github.com/leboncoin/patrowl-slack-reporter
- Owner: leboncoin
- License: apache-2.0
- Created: 2019-10-09T15:38:31.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2025-01-19T00:18:29.000Z (11 months ago)
- Last Synced: 2025-03-29T04:02:03.571Z (8 months ago)
- Topics: blue-team, patrowl
- Language: Python
- Homepage:
- Size: 75.2 KB
- Stars: 4
- Watchers: 8
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Patrowl Slack Reporter
## Prerequisites
### On-premise
```
pip3 install -r requirements.txt
cp settings.py.sample settings.py
# Edit settings.py
```
### AWS Lambda
```
mkdir build
cd build
rm ../patrowl_slack_reporter.zip
# Build third-party libraries
pip3 install -r ../requirements.txt --target ./package
cp ../patrowl_slack_alert.py.lambda patrowl_slack_alert.py
# Build archive with all dependencies
zip -r9 ../patrowl_slack_reporter.zip .
```
Terraform example :
```
resource "aws_lambda_function" "patrowl_slack_alert" {
filename = "patrowl_slack_reporter.zip"
function_name = "patrowl_slack_alert"
role = "${aws_iam_role.iam_for_lambda.arn}"
handler = "patrowl_slack_alert.handler"
source_code_hash = "${filebase64sha256("patrowl_slack_reporter.zip")}"
runtime = "python3.7"
timeout = 840
environment {
variables = {
PATROWL_APITOKEN = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
PATROWL_PRIVATE_ENDPOINT = "http://192.168.0.1"
PATROWL_PUBLIC_ENDPOINT = "https://my.patrowl.domain.net"
PSA_LIST_GROUP_ID = "29,46,47,51,55,56"
PSA_SLACK_ICON_EMOJI = ":sweat_smile:"
PSA_SLACK_USERNAME = "PatrOwl Slack Reporter"
SLACK_CHANNEL = "#my-favorite-chan"
SLACK_WEBHOOK = "https://hooks.slack.com/services/XXXXX/YYYYY/zzzzzzzzzzzzzzzz"
}
}
}
```
## Usage
### On-premise
```
python3 patrowl_slack_alert.py
python3 patrowl_asset_lifecycle.py
python3 patrowl_asset_tagger.py
```
# License
Licensed under the [Apache License](https://github.com/leboncoin/patrowl-slack-reporter/blob/master/LICENSE), Version 2.0 (the "License").
# Copyright
Copyright 2020 Leboncoin