fluidattacks-core 4.3.3__tar.gz → 5.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/PKG-INFO +10 -9
  2. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/git/warp.py +1 -1
  3. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core.egg-info/PKG-INFO +10 -9
  4. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core.egg-info/SOURCES.txt +0 -2
  5. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core.egg-info/requires.txt +10 -9
  6. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/pyproject.toml +16 -11
  7. fluidattacks_core-4.3.3/fluidattacks_core/bugsnag/client.py +0 -43
  8. fluidattacks_core-4.3.3/fluidattacks_core/serializers/__init__.py +0 -0
  9. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/README.md +0 -0
  10. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/__init__.py +0 -0
  11. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/aio/__init__.py +0 -0
  12. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/aio/processes.py +0 -0
  13. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/aio/runners.py +0 -0
  14. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/aio/tasks.py +0 -0
  15. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/aio/threads.py +0 -0
  16. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/authz/__init__.py +0 -0
  17. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/authz/py.typed +0 -0
  18. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/authz/types.py +0 -0
  19. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/cpg/__init__.py +0 -0
  20. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/cpg/joern.py +0 -0
  21. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/filesystem/__init__.py +0 -0
  22. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/filesystem/defaults.py +0 -0
  23. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/git/__init__.py +0 -0
  24. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/git/classes.py +0 -0
  25. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/git/clone.py +0 -0
  26. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/git/codecommit_utils.py +0 -0
  27. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/git/constants.py +0 -0
  28. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/git/delete_files.py +0 -0
  29. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/git/download_file.py +0 -0
  30. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/git/download_repo.py +0 -0
  31. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/git/https_utils.py +0 -0
  32. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/git/py.typed +0 -0
  33. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/git/remote.py +0 -0
  34. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/git/ssh_utils.py +0 -0
  35. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/git/utils.py +0 -0
  36. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/http/__init__.py +0 -0
  37. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/http/client.py +0 -0
  38. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/http/validations.py +0 -0
  39. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/logging/__init__.py +0 -0
  40. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/logging/filters.py +0 -0
  41. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/logging/formatters.py +0 -0
  42. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/logging/handlers.py +0 -0
  43. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/logging/presets.py +0 -0
  44. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/logging/sources/__init__.py +0 -0
  45. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/logging/sources/types.py +0 -0
  46. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/logging/sources/utils.py +0 -0
  47. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/logging/utils.py +0 -0
  48. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/py.typed +0 -0
  49. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/sarif/__init__.py +0 -0
  50. {fluidattacks_core-4.3.3/fluidattacks_core/bugsnag → fluidattacks_core-5.0.0/fluidattacks_core/semver}/__init__.py +0 -0
  51. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/semver/match_versions.py +0 -0
  52. {fluidattacks_core-4.3.3/fluidattacks_core/semver → fluidattacks_core-5.0.0/fluidattacks_core/serializers}/__init__.py +0 -0
  53. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/serializers/snippet.py +0 -0
  54. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core/serializers/syntax.py +0 -0
  55. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core.egg-info/dependency_links.txt +0 -0
  56. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/fluidattacks_core.egg-info/top_level.txt +0 -0
  57. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/setup.cfg +0 -0
  58. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/test/test_aio_tasks.py +0 -0
  59. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/test/test_extract_db.py +0 -0
  60. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/test/test_language_detection.py +0 -0
  61. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/test/test_logging.py +0 -0
  62. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/test/test_make_snippet.py +0 -0
  63. {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.0}/test/test_match_versions.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fluidattacks-core
3
- Version: 4.3.3
3
+ Version: 5.0.0
4
4
  Summary: Fluid Attacks Core Library
5
5
  Author-email: Development <development@fluidattacks.com>
6
6
  License: MPL-2.0
@@ -12,23 +12,24 @@ Classifier: Programming Language :: Python :: 3.11
12
12
  Classifier: Topic :: Software Development :: Libraries
13
13
  Requires-Python: >=3.11
14
14
  Description-Content-Type: text/markdown
15
- Requires-Dist: aiohttp>=3.10.0
16
- Requires-Dist: certifi>=2024.8.30
17
- Requires-Dist: python-json-logger>=3.3.0
18
- Requires-Dist: simplejson>=3.20.1
19
- Requires-Dist: urllib3>=2.6.1
20
15
  Provides-Extra: aio
21
16
  Requires-Dist: uvloop>=0.21.0; extra == "aio"
