Skip to content

Commit ba712d7

Browse files
authored
Merge pull request #81 from UncoderIO/Ginger-Headed-patch-3
Update Instructions_on_Adding_New_Renders.md
2 parents b5a73e1 + 59498c4 commit ba712d7

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Instructions_on_Adding_New_Renders.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ You can find the list of supported target platforms in the [platforms](https://g
1616

1717
## How to Add a New Render
1818

19-
All code related to translation has to be in the directory with the corresponding platform name in `translator/app/translator/platforms`.
19+
All code related to translation has to be in the directory with the corresponding platform name in `uncoder-core/app/translator/platforms`.
2020

21-
- `translator/app/translator/platforms/<platform_name>/renders` – a directory that contains platform renders for different content types (such as rules and queries translated from a source language or queries generated based on parsed IOCs).
21+
- `uncoder-core/app/translator/platforms/<platform_name>/renders` – a directory that contains platform renders for different content types (such as rules and queries translated from a source language or queries generated based on parsed IOCs).
2222
- `const.py` – a Python file that contains metainformation about the platform.
2323
- `escape_manager.py` – a Python file that contains classes describing the rules of escaping special characters.
2424
- `mapping.py` – a Python file that contains classes that describe working with mappings.
@@ -29,15 +29,15 @@ To add a new render:
2929
2. Describe the metainformation about the platform in the `const.py` file.
3030
3. Create a class that processes mappings in the `mapping.py` file.
3131
4. Create a class that processes special characters in the `escaping_manager.py` file.
32-
5. Create the `renders` directory in `translator/app/translator/platforms/<platform_name>/`.
32+
5. Create the `renders` directory in `uncoder-core/app/translator/platforms/<platform_name>/`.
3333
6. Create a file with the name that matches the name of the platform.
3434
7. The render is composed of two classes:
3535
a. `BaseQueryRender` – the class that describes the general mechanism of rendering a query from the tokens parsed from the input query.
3636
b. `BaseQueryFieldValue` – the class that describes the mechanism of creating the `Field-Value` component of the query.
3737

3838

3939
## Render Classes
40-
These classes should be described in the `translator/app/translator/platforms/<platform_name>/renders/<platform_name>.py` file.
40+
These classes should be described in the `uncoder-core/app/translator/platforms/<platform_name>/renders/<platform_name>.py` file.
4141

4242
### BaseQueryRender Class
4343

@@ -69,7 +69,7 @@ The class has the following methods:
6969
- `__init__` creates a dictionary (map) named `field_value` where a processing method is connected that depends on the operator that was between the field and its value
7070

7171
## Mapping Classes
72-
These classes should be described in the `translator/app/translator/platforms/<platform_name>/mapping.py` file.
72+
These classes should be described in the `uncoder-core/app/translator/platforms/<platform_name>/mapping.py` file.
7373

7474
To describe mappings, you need two classes:
7575
- A class that inherits the `BasePlatformMappings` class – responsible for choosing mapping
@@ -84,20 +84,20 @@ The `__init__` method describes tabels/indexes that can be applied for a log sou
8484
The `is_suitable` method is required. It's used to determine the mapping.
8585

8686
### BasePlatformMappings
87-
This class has one required attribute – the name of the directory from which mappings should be taken (all mappings are in `translator/app/translator/mappings/<platform_name>`). Only the directory name should be indicated.
87+
This class has one required attribute – the name of the directory from which mappings should be taken (all mappings are in `uncoder-core/app/translator/mappings/<platform_name>`). Only the directory name should be indicated.
8888

8989
This class contains two required methods:
9090
- `prepare_log_source_signature` – a method that transforms mappings obtained from the YAML file into objects
9191
- `get_suitable_source_mappings` – a method that contains the conditions for checking for a suitable mapping depending on fields and tables/indexes.
9292

9393
## Escape Manager Class
94-
This class inherits the basic class `EscapeManager`. It contains a required attribute `escape_map`. Depending on the `Value` type (the values searched for in the field) you need to define special characters to be escaped. `Value` types are defined in `translator/app/translator/core/custom_types/values.py`.
94+
This class inherits the basic class `EscapeManager`. It contains a required attribute `escape_map`. Depending on the `Value` type (the values searched for in the field) you need to define special characters to be escaped. `Value` types are defined in `uncoder-core/app/translator/core/custom_types/values.py`.
9595

9696
## const.py
9797
The file where the metainformation about the platform and the rule templates (if any) are stored.
9898

9999
## Metainformation
100-
`siem_type` – unique platform identifier
100+
`platform_id` – unique platform identifier
101101
`group_name` – platform name to be displayed in the platform selection dropdown in the UI
102102
`platform_name` – the name of the content type to be displayed on the tab (as well as in the sub-menu of the platform)
103103
`group_id` – the unique identifier of all content types for a platform

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy