GithubHelp home page GithubHelp logo

eshujiushiwo / hawkeye Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 0xbug/hawkeye

0.0 2.0 0.0 3.72 MB

GitHub 泄露监控系统(GitHub Sensitive Information Leakage Monitor Spider)

License: GNU General Public License v3.0

Python 27.52% JavaScript 26.22% HTML 1.50% Vue 39.96% CSS 3.80% Shell 0.07% Dockerfile 0.92%

hawkeye's Introduction

Hawkeye

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

简介

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

截图

Hawkeye

最近更新

  • 2018-04-19 v2.0.0
    • 添加Basic 认证, 必须按照新的 config.ini.example 重新进行相关配置
    • 用户体验优化,支持多种过滤方式
    • 爬虫任务状态、结果记录展示
    • 解析受影响资产
    • 添加开关,控制是否抓取
    • 邮件 告警聚合
  • 2018.03.14
    • 由于 spider.py 中一处正则匹配问题,导致近日开始登录失败,请大家 pull 下新代码

特性

  • 周期监测
  • web管理
  • 邮箱告警通知
  • 黑名单添加
  • 爬虫任务设置

依赖

  • 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

需要修改的配置

  • 平台认证配置(BasicAuth)
[Auth]
ENABLE = 1 或者 0 #是否开启认证功能
TYPE = basic #(暂时只支持basic认证)
USERNAME = 帐号
PASSWORD = 密码
  • 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

Docker化部署模式

  • 首先确保您服务器中已经安装docker(我们推荐最新的稳定版本)

  • 构建docker image(为了不入侵服务,暂时没有做成通过环境变量传参修改配置文件的模式,故每个环境需要单独build image)

假定镜像名字为test/testhawkeye:v0.0.1

docker build -t test/testhawkeye:v0.0.1 .
  • 修改配置文件并配置为您希望的模式(如上文)
cp config.ini.example config.ini
  • 运行docker(将容器内5000端口映射至宿主机5000端口)
docker run -dit -p 5000:5000 -v /{$your_path}/config.ini:/app/Hawkeye/config.ini --name hawkeye test/testhawkeye:v0.0.1 
  • 进入容器(如果需要)
docker exec -itd hawkeye sh

说明

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

hawkeye's People

Contributors

0xbug avatar eshujiushiwo avatar medicean avatar

Watchers

 avatar  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.