22
17
  Provides-Extra: authz
23
- Provides-Extra: bugsnag
24
- Requires-Dist: bugsnag>=4.7.1; extra == "bugsnag"
25
18
  Provides-Extra: git
19
+ Requires-Dist: aiohttp>=3.10.0; extra == "git"
26
20
  Requires-Dist: aiofiles>=23.2.1; extra == "git"
27
21
  Requires-Dist: boto3>=1.34; extra == "git"
28
22
  Requires-Dist: botocore>=1.40.18; extra == "git"
29
23
  Requires-Dist: GitPython>=3.1.41; extra == "git"
30
24
  Requires-Dist: pathspec>=0.12.1; extra == "git"
25
+ Requires-Dist: urllib3>=2.6.1; extra == "git"
31
26
  Provides-Extra: http
27
+ Requires-Dist: aiohttp>=3.10.0; extra == "http"
28
+ Requires-Dist: certifi>=2024.8.30; extra == "http"
29
+ Requires-Dist: urllib3>=2.6.1; extra == "http"
30
+ Provides-Extra: logging
31
+ Requires-Dist: simplejson>=3.20.1; extra == "logging"
32
+ Requires-Dist: python-json-logger>=3.3.0; extra == "logging"
32
33
  Provides-Extra: serializers
33
34
  Requires-Dist: more-itertools>=10.0.0; extra == "serializers"
34
35
  Requires-Dist: tree-sitter-c-sharp>=0.23.1; extra == "serializers"
@@ -55,11 +56,11 @@ Provides-Extra: semver
55
56
  Provides-Extra: all
56
57
  Requires-Dist: fluidattacks-core[aio]; extra == "all"
57
58
  Requires-Dist: fluidattacks-core[authz]; extra == "all"
58
- Requires-Dist: fluidattacks-core[bugsnag]; extra == "all"
59
59
  Requires-Dist: fluidattacks-core[cpg]; extra == "all"
60
60
  Requires-Dist: fluidattacks-core[filesystem]; extra == "all"
61
61
  Requires-Dist: fluidattacks-core[git]; extra == "all"
62
62
  Requires-Dist: fluidattacks-core[http]; extra == "all"
63
+ Requires-Dist: fluidattacks-core[logging]; extra == "all"
63
64
  Requires-Dist: fluidattacks-core[sarif]; extra == "all"
64
65
  Requires-Dist: fluidattacks-core[semver]; extra == "all"
65
66
  Requires-Dist: fluidattacks-core[serializers]; extra == "all"
@@ -8,7 +8,7 @@ import aiohttp
8
8
  LOGGER = logging.getLogger(__name__)
9
9
 
10
10
  CONFIG_DELAY: int = 5 # For WARP to apply network configurations, in seconds
11
- DOMAIN_TO_TEST_DNS: str = "notify.bugsnag.com" # Using a domain that used to fail
11
+ DOMAIN_TO_TEST_DNS: str = "api.ipify.org" # Using a domain that used to fail
12
12
 
13
13
 
14
14
  class WarpError(Exception):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fluidattacks-core
3
- Version: 4.3.3
3
+ Version: 5.0.0
4
4
  Summary: Fluid Attacks Core Library
5
5
  Author-email: Development <development@fluidattacks.com>
6
6
  License: MPL-2.0
@@ -12,23 +12,24 @@ Classifier: Programming Language :: Python :: 3.11
12
12
  Classifier: Topic :: Software Development :: Libraries
13
13
  Requires-Python: >=3.11
14
14
  Description-Content-Type: text/markdown
15
- Requires-Dist: aiohttp>=3.10.0
16
- Requires-Dist: certifi>=2024.8.30
17
- Requires-Dist: python-json-logger>=3.3.0
18
- Requires-Dist: simplejson>=3.20.1
19
- Requires-Dist: urllib3>=2.6.1
20
15
  Provides-Extra: aio
21
16
  Requires-Dist: uvloop>=0.21.0; extra == "aio"
22
17
  Provides-Extra: authz
23
- Provides-Extra: bugsnag
24
- Requires-Dist: bugsnag>=4.7.1; extra == "bugsnag"
25
18
  Provides-Extra: git
19
+ Requires-Dist: aiohttp>=3.10.0; extra == "git"
26
20
  Requires-Dist: aiofiles>=23.2.1; extra == "git"
