Skip to content

Commit

Permalink
Merge pull request #73 from lostsnow/feature/v1.1.3
Browse files Browse the repository at this point in the history
bump version to v1.1.3
  • Loading branch information
lostsnow authored Dec 3, 2021
2 parents 00a5a55 + 11a6fd4 commit 0ac976e
Show file tree
Hide file tree
Showing 9 changed files with 109 additions and 75 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## Unreleased
## [1.1.3](/~https://github.com/HXSecurity/DongTai-agent-python/releases/tag/v1.1.3) - 2021-12-03

* FEATURES
* Use the environment variable `ENGINE_NAME` to customize agent name
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG_CN.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 升级日志

## 尚未发布
## [1.1.3](/~https://github.com/HXSecurity/DongTai-agent-python/releases/tag/v1.1.3) - 2021-12-03

* 功能
* 使用环境变量 `ENGINE_NAME` 自定义 Agent 名称
Expand Down
10 changes: 7 additions & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
include *.py
include *.json
include dongtai_agent_python/*
include dongtai_agent_python/*.py
include dongtai_agent_python/*.json
include dongtai_agent_python/api/*.py
include dongtai_agent_python/assess/*.py
include dongtai_agent_python/cli/*.py
include dongtai_agent_python/common/*.py
include dongtai_agent_python/report/*.py
include dongtai_agent_python/context/*.py
include dongtai_agent_python/middlewares/*.py
include dongtai_agent_python/policy/*.py
include dongtai_agent_python/setting/*.py
include dongtai_agent_python/utils/*.py
include version.txt
37 changes: 18 additions & 19 deletions README.ZH_CN.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## DongTai-agent-python

[![dongtai-project](https://img.shields.io/badge/DongTai-v1.1.1-blue)](/~https://github.com/HXSecurity/DongTai)
[![dongtai--agent--python](https://img.shields.io/badge/DongTai--agent--python-v1.1.1-blue)](/~https://github.com/HXSecurity/DongTai-agent-python)
[![dongtai-project](https://img.shields.io/badge/DongTai-v1.1.3-blue)](/~https://github.com/HXSecurity/DongTai)
[![dongtai--agent--python](https://img.shields.io/badge/DongTai--agent--python-v1.1.3-blue)](/~https://github.com/HXSecurity/DongTai-agent-python)

[![django-project](https://img.shields.io/badge/Supported%20versions%20of%20Django-3.0.x,3.1.x,3.2.x-blue)](https://www.djangoproject.com/)
[![flask-project](https://img.shields.io/badge/Supported%20versions%20of%20Flask-1.0.x,1.1.x,1.2.x-blue)](https://palletsprojects.com/p/flask/)
Expand Down Expand Up @@ -39,26 +39,25 @@ DongTai-agent-python
### 快速开发

1. Fork [DongTai-agent-python](/~https://github.com/HXSecurity/DongTai-agent-python) 项目到自己的 github 仓库并 clone 项目:
```shell
git clone /~https://github.com/<your-username>/DongTai-agent-python
```
```shell
git clone /~https://github.com/<your-username>/DongTai-agent-python
```
2. 根据需求编写代码
3. 修改配置文件`dongtai_agent_python/config.json` \
iast.server.token: "3d6bb430bc3e0b20dcc2d00000000000000a" \
iast.server.url: "https://iast-test.huoxian.cn/openapi" \
project.name:"DemoProjectName" \
url与token从洞态IAST-web页面(eg:https://iast-test.huoxian.cn/deploy) > python-agent部署页面,下载agent的shell命令中获取,分别替换url域名与token
3. 修改配置文件 `dongtai_agent_python/config.json`
* iast.server.token: "3d6bb430bc3e0b20dcc2d00000000000000a"
* iast.server.url: "https://iast-test.huoxian.cn/openapi"
* project.name: "DemoProjectName"
> url 与 token 从洞态 IAST-web 页面(eg: https://iast-test.huoxian.cn/deploy) > python-agent 部署页面,下载 agent 的 shell 命令中获取,分别替换 url 域名与 token
4. 项目打包,在agent项目根目录执行
```shell
python3 setup.py sdist
```
```shell
python3 setup.py sdist
```
5. 安装探针 \
打包后会生成 dist 目录,在 dist 目录下找到安装包,将 dongtai_agent_python.tar.gz 安装包放入 Web 服务器所在机器上,执行 pip 安装

```shell
pip3 install ./dongtai-python-agent.tar.gz
```

打包后会生成 dist 目录,在 dist 目录下找到安装包,将 dongtai_agent_python.tar.gz 安装包放入 Web 服务器所在机器上,执行 pip 安装
```shell
pip3 install ./dongtai-python-agent.tar.gz
```

## 项目接入探针

### 探针配置
Expand Down
37 changes: 18 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## DongTai-agent-python

[![dongtai-project](https://img.shields.io/badge/DongTai-v1.1.1-blue)](/~https://github.com/HXSecurity/DongTai)
[![dongtai--agent--python](https://img.shields.io/badge/DongTai--agent--python-v1.1.1-blue)](/~https://github.com/HXSecurity/DongTai-agent-python)
[![dongtai-project](https://img.shields.io/badge/DongTai-v1.1.3-blue)](/~https://github.com/HXSecurity/DongTai)
[![dongtai--agent--python](https://img.shields.io/badge/DongTai--agent--python-v1.1.3-blue)](/~https://github.com/HXSecurity/DongTai-agent-python)

[![django-project](https://img.shields.io/badge/Supported%20versions%20of%20Django-3.0.x,3.1.x,3.2.x-blue)](https://www.djangoproject.com/)
[![flask-project](https://img.shields.io/badge/Supported%20versions%20of%20Flask-1.0.x,1.1.x,1.2.x-blue)](https://palletsprojects.com/p/flask/)
Expand Down Expand Up @@ -35,26 +35,25 @@ Please refer to the [Quick Start](https://doc.dongtai.io/en/02_start/index.html)
## Quick Development

1. Fork the [DongTai-agent-python](/~https://github.com/HXSecurity/DongTai-agent-python) , clone your fork:
```
git clone /~https://github.com/<your-username>/DongTai-agent-python
```
```
git clone /~https://github.com/<your-username>/DongTai-agent-python
```
2. Write code to your needs.
3. Modify the configuration file `dongtai_agent_python/config.json` \
iast.server.token: "3d6bb430bc3e0b20dcc2d00000000000000a" \
iast.server.url: "https://iast-test.huoxian.cn/openapi" \
project.name:"DemoProjectName" \
URL and token from the hole state IAST-web page (eg:https://iast-test.huoxian.cn/deploy) > python-agent deployment page,Obtained from the shell command of downloading agent,Replace the url domain name and token respectively
3. Modify the configuration file `dongtai_agent_python/config.json`
* iast.server.token: "3d6bb430bc3e0b20dcc2d00000000000000a"
* iast.server.url: "https://iast-test.huoxian.cn/openapi"
* project.name: "DemoProjectName"
> URL and token from the hole state IAST-web page (eg: https://iast-test.huoxian.cn/deploy) > python-agent deployment page,Obtained from the shell command of downloading agent,Replace the url domain name and token respectively
4. The project is packaged and executed in the root directory of the agent project
```shell
python3 setup.py sdist
```
```shell
python3 setup.py sdist
```
5. Install the agent \
After packaging, the dist directory will be generated, and the installation package will be found in the dist directory, Put the dongtai_agent_python.tar.gz installation package on the machine where the Web-server is located,Execute pip installation

```shell
pip3 install ./dongtai-python-agent.tar.gz
```

After packaging, the dist directory will be generated, and the installation package will be found in the dist directory, Put the dongtai_agent_python.tar.gz installation package on the machine where the Web-server is located,Execute pip installation
```shell
pip3 install ./dongtai-python-agent.tar.gz
```
## Project access Agent
### Agent Configuration
Expand Down
50 changes: 30 additions & 20 deletions dongtai_agent_python.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
Metadata-Version: 1.2
Name: dongtai-agent-python
Version: 1.1.1
Version: 1.1.3
Summary: DongTai IAST Agent for Python
Home-page: https://iast.huoxian.cn
Author: songjinghao
Author-email: jinghaosong@huoxian.cn
License: GPL-3
Description: ## DongTai-agent-python

[![dongtai-project](https://img.shields.io/badge/DongTai-v1.1.1-blue)](/~https://github.com/HXSecurity/DongTai)
[![dongtai--agent--python](https://img.shields.io/badge/DongTai--agent--python-v1.1.1-blue)](/~https://github.com/HXSecurity/DongTai-agent-python)
[![dongtai-project](https://img.shields.io/badge/DongTai-v1.1.3-blue)](/~https://github.com/HXSecurity/DongTai)
[![dongtai--agent--python](https://img.shields.io/badge/DongTai--agent--python-v1.1.3-blue)](/~https://github.com/HXSecurity/DongTai-agent-python)

[![django-project](https://img.shields.io/badge/Supported%20versions%20of%20Django-3.0.x,3.1.x,3.2.x-blue)](https://www.djangoproject.com/)
[![flask-project](https://img.shields.io/badge/Supported%20versions%20of%20Flask-1.0.x,1.1.x,1.2.x-blue)](https://palletsprojects.com/p/flask/)
Expand Down Expand Up @@ -43,21 +43,25 @@ Description: ## DongTai-agent-python
## Quick Development

1. Fork the [DongTai-agent-python](/~https://github.com/HXSecurity/DongTai-agent-python) , clone your fork:
```
git clone /~https://github.com/<your-username>/DongTai-agent-python
```
```
git clone /~https://github.com/<your-username>/DongTai-agent-python
```
2. Write code to your needs.
3. The project is packaged and executed in the root directory of the agent project
```shell
python3 setup.py sdist
```
4. Install the agent \
After packaging, the dist directory will be generated, and the installation package will be found in the dist directory, Put the dongtai_agent_python.tar.gz installation package on the machine where the Web-server is located,Execute pip installation

```shell
pip3 install ./dongtai-python-agent.tar.gz
```

3. Modify the configuration file `dongtai_agent_python/config.json`
* iast.server.token: "3d6bb430bc3e0b20dcc2d00000000000000a"
* iast.server.url: "https://iast-test.huoxian.cn/openapi"
* project.name: "DemoProjectName"
> URL and token from the hole state IAST-web page (eg: https://iast-test.huoxian.cn/deploy) > python-agent deployment page,Obtained from the shell command of downloading agent,Replace the url domain name and token respectively
4. The project is packaged and executed in the root directory of the agent project
```shell
python3 setup.py sdist
```
5. Install the agent \
After packaging, the dist directory will be generated, and the installation package will be found in the dist directory, Put the dongtai_agent_python.tar.gz installation package on the machine where the Web-server is located,Execute pip installation
```shell
pip3 install ./dongtai-python-agent.tar.gz
```

## Project access Agent

### Agent Configuration
Expand All @@ -67,10 +71,16 @@ Description: ## DongTai-agent-python
* Auto Create Project: `AUTO_CREATE_PROJECT=1`
* Project Name: `PROJECT_NAME=Demo`
* Project Version: `PROJECT_VERSION=v1.0`
* Agent Name: `ENGINE_NAME=test-flask`
* Log Path: `LOG_PATH=/tmp/dongtai-agent-python.log`

You can also configure the value in `dongtai_agent_python/config.json`
* `project.name`
* `project.version`
* `engine.name`
* `log.log_path`

> Note: \
> You can also configure the value of `project.name` in `project.version` in `dongtai_agent_python/config.json` \
> **The priority of the system environment variable is higher than the configuration file**
> **Note: The priority of the system environment variable is higher than the configuration file**

### Django

Expand Down
40 changes: 31 additions & 9 deletions dongtai_agent_python.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,49 @@ setup.cfg
setup.py
dongtai_agent_python/__init__.py
dongtai_agent_python/config.json
dongtai_agent_python/global_var.py
dongtai_agent_python/policy_api.json
dongtai_agent_python.egg-info/PKG-INFO
dongtai_agent_python.egg-info/SOURCES.txt
dongtai_agent_python.egg-info/dependency_links.txt
dongtai_agent_python.egg-info/entry_points.txt
dongtai_agent_python.egg-info/requires.txt
dongtai_agent_python.egg-info/top_level.txt
dongtai_agent_python/assess/deal_data.py
dongtai_agent_python/api/__init__.py
dongtai_agent_python/api/openapi.py
dongtai_agent_python/assess/__init__.py
dongtai_agent_python/assess/common_hook.py
dongtai_agent_python/assess/ctypes_hook.py
dongtai_agent_python/assess/patch.py
dongtai_agent_python/cli/__init__.py
dongtai_agent_python/cli/run.py
dongtai_agent_python/common/common_hook.py
dongtai_agent_python/common/content_tracert.py
dongtai_agent_python/common/ctypes_hook.py
dongtai_agent_python/common/default_data.py
dongtai_agent_python/common/logger.py
dongtai_agent_python/common/origin.py
dongtai_agent_python/common/utils.py
dongtai_agent_python/context/__init__.py
dongtai_agent_python/context/request.py
dongtai_agent_python/context/request_context.py
dongtai_agent_python/context/tracker.py
dongtai_agent_python/middlewares/__init__.py
dongtai_agent_python/middlewares/base_middleware.py
dongtai_agent_python/middlewares/django_middleware.py
dongtai_agent_python/middlewares/django_wsgi_middleware.py
dongtai_agent_python/middlewares/flask_middleware.py
dongtai_agent_python/report/upload_data.py
dongtai_agent_python/middlewares/flask_wsgi_middleware.py
dongtai_agent_python/middlewares/wsgi_middleware.py
dongtai_agent_python/policy/__init__.py
dongtai_agent_python/policy/deal_data.py
dongtai_agent_python/policy/tracking.py
dongtai_agent_python/setting/__init__.py
dongtai_agent_python/setting/config.py
dongtai_agent_python/setting/const.py
dongtai_agent_python/setting/setting.py
dongtai_agent_python/tests/__init__.py
dongtai_agent_python/tests/setting/__init__.py
dongtai_agent_python/tests/setting/test_setting.py
dongtai_agent_python/tests/utils/__init__.py
dongtai_agent_python/tests/utils/test_scope.py
dongtai_agent_python/tests/utils/test_singleton.py
dongtai_agent_python/utils/__init__.py
dongtai_agent_python/utils/scope.py
dongtai_agent_python/utils/singleton.py
dongtai_agent_python/utils/system_info.py
dongtai_agent_python/utils/utils.py
scripts/dongtai-cli
4 changes: 2 additions & 2 deletions dongtai_agent_python/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@
"allhook": {
"enable": true
},
"name": "DongTai 1.1.1",
"name": "DongTai 1.1.3",
"mode": "normal"
},
"project": {
"name": "Python Demo Project",
"version": ""
},
"engine": {
"version": "v1.1.1",
"version": "v1.1.3",
"name": "dongtai-agent-python"
},
"app": {
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = dongtai_agent_python
version = 1.1.1
version = 1.1.3
description = DongTai IAST Agent for Python
long_description = file: README.md
url = https://iast.huoxian.cn
Expand Down

0 comments on commit 0ac976e

Please sign in to comment.