Skip to content

Commit 4f74c31

Browse files
committed
Merge branch 'reachability-update' into 'master'
изменила путь до папки с графом вызовов, добавила предупреждение, что... See merge request CodeScoring/docs!647
2 parents ea85e36 + 2edfb22 commit 4f74c31

2 files changed

Lines changed: 78 additions & 4 deletions

File tree

docs/agent/reachability.en.md

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,52 @@ To use this feature, you need to set two parameters:
4545
```shell
4646
svace build ./gradlew clean build
4747
```
48+
Example for C#:
49+
```shell
50+
svace build dotnet build
51+
```
4852
3. Analyze results and generate the call graph
4953
```shell
5054
svace analyze --build-call-graph-only --license-server-url "http(s)://<codescoring_host>" --license-server-token "<token from step 1>"
5155
```
52-
4. Upon successful completion of all steps, a file named `.svace-dir/analyze-res/call-graph/<project_name>-graph-order.json` containing the call graph will appear in the project directory.
56+
4. Upon successful completion of all steps, a file named `.svace-dir/analyze-res/call-graph-results/<project_name>-graph-order.json` containing the call graph will appear in the project directory.
57+
58+
!!! warning "Saving a file"
59+
Prior to Svace version 5.0.260311, the call graph file was saved to the folder `.svace-dir/analyze-res/call-graph`
60+
5361
5. Launch the scan using Johnny, for example:
5462
```shell
55-
johnny-linux-amd64 scan dir . --api_url "http(s)://<codescoring_host>" --api_token "<token from step 1>" --cg-path .svace-dir/analyze-res/call-graph/<project_name>-graph-order.json --cg-lang java
63+
johnny-linux-amd64 scan dir . --api_url "http(s)://<codescoring_host>" --api_token "<token from step 1>" --cg-path .svace-dir/analyze-res/call-graph-results/<project_name>-graph-order.json --cg-lang java
5664
```
65+
## Remote analysis
66+
67+
In [Svace 5.0.260311](/on-premise/postgres-upgrade-compose/), it is now possible to use a remote analysis server. This allows you to take
68+
the construction of the call graph beyond the CI/CD pipeline, reduce the load on the assembly servers and optimize the continuous integration process.
69+
70+
### Server configuration steps
71+
72+
1. Specify environment variables
73+
```shell
74+
SVACE_LIC_SERVER_URL=http(s)://<codescoring_host>
75+
SVACE_LIC_SERVER_TOKEN=<токен CodeScoring>
76+
```
77+
2. Initialization
78+
```shell
79+
svace server init
80+
```
81+
3. Start the server
82+
```shell
83+
svace server start
84+
```
85+
4. Submit the project for analysis. After configuring the server, you do not need to specify the ```--license-server-url``` and ```--license-server-token``` license parameters.
86+
```shell
87+
svace remote --host <адрес сервера> analyze --build-call-graph-only
88+
```
89+
90+
If necessary, you can add the parameters: ```--port```, ```--login```, ```--pass```, etc.
91+
92+
For more information about the remote analysis server settings, see [the Svace documentation](https://svace.pages.ispras.ru/svace-website/docs/5.0.260306/user-guide.html#remote-analysis).
93+
5794

5895
## Viewing results
5996

docs/agent/reachability.md

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,53 @@ hide:
4545
```shell
4646
svace build ./gradlew clean build
4747
```
48+
Пример на языке C#:
49+
```shell
50+
svace build dotnet build
51+
```
4852
3. Анализ результатов и построение графа вызовов
4953
```shell
5054
svace analyze --build-call-graph-only --license-server-url "http(s)://<codescoring_host>" --license-server-token "<токен из п.1>"
5155
```
52-
4. В случае успешного выполнения всех шагов в директории проекта появится файл `.svace-dir/analyze-res/call-graph/<project_name>-graph-order.json`, содержащий граф вызовов.
56+
4. В случае успешного выполнения всех шагов в директории проекта появится файл `.svace-dir/analyze-res/call-graph-results/<project_name>-graph-order.json`, содержащий граф вызовов.
57+
58+
!!! warning "Сохранение файла"
59+
До версии Svace 5.0.260311 файл с графом вызовов сохранялся в папку `.svace-dir/analyze-res/call-graph`
60+
5361
5. Запустить сканирования с помощью Johnny, например:
5462
```shell
55-
johnny-linux-amd64 scan dir . --api_url "http(s)://<codescoring_host>" --api_token "<токен из п.1>" --cg-path .svace-dir/analyze-res/call-graph/<project_name>-graph-order.json --cg-lang java
63+
johnny-linux-amd64 scan dir . --api_url "http(s)://<codescoring_host>" --api_token "<токен из п.1>" --cg-path .svace-dir/analyze-res/call-graph-results/<project_name>-graph-order.json --cg-lang java
5664
```
5765

66+
## Удаленный анализ
67+
68+
В версии [Svace 5.0.260311](/on-premise/postgres-upgrade-compose/) появилась возможность использования сервера удалённого анализа. Это позволяет вынести
69+
построение графа вызовов за пределы CI/CD пайплайна, снизить нагрузку на сборочные серверы и оптимизировать процесс непрерывной интеграции.
70+
71+
### Этапы настройки сервера
72+
73+
1. Указать переменные окружения
74+
```shell
75+
SVACE_LIC_SERVER_URL=http(s)://<codescoring_host>
76+
SVACE_LIC_SERVER_TOKEN=<токен CodeScoring>
77+
```
78+
2. Инициализация
79+
```shell
80+
sace server init
81+
```
82+
3. Запустить сервер
83+
```shell
84+
svace server start
85+
```
86+
4. Отправить проект на анализ. После настройки сервера не нужно указывать параметры лицензии ```--license-server-url``` и ```--license-server-token```.
87+
```shell
88+
svace remote --host <адрес сервера> analyze --build-call-graph-only
89+
```
90+
91+
При необходимости можно добавить параметры ```--port```, ```--login```, ```--pass``` и т.д.
92+
93+
Подробнее с настройками сервера удалённого анализа можно ознакомиться в [документации Svace](https://svace.pages.ispras.ru/svace-website/docs/5.0.260306/user-guide.html#remote-analysis).
94+
5895
## Получение результатов
5996

6097
В таблице уязвимостей с найденными достижимыми вызовами будет проставлена отметка в соответствующем столбце:

0 commit comments

Comments
 (0)