27
21
  Requires-Dist: boto3>=1.34; extra == "git"
28
22
  Requires-Dist: botocore>=1.40.18; extra == "git"
29
23
  Requires-Dist: GitPython>=3.1.41; extra == "git"
30
24
  Requires-Dist: pathspec>=0.12.1; extra == "git"
25
+ Requires-Dist: urllib3>=2.6.1; extra == "git"
31
26
  Provides-Extra: http
27
+ Requires-Dist: aiohttp>=3.10.0; extra == "http"
28
+ Requires-Dist: certifi>=2024.8.30; extra == "http"
29
+ Requires-Dist: urllib3>=2.6.1; extra == "http"
30
+ Provides-Extra: logging
31
+ Requires-Dist: simplejson>=3.20.1; extra == "logging"
32
+ Requires-Dist: python-json-logger>=3.3.0; extra == "logging"
32
33
  Provides-Extra: serializers
33
34
  Requires-Dist: more-itertools>=10.0.0; extra == "serializers"
34
35
  Requires-Dist: tree-sitter-c-sharp>=0.23.1; extra == "serializers"
@@ -55,11 +56,11 @@ Provides-Extra: semver
55
56
  Provides-Extra: all
56
57
  Requires-Dist: fluidattacks-core[aio]; extra == "all"
57
58
  Requires-Dist: fluidattacks-core[authz]; extra == "all"
58
- Requires-Dist: fluidattacks-core[bugsnag]; extra == "all"
59
59
  Requires-Dist: fluidattacks-core[cpg]; extra == "all"
60
60
  Requires-Dist: fluidattacks-core[filesystem]; extra == "all"
61
61
  Requires-Dist: fluidattacks-core[git]; extra == "all"
62
62
  Requires-Dist: fluidattacks-core[http]; extra == "all"
63
+ Requires-Dist: fluidattacks-core[logging]; extra == "all"
63
64
  Requires-Dist: fluidattacks-core[sarif]; extra == "all"
64
65
  Requires-Dist: fluidattacks-core[semver]; extra == "all"
65
66
  Requires-Dist: fluidattacks-core[serializers]; extra == "all"
@@ -15,8 +15,6 @@ fluidattacks_core/aio/threads.py
15
15
  fluidattacks_core/authz/__init__.py
16
16
  fluidattacks_core/authz/py.typed
17
17
  fluidattacks_core/authz/types.py
18
- fluidattacks_core/bugsnag/__init__.py
19
- fluidattacks_core/bugsnag/client.py
20
18
  fluidattacks_core/cpg/__init__.py
21
19
  fluidattacks_core/cpg/joern.py
22
20
  fluidattacks_core/filesystem/__init__.py
@@ -1,8 +1,3 @@
1
- aiohttp>=3.10.0
2
- certifi>=2024.8.30
3
- python-json-logger>=3.3.0
4
- simplejson>=3.20.1
5
- urllib3>=2.6.1
6
1
 
7
2
  [aio]
8
3
  uvloop>=0.21.0
@@ -10,20 +5,17 @@ uvloop>=0.21.0
10
5
  [all]
11
6
  fluidattacks-core[aio]
12
7
  fluidattacks-core[authz]
13
- fluidattacks-core[bugsnag]
14
8
  fluidattacks-core[cpg]
15
9
  fluidattacks-core[filesystem]
16
10
  fluidattacks-core[git]
17
11
  fluidattacks-core[http]
12
+ fluidattacks-core[logging]
18
13
  fluidattacks-core[sarif]
19
14
  fluidattacks-core[semver]
20
15
  fluidattacks-core[serializers]
21
16
 
22
17
  [authz]
23
18
 
24
- [bugsnag]
25
- bugsnag>=4.7.1
26
-
27
19
  [cpg]
28
20
  aioboto3>=13.3.0
29
21
  platformdirs>=4.3.8
@@ -31,13 +23,22 @@ platformdirs>=4.3.8
31
23
  [filesystem]
32
24
 
33
25
  [git]
26
+ aiohttp>=3.10.0
34
27
  aiofiles>=23.2.1
35
28
  boto3>=1.34
36
29
  botocore>=1.40.18
37
30
  GitPython>=3.1.41
38
31
  pathspec>=0.12.1
32
+ urllib3>=2.6.1
39
33
 
40
34
  [http]
