Skip to content

Commit d6da076

Browse files
committed
2 parents 3440be3 + 5816721 commit d6da076

10 files changed

Lines changed: 215 additions & 100 deletions

File tree

File renamed without changes.

doc/.vuepress/configs/sidebar/en.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ export const en: SidebarConfig = {
152152
'/en/quickStarted/FAQ.md',
153153
'/en/quickStarted/codeDeploy.md',
154154
'/en/quickStarted/dockercomposeDeploy.md',
155+
'/en/quickStarted/enhanceDeploy.md',
155156
],
156157
},
157158
],

doc/.vuepress/configs/sidebar/zh.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ export const zh: SidebarConfig = {
152152
'/zh/quickStarted/FAQ.md',
153153
'/zh/quickStarted/codeDeploy.md',
154154
'/zh/quickStarted/dockercomposeDeploy.md',
155+
'/zh/quickStarted/enhanceDeploy.md',
155156
],
156157
},
157158
],

doc/en/guide/代码检查/工具/eslint.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828
由于 JavaScript 语法、 Vue 语法和 TypeScript 语法之间的区别,三者使用的语法解析器也是不一样的,这里基于其使用的语法解析器的不同,从 Eslint 中拆分出来了 Eslint_vue 和 Eslint_typescript 工具。可以根据需要选择对应工具下的规则进行分析。而配置也会基于类型的不同匹配到对应的工具中。
2929
目前代码分析上 Eslint 类型有:
3030

31-
- JAVASCRIPT
32-
分析 JavaScript 以及基于 JavaScript 写的 React 代码,默认分析文件后缀名为.js,.jsx
33-
- VUE
34-
分析 Vue 框架的代码,默认分析文件后缀名为.vue
35-
- TYPESCRIPT
36-
分析 TypeScript 以及基于 TypeScript 写的 React 代码,默认分析文件后缀名为.ts,tsx
31+
- JAVASCRIPT
32+
分析 JavaScript 以及基于 JavaScript 写的 React 代码,默认分析文件后缀名为.js,.jsx
33+
- VUE
34+
分析 Vue 框架的代码,默认分析文件后缀名为.vue
35+
- TYPESCRIPT
36+
分析 TypeScript 以及基于 TypeScript 写的 React 代码,默认分析文件后缀名为.ts,tsx
3737

3838
### 设置 Globals
3939

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# 增强分析模块部署
2+
TCA 除开集成业界知名的分析工具之外,也有自主研发的独立工具,作为 TCA 的增强分析模块。
3+
4+
TCA 增强分析模块,需要用户额外部署 License 鉴权微服务,并邮件申请 License 。
5+
6+
**注意:License申请完全免费!**
7+
8+
## 概念
9+
- 独立工具:TCA 自主研发的代码分析工具;
10+
- CLS(Common License Server): TCA 独立工具的 License 鉴权微服务。
11+
12+
## 模块功能
13+
- 支持Objective-C/C++代码规范检查;
14+
- 支持分析项目的依赖组件;
15+
- 支持分析依赖组件是否存在漏洞等问题;
16+
- 支持Java/Kotlin API和函数调用链分析;
17+
- 支持代码安全、空指针检查、内存泄漏等规则。
18+
19+
## CLS部署
20+
21+
### 准备
22+
- 一台 CLS 微服务专属机器,CLS 微服务需要跟该机器绑定
23+
24+
### 步骤
25+
1. 在 CLS 目录下执行以下命令,获取 Server ID 和 Client License
26+
```shell
27+
$ ./cls server
28+
2022-04-13 18:35:29.356510559 +0800 CST [INFO] Version: 20220328.1
29+
2022-04-13 18:35:29.44083463 +0800 CST [INFO] The client license is:
30+
xxx
31+
2022-04-13 18:35:29.454552966 +0800 CST [INFO] License Server ID: xxx
32+
```
33+
- Server ID: 机器码,用于跟TCA团队申请License授权
34+
- Client License: 提供给TCA Client, 方便TCA Client进行工具鉴权(重要,建议备份留底)
35+
36+
2. 在 TCA Client 的 config.ini 中配置 CLS 微服务,比如
37+
```ini
38+
[LICENSE_CONFIG]
39+
; [可选]使用独立工具时,需要填写,默认不需要
40+
; License服务器url, base_path, license
41+
URL=http://<IP或者域名>:<port>
42+
BASE_PATH=
43+
LICENSE=<client License>
44+
```
45+
46+
3. 跟 TCA 团队邮件申请 License
47+
48+
- 发送邮箱:
49+
```
50+
v_cocohwang@tencent.com
51+
anjingliu@tencent.com
52+
yalechen@tencent.com
53+
tommyzhang@tencent.com
54+
```
55+
56+
- 格式如下:
57+
58+
TCA独立工具License申请邮件
59+
60+
| | |
61+
| :----: | :----: |
62+
| 申请人名称 | xxx |
63+
| 申请人所在组织名称 | xxx |
64+
| 申请人所在组织类型 | 可选选项:公司/学校/个人 |
65+
| 申请人邮箱 | xxx |
66+
| 申请人手机号码 | xxx |
67+
| 首次登记的机器码 | xxx |
68+
| 体验申请用途 | xxx |
69+
70+
4. 收到 TCA 团队回复邮件之后,在 CLS 目录下的[config.yaml](config.yaml)文件中填写License
71+
注意!请遵从yaml格式,比如:
72+
- 键值对中,冒号 `:` 后面一定要跟一个空白字符,示例 `key: value`.
73+
74+
5. 执行以下命令启动
75+
```shell
76+
./cls server -d
77+
```
78+
79+
6. 启动 TCA 分析任务
80+
81+
### 运维
82+
#### 自动重启
83+
```shell
84+
# 查找CLS进程ID
85+
ps aux|grep cls
86+
# 重启微服务
87+
kill -USR2 <pid>
88+
```
89+
90+
## 使用
91+
92+
在 TCA 对应项目的分析方案里面勾选名称以 `TCA-Armory` 开头的工具的规则。

doc/en/quickStarted/tools.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
| 官方工具 | 第三方工具 |
66
| :--------: | :-------: |
7-
|[0daychecker](https://github.com/Tencent/CodeAnalysis/tree/main/tools/codedog_0Day_checker)| androidlint |
7+
|[TCA-0Day_Checker(测试版)](https://github.com/TCATools/codedog_0Day_checker)| androidlint |
88
|clangwarning| checkstyle |
99
|codecount| clang |
1010
|customfilescan| cobra |
@@ -13,11 +13,11 @@
1313
|javawarning| cpplint |
1414
|regexfilescan| dart_code_metrics |
1515
|regexscan| dartanalyzer |
16-
|[tca_ql_php_beta](https://github.com/Tencent/CodeAnalysis/tree/main/tools/Hades_Beta)| detekt |
17-
|unusedresource| eslint |
18-
|[collie](https://github.com/Tencent/CodeAnalysis/tree/main/tools/collie/)| eslint_typescript |
19-
|[compass](https://github.com/Tencent/CodeAnalysis/tree/main/tools/compass)| eslint_vue |
20-
|| findbugs |
16+
|[TCA-Armory(测试版)](https://github.com/TCATools/TCA-Armory.git)| detekt |
17+
|[TCA-Loong_Beta龙(测试版)](https://github.com/TCATools/loong_beta)| eslint |
18+
|[TCA-Zeus_Beta(测试版)](https://github.com/TCATools/Zeus_Beta)| eslint_typescript |
19+
|[TCA-Hades_Beta(测试版)](https://github.com/TCATools/Hades_Beta)| eslint_vue |
20+
|unusedresource| findbugs |
2121
|| flake8 |
2222
|| [flawfinder](https://github.com/TCATools/flawfinder) |
2323
|| flow |
@@ -45,3 +45,4 @@
4545
|| [sonarqube](https://github.com/GabrielLegend/tca_plugin_sonarqube/blob/main/src/sq.py) |
4646
|| [sonarqube_java](https://github.com/GabrielLegend/tca_plugin_sonarqube/blob/main/src/sq_java.py) |
4747
|| [sonarqube_cs](https://github.com/GabrielLegend/tca_plugin_sonarqube/blob/main/src/sq_cs.py) |
48+
|| [tca_plugin_sqlcheck](https://github.com/TCATools/tca_plugin_sqlcheck) |

doc/old/tools.md

Lines changed: 0 additions & 47 deletions
This file was deleted.
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# 增强分析模块部署
2+
TCA 除开集成业界知名的分析工具之外,也有自主研发的独立工具,作为 TCA 的增强分析模块。
3+
4+
TCA 增强分析模块,需要用户额外部署 License 鉴权微服务,并邮件申请 License 。
5+
6+
**注意:License申请完全免费!**
7+
8+
## 概念
9+
- 独立工具:TCA 自主研发的代码分析工具;
10+
- CLS(Common License Server): TCA 独立工具的 License 鉴权微服务。
11+
12+
## 模块功能
13+
- 支持Objective-C/C++代码规范检查;
14+
- 支持分析项目的依赖组件;
15+
- 支持分析依赖组件是否存在漏洞等问题;
16+
- 支持Java/Kotlin API和函数调用链分析;
17+
- 支持代码安全、空指针检查、内存泄漏等规则。
18+
19+
## CLS部署
20+
21+
### 准备
22+
- 一台 CLS 微服务专属机器,CLS 微服务需要跟该机器绑定
23+
24+
### 步骤
25+
1. 在 CLS 目录下执行以下命令,获取 Server ID 和 Client License
26+
```shell
27+
$ ./cls server
28+
2022-04-13 18:35:29.356510559 +0800 CST [INFO] Version: 20220328.1
29+
2022-04-13 18:35:29.44083463 +0800 CST [INFO] The client license is:
30+
xxx
31+
2022-04-13 18:35:29.454552966 +0800 CST [INFO] License Server ID: xxx
32+
```
33+
- Server ID: 机器码,用于跟TCA团队申请License授权
34+
- Client License: 提供给TCA Client, 方便TCA Client进行工具鉴权(重要,建议备份留底)
35+
36+
2. 在 TCA Client 的 config.ini 中配置 CLS 微服务,比如
37+
```ini
38+
[LICENSE_CONFIG]
39+
; [可选]使用独立工具时,需要填写,默认不需要
40+
; License服务器url, base_path, license
41+
URL=http://<IP或者域名>:<port>
42+
BASE_PATH=
43+
LICENSE=<client License>
44+
```
45+
46+
3. 跟 TCA 团队邮件申请 License
47+
48+
- 发送邮箱:
49+
```
50+
v_cocohwang@tencent.com
51+
anjingliu@tencent.com
52+
yalechen@tencent.com
53+
tommyzhang@tencent.com
54+
```
55+
56+
- 格式如下:
57+
58+
TCA独立工具License申请邮件
59+
60+
| | |
61+
| :----: | :----: |
62+
| 申请人名称 | xxx |
63+
| 申请人所在组织名称 | xxx |
64+
| 申请人所在组织类型 | 可选选项:公司/学校/个人 |
65+
| 申请人邮箱 | xxx |
66+
| 申请人手机号码 | xxx |
67+
| 首次登记的机器码 | xxx |
68+
| 体验申请用途 | xxx |
69+
70+
4. 收到 TCA 团队回复邮件之后,在 CLS 目录下的[config.yaml](config.yaml)文件中填写License
71+
注意!请遵从yaml格式,比如:
72+
- 键值对中,冒号 `:` 后面一定要跟一个空白字符,示例 `key: value`.
73+
74+
5. 执行以下命令启动
75+
```shell
76+
./cls server -d
77+
```
78+
79+
6. 启动 TCA 分析任务
80+
81+
### 运维
82+
#### 自动重启
83+
```shell
84+
# 查找CLS进程ID
85+
ps aux|grep cls
86+
# 重启微服务
87+
kill -USR2 <pid>
88+
```
89+
90+
## 使用
91+
92+
在 TCA 对应项目的分析方案里面勾选名称以 `TCA-Armory` 开头的工具的规则。

doc/zh/quickStarted/tools.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
| 官方工具 | 第三方工具 |
66
| :--------: | :-------: |
7-
|[0daychecker](https://github.com/Tencent/CodeAnalysis/tree/main/tools/codedog_0Day_checker)| androidlint |
7+
|[TCA-0Day_Checker(测试版)](https://github.com/TCATools/codedog_0Day_checker)| androidlint |
88
|clangwarning| checkstyle |
99
|codecount| clang |
1010
|customfilescan| cobra |
@@ -13,11 +13,11 @@
1313
|javawarning| cpplint |
1414
|regexfilescan| dart_code_metrics |
1515
|regexscan| dartanalyzer |
16-
|[tca_ql_php_beta](https://github.com/Tencent/CodeAnalysis/tree/main/tools/Hades_Beta)| detekt |
17-
|unusedresource| eslint |
18-
|[collie](https://github.com/Tencent/CodeAnalysis/tree/main/tools/collie/)| eslint_typescript |
19-
|[compass](https://github.com/Tencent/CodeAnalysis/tree/main/tools/compass)| eslint_vue |
20-
|| findbugs |
16+
|[TCA-Armory(测试版)](https://github.com/TCATools/TCA-Armory.git)| detekt |
17+
|[TCA-Loong_Beta龙(测试版)](https://github.com/TCATools/loong_beta)| eslint |
18+
|[TCA-Zeus_Beta(测试版)](https://github.com/TCATools/Zeus_Beta)| eslint_typescript |
19+
|[TCA-Hades_Beta(测试版)](https://github.com/TCATools/Hades_Beta)| eslint_vue |
20+
|unusedresource| findbugs |
2121
|| flake8 |
2222
|| [flawfinder](https://github.com/TCATools/flawfinder) |
2323
|| flow |
@@ -45,3 +45,4 @@
4545
|| [sonarqube](https://github.com/GabrielLegend/tca_plugin_sonarqube/blob/main/src/sq.py) |
4646
|| [sonarqube_java](https://github.com/GabrielLegend/tca_plugin_sonarqube/blob/main/src/sq_java.py) |
4747
|| [sonarqube_cs](https://github.com/GabrielLegend/tca_plugin_sonarqube/blob/main/src/sq_cs.py) |
48+
|| [tca_plugin_sqlcheck](https://github.com/TCATools/tca_plugin_sqlcheck) |

tools/README.md

Lines changed: 9 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,17 @@
33
## **注意**
44
以下部分独立工具需要申请授权,具体操作可以参考[CLS使用文档](../server/cls/README.md).
55

6-
## [TCA-Collie(测试版)](https://github.com/TCATools/collie)
7-
一款多语言非编译型静态代码分析工具,支持C/C++/ObjectiveC/C#/CSS/Dart/Java/JavaScript/TypeScript/Kotlin/Lua/PHP/Python/Go/Ruby/Scala/Swift等17门语言,需要申请License。
8-
9-
## [TCA-Compass罗盘(测试版)](https://github.com/TCATools/compass)
10-
一款依赖组件分析工具,支持:
11-
- 分析项目的依赖组件;
12-
- 分析依赖组件是否存在漏洞等问题。
13-
14-
需要申请License。
15-
16-
## TCA-Loong龙(测试版)
17-
Java/Kotlin API和函数调用链分析工具,需要申请License。
6+
## [TCA-Armory(测试版)](https://github.com/TCATools/TCA-Armory)
7+
一款多功能的多语言静态代码分析工具,需申请License。
8+
## 功能
9+
- 支持Objective-C/C++代码规范检查;
10+
- 支持分析项目的依赖组件;
11+
- 支持分析依赖组件是否存在漏洞等问题;
12+
- 支持Java/Kotlin API和函数调用链分析;
13+
- 支持代码安全、空指针检查、内存泄漏等规则。
1814

1915
### 如何在TCA上使用
20-
在TCA上勾选以下工具规则:
21-
- [JAAF](../server/projects/main/apps/scan_conf/management/commands/open_source/jaaf.json#L4)
22-
- [JAFC](../server/projects/main/apps/scan_conf/management/commands/open_source/jafc.json#L4)
23-
- [JAFF](../server/projects/main/apps/scan_conf/management/commands/open_source/jaff.json#L4)
24-
25-
### 底层命令行工具
26-
涉及到的底层命令行工具有:
27-
- [TCA-Loong龙(测试版)](https://github.com/TCATools/loong)
16+
在TCA上勾选名称以 `TCA-Armory` 开头的工具的规则。
2817

2918
## TCA-Loong_Beta龙(测试版)
3019
Java/Kotlin API和函数调用链分析工具,无需申请License。
@@ -38,21 +27,6 @@ Java/Kotlin API和函数调用链分析工具,无需申请License。
3827
涉及到的底层命令行工具有:
3928
- [TCA-Loong_Beta龙(测试版)](https://github.com/TCATools/loong_beta)
4029

41-
## TCA-QL(测试版)
42-
一款静态代码分析的解析端,开源测试版仅开放在linux上运行,需要申请License。
43-
44-
### 如何在TCA上使用
45-
在TCA上勾选以下工具规则:
46-
- [TCA_QL_CPP](../server/projects/main/apps/scan_conf/management/commands/open_source/tca_ql_cpp.json#L4)
47-
- [TCA_QL_Go](../server/projects/main/apps/scan_conf/management/commands/open_source/tca_ql_go.json#L4)
48-
- [TCA_QL_PHP](../server/projects/main/apps/scan_conf/management/commands/open_source/tca_ql_php.json#L4)
49-
- [TCA_QL_Python](../server/projects/main/apps/scan_conf/management/commands/open_source/tca_ql_python.json#L4)
50-
51-
### 底层命令行工具
52-
涉及到的底层命令行工具有:
53-
- [TCA-Zeus(测试版)](https://github.com/TCATools/TCA-Zeus-linux)
54-
- [TCA-Hades(测试版)](https://github.com/TCATools/TCA-Hades-linux)
55-
5630
## TCA-QL_Beta(测试版)
5731
一款静态代码分析的解析端,开源测试版仅支持PHP语言,开源测试版仅开放在linux上运行,无需申请License。
5832

0 commit comments

Comments
 (0)