Skip to content

Commit acd08c4

Browse files
IceManGreenpoiana
authored andcommitted
Rename falco_mitre_checker into falco_mitre_attack_checker
Signed-off-by: Louis Cailliot <[email protected]>
1 parent f42e702 commit acd08c4

36 files changed

+864
-839
lines changed

.gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Specific project files
2-
build/mitre_checker/build
3-
build/mitre_checker/reports
2+
build/mitre_attack_checker/build
3+
build/mitre_attack_checker/reports
44
**/falco_rules_mitre_errors.json
55
**/application_rules_errors.json
66

File renamed without changes.

build/mitre_checker/README.md build/mitre_attack_checker/README.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
# Mitre Checker Module
1+
# Mitre ATT&CK Checker Module
22

3-
The Mitre Checker module aims to check the compliance of the Falco rules against the Mitre ATT&CK
4-
Framework. This module provides to Falco experts and Falco users a way to check default and custom
3+
The Mitre ATT&CK Checker module aims to check the compliance of the Falco rules against the Mitre ATT&CK
4+
framework. This module provides to Falco experts and Falco users a way to check default and custom
55
rules for Mitre ATT&CK extra tags.
66
This module uses STIX from the OASIS standards. Structured Threat Information Expression (STIX™) is a
77
language and serialization format used to exchange cyber threat intelligence (CTI) :
88

