Skip to content

Commit 0ac976e

Browse files
authored
Merge pull request #73 from lostsnow/feature/v1.1.3
bump version to v1.1.3
2 parents 00a5a55 + 11a6fd4 commit 0ac976e

File tree

9 files changed

+109
-75
lines changed

9 files changed

+109
-75
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Changelog
22

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

55
* FEATURES
66
* Use the environment variable `ENGINE_NAME` to customize agent name

CHANGELOG_CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 升级日志
22

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

55
* 功能
66
* 使用环境变量 `ENGINE_NAME` 自定义 Agent 名称

MANIFEST.in

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
include *.py
2-
include *.json
3-
include dongtai_agent_python/*
2+
include dongtai_agent_python/*.py
3+
include dongtai_agent_python/*.json
4+
include dongtai_agent_python/api/*.py
45
include dongtai_agent_python/assess/*.py
56
include dongtai_agent_python/cli/*.py
67
include dongtai_agent_python/common/*.py
7-
include dongtai_agent_python/report/*.py
8+
include dongtai_agent_python/context/*.py
89
include dongtai_agent_python/middlewares/*.py
10+
include dongtai_agent_python/policy/*.py
11+
include dongtai_agent_python/setting/*.py
12+
include dongtai_agent_python/utils/*.py
913
include version.txt

README.ZH_CN.md

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## DongTai-agent-python
22

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

66
[![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/)
77
[![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/)
@@ -39,26 +39,25 @@ DongTai-agent-python
3939
### 快速开发
4040

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

6463
### 探针配置

README.md

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## DongTai-agent-python
22

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

66
[![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/)
77
[![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/)
@@ -35,26 +35,25 @@ Please refer to the [Quick Start](https://doc.dongtai.io/en/02_start/index.html)
3535
## Quick Development
3636

3737
1. Fork the [DongTai-agent-python](https://github.com/HXSecurity/DongTai-agent-python) , clone your fork:
38-
```
39-
git clone https://github.com/<your-username>/DongTai-agent-python
40-
```
38+
```
39+
git clone https://github.com/<your-username>/DongTai-agent-python
40+
```
4141
2. Write code to your needs.
42-
3. Modify the configuration file `dongtai_agent_python/config.json` \
43-
iast.server.token: "3d6bb430bc3e0b20dcc2d00000000000000a" \
44-
iast.server.url: "https://iast-test.huoxian.cn/openapi" \
45-
project.name:"DemoProjectName" \
46-
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
42+
3. Modify the configuration file `dongtai_agent_python/config.json`
43+
* iast.server.token: "3d6bb430bc3e0b20dcc2d00000000000000a"
44+
* iast.server.url: "https://iast-test.huoxian.cn/openapi"
45+
* project.name: "DemoProjectName"
46+
> 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
4747
4. The project is packaged and executed in the root directory of the agent project
48-
```shell
49-
python3 setup.py sdist
50-
```
48+
```shell
49+
python3 setup.py sdist
50+
```
5151
5. Install the agent \
52-
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
53-
54-
```shell
55-
pip3 install ./dongtai-python-agent.tar.gz
56-
```
57-
52+
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
53+
```shell
54+
pip3 install ./dongtai-python-agent.tar.gz
55+
```
56+
5857
## Project access Agent
5958
6059
### Agent Configuration

dongtai_agent_python.egg-info/PKG-INFO

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
Metadata-Version: 1.2
22
Name: dongtai-agent-python
3-
Version: 1.1.1
3+
Version: 1.1.3
44
Summary: DongTai IAST Agent for Python
55
Home-page: https://iast.huoxian.cn
66
Author: songjinghao
77
Author-email: [email protected]
88
License: GPL-3
99
Description: ## DongTai-agent-python
1010

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

1414
[![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/)
1515
[![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/)
@@ -43,21 +43,25 @@ Description: ## DongTai-agent-python
4343
## Quick Development
4444

4545
1. Fork the [DongTai-agent-python](https://github.com/HXSecurity/DongTai-agent-python) , clone your fork:
46-
```
47-
git clone https://github.com/<your-username>/DongTai-agent-python
48-
```
46+
```
47+
git clone https://github.com/<your-username>/DongTai-agent-python
48+
```
4949
2. Write code to your needs.
50-
3. The project is packaged and executed in the root directory of the agent project
51-
```shell
52-
python3 setup.py sdist
53-
```
54-
4. Install the agent \
55-
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
56-
57-
```shell
58-
pip3 install ./dongtai-python-agent.tar.gz
59-
```
60-
50+
3. Modify the configuration file `dongtai_agent_python/config.json`
51+
* iast.server.token: "3d6bb430bc3e0b20dcc2d00000000000000a"
52+
* iast.server.url: "https://iast-test.huoxian.cn/openapi"
53+
* project.name: "DemoProjectName"
54+
> 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
55+
4. The project is packaged and executed in the root directory of the agent project
56+
```shell
57+
python3 setup.py sdist
58+
```
59+
5. Install the agent \
60+
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
61+
```shell
62+
pip3 install ./dongtai-python-agent.tar.gz
63+
```
64+
6165
## Project access Agent
6266

6367
### Agent Configuration
@@ -67,10 +71,16 @@ Description: ## DongTai-agent-python
6771
* Auto Create Project: `AUTO_CREATE_PROJECT=1`
6872
* Project Name: `PROJECT_NAME=Demo`
6973
* Project Version: `PROJECT_VERSION=v1.0`
74+
* Agent Name: `ENGINE_NAME=test-flask`
75+
* Log Path: `LOG_PATH=/tmp/dongtai-agent-python.log`
76+
77+
You can also configure the value in `dongtai_agent_python/config.json`
78+
* `project.name`
79+
* `project.version`
80+
* `engine.name`
81+
* `log.log_path`
7082

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

7585
### Django
7686

dongtai_agent_python.egg-info/SOURCES.txt

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,49 @@ setup.cfg
44
setup.py
55
dongtai_agent_python/__init__.py
66
dongtai_agent_python/config.json
7-
dongtai_agent_python/global_var.py
87
dongtai_agent_python/policy_api.json
98
dongtai_agent_python.egg-info/PKG-INFO
109
dongtai_agent_python.egg-info/SOURCES.txt
1110
dongtai_agent_python.egg-info/dependency_links.txt
1211
dongtai_agent_python.egg-info/entry_points.txt
1312
dongtai_agent_python.egg-info/requires.txt
1413
dongtai_agent_python.egg-info/top_level.txt
15-
dongtai_agent_python/assess/deal_data.py
14+
dongtai_agent_python/api/__init__.py
15+
dongtai_agent_python/api/openapi.py
16+
dongtai_agent_python/assess/__init__.py
17+
dongtai_agent_python/assess/common_hook.py
18+
dongtai_agent_python/assess/ctypes_hook.py
1619
dongtai_agent_python/assess/patch.py
1720
dongtai_agent_python/cli/__init__.py
1821
dongtai_agent_python/cli/run.py
19-
dongtai_agent_python/common/common_hook.py
20-
dongtai_agent_python/common/content_tracert.py
21-
dongtai_agent_python/common/ctypes_hook.py
22-
dongtai_agent_python/common/default_data.py
2322
dongtai_agent_python/common/logger.py
24-
dongtai_agent_python/common/origin.py
25-
dongtai_agent_python/common/utils.py
23+
dongtai_agent_python/context/__init__.py
24+
dongtai_agent_python/context/request.py
25+
dongtai_agent_python/context/request_context.py
26+
dongtai_agent_python/context/tracker.py
27+
dongtai_agent_python/middlewares/__init__.py
2628
dongtai_agent_python/middlewares/base_middleware.py
2729
dongtai_agent_python/middlewares/django_middleware.py
30+
dongtai_agent_python/middlewares/django_wsgi_middleware.py
2831
dongtai_agent_python/middlewares/flask_middleware.py
29-
dongtai_agent_python/report/upload_data.py
32+
dongtai_agent_python/middlewares/flask_wsgi_middleware.py
33+
dongtai_agent_python/middlewares/wsgi_middleware.py
34+
dongtai_agent_python/policy/__init__.py
35+
dongtai_agent_python/policy/deal_data.py
36+
dongtai_agent_python/policy/tracking.py
37+
dongtai_agent_python/setting/__init__.py
38+
dongtai_agent_python/setting/config.py
39+
dongtai_agent_python/setting/const.py
40+
dongtai_agent_python/setting/setting.py
41+
dongtai_agent_python/tests/__init__.py
42+
dongtai_agent_python/tests/setting/__init__.py
43+
dongtai_agent_python/tests/setting/test_setting.py
44+
dongtai_agent_python/tests/utils/__init__.py
45+
dongtai_agent_python/tests/utils/test_scope.py
46+
dongtai_agent_python/tests/utils/test_singleton.py
47+
dongtai_agent_python/utils/__init__.py
48+
dongtai_agent_python/utils/scope.py
49+
dongtai_agent_python/utils/singleton.py
50+
dongtai_agent_python/utils/system_info.py
51+
dongtai_agent_python/utils/utils.py
3052
scripts/dongtai-cli

dongtai_agent_python/config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@
3333
"allhook": {
3434
"enable": true
3535
},
36-
"name": "DongTai 1.1.1",
36+
"name": "DongTai 1.1.3",
3737
"mode": "normal"
3838
},
3939
"project": {
4040
"name": "Python Demo Project",
4141
"version": ""
4242
},
4343
"engine": {
44-
"version": "v1.1.1",
44+
"version": "v1.1.3",
4545
"name": "dongtai-agent-python"
4646
},
4747
"app": {

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = dongtai_agent_python
3-
version = 1.1.1
3+
version = 1.1.3
44
description = DongTai IAST Agent for Python
55
long_description = file: README.md
66
url = https://iast.huoxian.cn

0 commit comments

Comments
 (0)