Giter Club home page Giter Club logo

hawkeye's Introduction

Hawkeye

GitHub issues GitHub forks GitHub stars Python 3.x GitHub license

简介

监控github代码库,及时发现员工托管公司代码到GitHub行为并预警,降低代码泄露风险。

截图

特性

  • 邮箱告警通知
  • 黑名单添加
  • 爬虫任务设置

依赖

  • Python 3.x
  • Flask
  • MongoDB

支持平台

  • Linux, macOS

安装

克隆项目到本地

git clone https://github.com/0xbug/Hawkeye.git --depth 1

Hawkeye 支持 Python 3.x on Linux and macOS。(2.x兼容性 需自行修改测试)

安装依赖 (修改/usr/local/bin/python3 为你系统的Python 3 路径)

cd Hawkeye
pip install virtualenv
virtualenv --python=/usr/local/bin/python3 venv
source venv/bin/activate
pip install -r deploy/requirements.txt

设置

cp config.ini.example config.ini
vim config.ini

需要修改的配置

  • github 帐户配置
[GitHub]
USERNAME = 帐号
PASSWORD = 密码
  • MongoDB 认证配置(可选)

先创建用户

mongo
>db.createUser({user:'root',pwd:'password',roles:[{role:'dbOwner',db:'Hawkeye'}]})

然后修改配置文件

[MongoDB]
HOST = localhost
PORT = 27017
ACCOUNT = 帐号
PASSWORD = 密码
  • 告警配置(ENABLE:是否开启告警功能)
[Notice]
ENABLE = 1
MAIL_SERVER = 邮件服务器
MAIL_PORT = smtp端口
FROM = 发件人
PASSWORD = 密码

运行

python Hawkeye.py

然后访问 http://0.0.0.0:5000/ 进行关键词、告警、黑名单、定时任务配置(初次运行需要点击确认按钮新建cron任务)。

部署

建议使用 supervisor 设置成开机自启,并监控进程,配置文件 deploy/Hawkeye.conf.example

说明

如果对您有帮助,您可以点右上角 "Star" 支持一下 谢谢! 或者您可以 "follow" 一下

hawkeye's People

Contributors

0xbug avatar medicean avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.