Skip to content

Commit bb1c57f

Browse files
authored
fixes: docs, integration's compose files, start.py (#327)
* fix dockerhub build error by changing filenames and paths * docs: fixes and adjusts
1 parent f3e99ff commit bb1c57f

File tree

14 files changed

+38
-40
lines changed

14 files changed

+38
-40
lines changed

docs/source/Advanced-Usage.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,12 @@ table, th, td {
7373

7474

7575
To enable all the optional analyzers you can add the option `--all_analyzers` when starting the project. Example:
76-
```
76+
```bash
7777
python3 start.py prod --all_analyzers up
7878
```
7979

8080
Otherwise you can enable just one of the cited integration by using the related option. Example:
81-
```
81+
```bash
8282
python3 start.py prod --qiling up
8383
```
8484

@@ -136,19 +136,18 @@ List of some of the analyzers with optional configuration:
136136
* Every Chrome-Extension has a unique alpha=numerc identifier. That's the only Input necessary. Eg: `Norton Safe Search Enhanced`'s identifier is `eoigllimhcllmhedfbmahegmoakcdakd`.
137137

138138

139-
140139
There are two ways to do this:
141140

142-
#### from the GUI
141+
##### from the GUI
143142
You can click on "**Custom analyzer configuration**" button and add the runtime configuration in the form of a dictionary.
144143
Example:
145-
```
144+
```javascript
146145
"VirusTotal_v3_Get_File": {
147146
"force_active_scan_if_old": true
148147
}
149148
```
150149

151-
#### from [Pyintelowl](https://github.com/intelowlproject/pyintelowl)
150+
##### from [Pyintelowl](https://github.com/intelowlproject/pyintelowl)
152151
While using `send_observable_analysis_request` or `send_file_analysis_request` endpoints, you can pass the parameter `runtime_configuration` with the optional values.
153152
Example:
154153
```python
@@ -231,17 +230,17 @@ Refer to the following blog post for an example on how to deploy IntelOwl on Goo
231230
[Deploying Intel-Owl on GKE](https://mostwanted002.cf/post/intel-owl-gke/) by [Mayank Malik](https://twitter.com/_mostwanted002_).
232231

233232
## Multi Queue
234-
IntelOwl provides an additional `docker-compose` file, [multi-queue.override.yaml](https://github.com/intelowlproject/IntelOwl/blob/master/docker/multi-queue.override.yml) file, allowing IntelOwl users to better scale with the performance of their own architecture.
233+
IntelOwl provides an additional [multi-queue.override.yml](https://github.com/intelowlproject/IntelOwl/blob/master/docker/multi-queue.override.yml) compose file allowing IntelOwl users to better scale with the performance of their own architecture.
235234

236235
If you want to leverage it, you should add the option `--multi-queue` when starting the project. Example:
237-
```
236+
```bash
238237
python3 start.py prod --multi-queue up
239238
```
240239

241240
This functionality is not enabled by default because this deployment would start 2 more containers so the resource consumption is higher. We suggest to use this option only when leveraging IntelOwl massively.
242241

243242
#### Queue Customization
244-
It is possible to define new celery workers: each requires the addition of a new container in the docker-compose file, as shown in the `multi-queue.override.yaml`.
243+
It is possible to define new celery workers: each requires the addition of a new container in the docker-compose file, as shown in the `multi-queue.override.yml`.
245244

246245
Moreover IntelOwl requires that the name of the workers are provided in the `docker-compose` file. This is done through the environment variable `CELERY_QUEUES` inside the `uwsgi` container. Each queue must be separated using the character `,`, as shown in the [example](https://github.com/intelowlproject/IntelOwl/blob/master/docker/multi-queue.override.yml#L6).
247246

docs/source/Contribute.md

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Please create a new branch based on the **develop** branch that contains the mos
1313
`git checkout -b myfeature develop`
1414

1515
Then we strongly suggest to configure [pre-commit](https://github.com/pre-commit/pre-commit) to force linters on every commits you perform:
16-
```
16+
```bash
1717
# create virtualenv to host pre-commit installation
1818
python3 -m venv intel_owl_test_env
1919
source intel_owl_test_env/bin/activate
@@ -29,11 +29,11 @@ You may want to look at a few existing examples to start to build a new one, suc
2929
- [peframe.py](https://github.com/intelowlproject/IntelOwl/blob/develop/api_app/script_analyzers/file_analyzers/peframe.py), if you are creating a [docker based analyzer](#integrating-a-docker-based-analyzer)
3030

3131
After having written the new python module, you have to remember to:
32-
* Put the module in the `file_analyzers` or `observable_analyzers` directory based on what it can analyze
33-
* Add a new entry in the [analyzer configuration](https://github.com/intelowlproject/IntelOwl/blob/master/configuration/analyzer_config.json) following alphabetical order:
32+
1. Put the module in the `file_analyzers` or `observable_analyzers` directory based on what it can analyze
33+
2. Add a new entry in the [analyzer configuration](https://github.com/intelowlproject/IntelOwl/blob/master/configuration/analyzer_config.json) following alphabetical order:
3434

3535
Example:
36-
```
36+
```javascript
3737
"Analyzer_Name": {
3838
"type": "file",
3939
"external_service": true,
@@ -64,31 +64,28 @@ After having written the new python module, you have to remember to:
6464
Please see [Analyzers customization section](https://intelowl.readthedocs.io/en/latest/Usage.html#analyzers-customization) to get the explanation of the other available keys.
6565

6666

67-
* Add required unit tests in the [tests](https://github.com/intelowlproject/IntelOwl/blob/master/tests) folder.
68-
69-
Then follow the [Test](./Tests.md) guide to start testing.
67+
3. Add required unit tests in the [tests](https://github.com/intelowlproject/IntelOwl/blob/master/tests) folder. Then follow the [Test](./Tests.md) guide to start testing.
7068

71-
* Add the new analyzer/s in the lists in the docs: [Usage](./Usage.md). Also, if the analyzer provides additional optional configuration, add the available options here: [Advanced-Usage](./Advanced-Usage.md)
69+
4. Add the new analyzer in the lists in the docs: [Usage](./Usage.md). Also, if the analyzer provides additional optional configuration, add the available options here: [Advanced-Usage](./Advanced-Usage.md)
7270

73-
* Ultimately, add the required secrets in the files [env_file_app_template](https://github.com/intelowlproject/IntelOwl/blob/master/env_file_app_template), [env_file_app_ci](https://github.com/certego/IntelOwl/blob/master/env_file_app_travis) and in the docs: [Installation](./Installation.md)
71+
5. Ultimately, add the required secrets in the files `docker/env_file_app_template`, `docker/env_file_app_ci` and in the `docs/Installation.md`.
7472

75-
* In the Pull Request remember to provide some real world examples (screenshots and raw JSON results) of some successful executions of the analyzer to let us understand how it would work.
73+
5. In the Pull Request remember to provide some real world examples (screenshots and raw JSON results) of some successful executions of the analyzer to let us understand how it would work.
7674

7775
### Integrating a docker based analyzer
7876
If the analyzer you wish to integrate doesn't exist as a callable API online or python package, it should be integrated with its own docker image
7977
which can be queried from the main Django API.
8078

8179
* It should follow the same design principle as the [Box-Js integration](https://github.com/intelowlproject/IntelOwl/tree/develop/integrations), unless there's very good reason not to.
8280
* The dockerfile should be placed at `./integrations/<analyzer_name>/Dockerfile`.
83-
* A docker-compose file should be placed under `./integrations` with the name `docker-compose.<analyzer_name>.yml`
84-
* If your docker-image uses any environment variables, add them in the [`env_file_integrations_template`](https://github.com/intelowlproject/IntelOwl/blob/develop/env_file_integrations_template)
85-
* Ultimately, append the name of your docker-compose file in the `COMPOSE_FILE` variables specified in [`.env`](https://github.com/intelowlproject/IntelOwl/blob/develop/.env). The reason for doing this is so that this service remains optional to the end-user.
81+
* Two docker-compose files `compose.yml` for production and `compose-tests.yml` for testing should be placed under `./integrations/<analyzer_name>`.
82+
* If your docker-image uses any environment variables, add them in the `docker/env_file_integrations_template`.
8683
* Rest of the steps remain same as given under "How to add a new analyzer".
8784

8885
## Create a pull request
8986

9087
### Install testing requirements
91-
1. Run `pip install -r test-requirements.txt` to install the requirements to validate your code.
88+
Run `pip install -r test-requirements.txt` to install the requirements to validate your code.
9289

9390
#### Pass linting and tests
9491
1. Run `psf/black` to lint the files automatically and then `flake8` to check:
@@ -140,7 +137,7 @@ Please create pull requests only for the branch **develop**. That code will be p
140137
Also remember to pull the most recent changes available in the **develop** branch before submitting your PR. If your PR has merge conflicts caused by this behavior, it won't be accepted.
141138

142139
### Example: add an analyzer configuration for your own Yara signatures
143-
```
140+
```json
144141
"Yara_Scan_Custom_Signatures": {
145142
"type": "file",
146143
"python_module": "yara.Yara",

docs/source/Installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ There are 3 options to execute the web server:
157157

158158
Before using it, you should configure the configuration file `docker/traefik.override.yml` by changing the email address and the hostname where the application is served. For a detailed explanation follow the official documentation: [Traefix doc](https://docs.traefik.io/user-guides/docker-compose/acme-http/).
159159

160-
After the configuration is done, you can add the option `--traefik` while executing the `start.py` [script](https://intelowl.readthedocs.io/en/stable/Advanced-Usage.html#smart-start).
160+
After the configuration is done, you can add the option `--traefik` while executing the [`start.py`](#run)
161161

162162

163163
### Analyzers configuration (optional)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)