99
- [STIX CTI documentation](https://oasis-open.github.io/cti-documentation/stix/intro)
1010

11-
Leveraging STIX, Mitre Checker fetches the ATT&CK® STIX Data from MITRE ATT&CK repositories using the
12-
`python-stix2` library implemented by OASIS:
11+
Leveraging STIX, Mitre ATT&CK Checker fetches the ATT&CK® STIX Data from MITRE ATT&CK repositories using
12+
the `python-stix2` library implemented by OASIS:
1313

1414
- [ATT&CK STIX Data repository](https://github.com/mitre-attack/attack-stix-data)
1515
- [Python STIX2 repository](https://github.com/oasis-open/cti-python-stix2)
@@ -45,19 +45,19 @@ Requirements :
4545
Or manualy using `pip` :
4646

4747
```sh
48-
pip install dist/mitre_checker-0.1.0-py3-none-any.whl
48+
pip install dist/falco_mitre_attack_checker-0.1.0-py3-none-any.whl
4949
```
5050

5151
## Usage
5252

5353
```sh
54-
python -m falco_mitre_checker --help
54+
python -m falco_mitre_attack_checker --help
5555
```
5656

5757
Using the stable falco rules :
5858

5959
```sh
60-
python -m falco_mitre_checker -f ../../rules/falco_rules.yaml -o /tmp/
60+
python -m falco_mitre_attack_checker -f ../../rules/falco_rules.yaml -o /tmp/
6161
```
6262

6363
## Development
@@ -79,7 +79,7 @@ With coverage :
7979

8080
```sh
8181
poetry update
82-
poetry run python -m pytest falco_mitre_checker/tests --cov=falco_mitre_checker
82+
poetry run python -m pytest --cov=falco_mitre_attack_checker
8383
```
8484

8585
```
File renamed without changes.

build/mitre_checker/falco_mitre_checker/__main__.py build/mitre_attack_checker/falco_mitre_attack_checker/__main__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from falco_mitre_checker.cli.core import cli
2-
from falco_mitre_checker.utils.logger import MitreCheckerLogger
1+
from falco_mitre_attack_checker.cli.core import cli
2+
from falco_mitre_attack_checker.utils.logger import MitreCheckerLogger
33

44

55
def main():

build/mitre_checker/falco_mitre_checker/api/core.py build/mitre_attack_checker/falco_mitre_attack_checker/api/core.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
from pathlib import Path
33
from typing import List, Dict
44

5-
from falco_mitre_checker.engine.mitre_checker import FalcoMitreChecker
6-
from falco_mitre_checker.models.falco_mitre_errors import FalcoMitreError
7-
from falco_mitre_checker.utils.logger import MitreCheckerLogger
5+
from falco_mitre_attack_checker.engine.mitre_checker import FalcoMitreChecker
6+
from falco_mitre_attack_checker.models.falco_mitre_errors import FalcoMitreError
7+
from falco_mitre_attack_checker.utils.logger import MitreCheckerLogger
88

99
logger = logging.getLogger(MitreCheckerLogger.name)
1010

build/mitre_checker/falco_mitre_checker/cli/core.py build/mitre_attack_checker/falco_mitre_attack_checker/cli/core.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
import typer
66

7-
from falco_mitre_checker.api.core import mitre_checker_engine
8-
from falco_mitre_checker.exceptions.rules_exceptions import FalcoRulesFileContentError
9-
from falco_mitre_checker.utils.logger import MitreCheckerLogger
7+
from falco_mitre_attack_checker.api.core import mitre_checker_engine
8+
from falco_mitre_attack_checker.exceptions.rules_exceptions import FalcoRulesFileContentError
9+
from falco_mitre_attack_checker.utils.logger import MitreCheckerLogger
1010

1111
app = typer.Typer(help=f"Mitre Checker",
1212
no_args_is_help=True,

build/mitre_checker/falco_mitre_checker/engine/mitre_checker.py build/mitre_attack_checker/falco_mitre_attack_checker/engine/mitre_checker.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
from pathlib import Path
33
from typing import List
44

5-
from falco_mitre_checker.models.falco_mitre_errors import \
5+
from falco_mitre_attack_checker.models.falco_mitre_errors import \
66
ErrorReason, FalcoMitreError, FalcoRulesErrors
7-
from falco_mitre_checker.models.falco_mitre_relations import MitreRelations
8-
from falco_mitre_checker.parsers.falco_rules import FalcoRulesParser
9-
from falco_mitre_checker.parsers.mitre_stix import MitreParser
10-
from falco_mitre_checker.utils.file import write_file
11-
from falco_mitre_checker.utils.logger import MitreCheckerLogger
7+
from falco_mitre_attack_checker.models.falco_mitre_relations import MitreRelations
8+
from falco_mitre_attack_checker.parsers.falco_rules import FalcoRulesParser
9+
from falco_mitre_attack_checker.parsers.mitre_stix import MitreParser
10+
from falco_mitre_attack_checker.utils.file import write_file
11+
from falco_mitre_attack_checker.utils.logger import MitreCheckerLogger
1212

1313
logger = logging.getLogger(MitreCheckerLogger.name)
1414

build/mitre_checker/falco_mitre_checker/parsers/falco_rules.py build/mitre_attack_checker/falco_mitre_attack_checker/parsers/falco_rules.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
from pathlib import Path
33
from typing import Dict
44

5-
from falco_mitre_checker.exceptions.rules_exceptions import FalcoRulesFileContentError
6-
from falco_mitre_checker.models.falco_mitre_relations import MitreRelations
7-
from falco_mitre_checker.utils.file import read_yaml
5+
from falco_mitre_attack_checker.exceptions.rules_exceptions import FalcoRulesFileContentError
6+
from falco_mitre_attack_checker.models.falco_mitre_relations import MitreRelations
7+
from falco_mitre_attack_checker.utils.file import read_yaml
88

99

1010
class FalcoRulesParser(object):

build/mitre_checker/falco_mitre_checker/parsers/mitre_stix.py build/mitre_attack_checker/falco_mitre_attack_checker/parsers/mitre_stix.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import requests
55
from stix2 import MemoryStore, Filter, AttackPattern
66

7-
from falco_mitre_checker.utils.logger import MitreCheckerLogger
7+
from falco_mitre_attack_checker.utils.logger import MitreCheckerLogger
88

99
logger = logging.getLogger(MitreCheckerLogger.name)
1010

build/mitre_checker/falco_mitre_checker/tests/engine/test_mitre_checker.py build/mitre_attack_checker/falco_mitre_attack_checker/tests/engine/test_mitre_checker.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from pathlib import Path
22
from typing import List
33

4-
from falco_mitre_checker.engine.mitre_checker import FalcoMitreChecker
5-
from falco_mitre_checker.models.falco_mitre_errors import ErrorReason, FalcoRulesErrors, FalcoMitreError
6-
from falco_mitre_checker.tests.test_common import MITRE_DOMAIN, MITRE_VERSION, FALCO_RULES_FILE
4+
from falco_mitre_attack_checker.engine.mitre_checker import FalcoMitreChecker
5+
from falco_mitre_attack_checker.models.falco_mitre_errors import ErrorReason, FalcoRulesErrors, FalcoMitreError
6+
from falco_mitre_attack_checker.tests.test_common import MITRE_DOMAIN, MITRE_VERSION, FALCO_RULES_FILE
77

88
# global
99
mitre_checker = FalcoMitreChecker(MITRE_DOMAIN, MITRE_VERSION)

build/mitre_checker/falco_mitre_checker/tests/parsers/test_falco_rules.py build/mitre_attack_checker/falco_mitre_attack_checker/tests/parsers/test_falco_rules.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import pytest
22

3-
from falco_mitre_checker.exceptions.rules_exceptions import FalcoRulesFileContentError
4-
from falco_mitre_checker.parsers.falco_rules import FalcoRulesParser
5-
from falco_mitre_checker.tests.test_common import NOT_FALCO_RULES_FILE, FALCO_RULES_FILE
3+
from falco_mitre_attack_checker.exceptions.rules_exceptions import FalcoRulesFileContentError
4+
from falco_mitre_attack_checker.parsers.falco_rules import FalcoRulesParser
5+
from falco_mitre_attack_checker.tests.test_common import NOT_FALCO_RULES_FILE, FALCO_RULES_FILE
66

77
# test falco rules file validation
88
with pytest.raises(FalcoRulesFileContentError):

build/mitre_checker/falco_mitre_checker/tests/parsers/test_mitre_stix.py build/mitre_attack_checker/falco_mitre_attack_checker/tests/parsers/test_mitre_stix.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from falco_mitre_checker.parsers.mitre_stix import MitreParser
2-
from falco_mitre_checker.tests.test_common import RESOURCES_DIR, MITRE_VERSION, MITRE_DOMAIN
1+
from falco_mitre_attack_checker.parsers.mitre_stix import MitreParser
2+
from falco_mitre_attack_checker.tests.test_common import RESOURCES_DIR, MITRE_VERSION, MITRE_DOMAIN
33

44
MITRE_STIX_DATAFILE = f"{RESOURCES_DIR}/mitre_cti_stix_13_1.json"
55

build/mitre_checker/falco_mitre_checker/tests/test_common.py build/mitre_attack_checker/falco_mitre_attack_checker/tests/test_common.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import os
22
from pathlib import Path
33

4-
from falco_mitre_checker.utils.logger import MitreCheckerLogger
4+
from falco_mitre_attack_checker.utils.logger import MitreCheckerLogger
55

66
MitreCheckerLogger()
77

File renamed without changes.

0 commit comments

Comments
 (0)