fluidattacks-core 4.3.3__tar.gz → 5.0.1__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.
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/PKG-INFO +10 -9
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/git/warp.py +1 -1
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/semver/match_versions.py +2 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core.egg-info/PKG-INFO +10 -9
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core.egg-info/SOURCES.txt +0 -2
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core.egg-info/requires.txt +10 -9
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/pyproject.toml +9 -11
- fluidattacks_core-4.3.3/fluidattacks_core/bugsnag/client.py +0 -43
- fluidattacks_core-4.3.3/fluidattacks_core/serializers/__init__.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/README.md +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/__init__.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/aio/__init__.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/aio/processes.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/aio/runners.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/aio/tasks.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/aio/threads.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/authz/__init__.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/authz/py.typed +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/authz/types.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/cpg/__init__.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/cpg/joern.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/filesystem/__init__.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/filesystem/defaults.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/git/__init__.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/git/classes.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/git/clone.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/git/codecommit_utils.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/git/constants.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/git/delete_files.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/git/download_file.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/git/download_repo.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/git/https_utils.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/git/py.typed +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/git/remote.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/git/ssh_utils.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/git/utils.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/http/__init__.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/http/client.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/http/validations.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/logging/__init__.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/logging/filters.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/logging/formatters.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/logging/handlers.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/logging/presets.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/logging/sources/__init__.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/logging/sources/types.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/logging/sources/utils.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/logging/utils.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/py.typed +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/sarif/__init__.py +0 -0
- {fluidattacks_core-4.3.3/fluidattacks_core/bugsnag → fluidattacks_core-5.0.1/fluidattacks_core/semver}/__init__.py +0 -0
- {fluidattacks_core-4.3.3/fluidattacks_core/semver → fluidattacks_core-5.0.1/fluidattacks_core/serializers}/__init__.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/serializers/snippet.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/serializers/syntax.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core.egg-info/dependency_links.txt +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core.egg-info/top_level.txt +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/setup.cfg +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/test/test_aio_tasks.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/test/test_extract_db.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/test/test_language_detection.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/test/test_logging.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/test/test_make_snippet.py +0 -0
- {fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/test/test_match_versions.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fluidattacks-core
|
|
3
|
-
Version:
|
|
3
|
+
Version: 5.0.1
|
|
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 = "
|
|
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):
|
{fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/semver/match_versions.py
RENAMED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
import re
|
|
3
|
+
from functools import lru_cache
|
|
3
4
|
from itertools import (
|
|
4
5
|
zip_longest,
|
|
5
6
|
)
|
|
@@ -283,6 +284,7 @@ def match_version_ranges(dep_version: str, vulnerable_version: str) -> bool:
|
|
|
283
284
|
return False
|
|
284
285
|
|
|
285
286
|
|
|
287
|
+
@lru_cache(maxsize=100000)
|
|
286
288
|
def match_vulnerable_versions(dep_version: str, advisory_range: str | None) -> bool:
|
|
287
289
|
if advisory_range is None:
|
|
288
290
|
return False
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fluidattacks-core
|
|
3
|
-
Version:
|
|
3
|
+
Version: 5.0.1
|
|
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 = "
|
|
3
|
+
version = "5.0.1"
|
|
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,24 @@ classifiers = [
|
|
|
15
15
|
]
|
|
16
16
|
requires-python = ">=3.11"
|
|
17
17
|
|
|
18
|
-
dependencies
|
|
19
|
-
|
|
20
|
-
|
|
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",
|
|
36
33
|
]
|
|
37
|
-
http = []
|
|
34
|
+
http = ["aiohttp>=3.10.0", "certifi>=2024.8.30", "urllib3>=2.6.1"]
|
|
35
|
+
logging = ["simplejson>=3.20.1", "python-json-logger>=3.3.0"]
|
|
38
36
|
serializers = [
|
|
39
37
|
"more-itertools>=10.0.0",
|
|
40
38
|
"tree-sitter-c-sharp>=0.23.1",
|
|
@@ -59,11 +57,11 @@ semver = []
|
|
|
59
57
|
all = [
|
|
60
58
|
"fluidattacks-core[aio]",
|
|
61
59
|
"fluidattacks-core[authz]",
|
|
62
|
-
"fluidattacks-core[bugsnag]",
|
|
63
60
|
"fluidattacks-core[cpg]",
|
|
64
61
|
"fluidattacks-core[filesystem]",
|
|
65
62
|
"fluidattacks-core[git]",
|
|
66
63
|
"fluidattacks-core[http]",
|
|
64
|
+
"fluidattacks-core[logging]",
|
|
67
65
|
"fluidattacks-core[sarif]",
|
|
68
66
|
"fluidattacks-core[semver]",
|
|
69
67
|
"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]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/filesystem/__init__.py
RENAMED
|
File without changes
|
{fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/filesystem/defaults.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/git/codecommit_utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/logging/sources/__init__.py
RENAMED
|
File without changes
|
{fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/logging/sources/types.py
RENAMED
|
File without changes
|
{fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/logging/sources/utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core/serializers/snippet.py
RENAMED
|
File without changes
|
|
File without changes
|
{fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{fluidattacks_core-4.3.3 → fluidattacks_core-5.0.1}/fluidattacks_core.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|