35
+ aiohttp>=3.10.0
36
+ certifi>=2024.8.30
37
+ urllib3>=2.6.1
38
+
39
+ [logging]
40
+ simplejson>=3.20.1
41
+ python-json-logger>=3.3.0
41
42
 
42
43
  [sarif]
43
44
  pydantic>=2.12.3
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "fluidattacks-core"
3
- version = "4.3.3"
3
+ version = "5.0.0"
4
4
  description = "Fluid Attacks Core Library"
5
5
  authors = [{ name = "Development", email = "development@fluidattacks.com" }]
6
6
  license = { text = "MPL-2.0" }
@@ -15,26 +15,31 @@ classifiers = [
15
15
  ]
16
16
  requires-python = ">=3.11"
17
17
 
18
- dependencies = [
19
- "aiohttp>=3.10.0",
20
- "certifi>=2024.8.30",
21
- "python-json-logger>=3.3.0",
22
- "simplejson>=3.20.1",
23
- "urllib3>=2.6.1",
24
- ]
18
+ # NOTE: Global dependencies are not allowed.
19
+ # Dependencies should be added to the specific extra.
20
+ dependencies = []
25
21
 
26
22
  [project.optional-dependencies]
27
23
  aio = ["uvloop>=0.21.0"]
28
24
  authz = []
29
- bugsnag = ["bugsnag>=4.7.1"]
30
25
  git = [
26
+ "aiohttp>=3.10.0",
31
27
  "aiofiles>=23.2.1",
32
28
  "boto3>=1.34",
33
29
  "botocore>=1.40.18",
34
30
  "GitPython>=3.1.41",
35
31
  "pathspec>=0.12.1",
32
+ "urllib3>=2.6.1"
33
+ ]
34
+ http = [
35
+ "aiohttp>=3.10.0",
36
+ "certifi>=2024.8.30",
37
+ "urllib3>=2.6.1"
38
+ ]
39
+ logging = [
40
+ "simplejson>=3.20.1",
41
+ "python-json-logger>=3.3.0",
36
42
  ]
37
- http = []
38
43
  serializers = [
39
44
  "more-itertools>=10.0.0",
40
45
  "tree-sitter-c-sharp>=0.23.1",
@@ -59,11 +64,11 @@ semver = []
59
64
  all = [
60
65
  "fluidattacks-core[aio]",
61
66
  "fluidattacks-core[authz]",
62
- "fluidattacks-core[bugsnag]",
63
67
  "fluidattacks-core[cpg]",
64
68
  "fluidattacks-core[filesystem]",
65
69
  "fluidattacks-core[git]",
66
70
  "fluidattacks-core[http]",
71
+ "fluidattacks-core[logging]",
67
72
  "fluidattacks-core[sarif]",
68
73
  "fluidattacks-core[semver]",
69
74
  "fluidattacks-core[serializers]",
@@ -1,43 +0,0 @@
1
- import os
2
- import re
3
-
4
- from bugsnag.notification import (
5
- Notification,
6
- )
7
-
8
-
9
- def _remove_nix_hash(path: str) -> str:
10
- pattern = r"(\/nix\/store\/[a-z0-9]{32}-)"
11
- result = re.search(pattern, path)
12
- if not result:
13
- return path
14
- return path[result.end(0) :]
15
-
16
-
17
- def remove_nix_hash(notification: Notification) -> None:
18
- try:
19
- notification.exceptions = [ # type: ignore[attr-defined]
20
- {
21
- **exception,
22
- "stacktrace": [
23
- {**trace, "file": _remove_nix_hash(trace["file"])}
24
- for trace in exception["stacktrace"]
25
- ],
26
- }
27
- for exception in notification.exceptions # type: ignore[attr-defined]
28
- ]
29
- except AttributeError:
30
- notification.stacktrace = [
31
- {**trace, "file": _remove_nix_hash(trace["file"])} for trace in notification.stacktrace
32
- ]
33
-
34
-
35
- def add_batch_metadata(notification: Notification) -> None:
36
- batch_job_info = {}
37
- if batch_job_id := os.environ.get("AWS_BATCH_JOB_ID"):
38
- batch_job_info["batch_job_id"] = batch_job_id
39
- if job_queue_name := os.environ.get("AWS_BATCH_JQ_NAME"):
40
- batch_job_info["batch_job_queue"] = job_queue_name
41
-
42
- if batch_job_info:
43
- notification.add_tab("batch_job_info", batch_job_info) # type: ignore[no-untyped-call]