File tree Expand file tree Collapse file tree
api_app/analyzers_manager/file_analyzers Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import json
22import logging
33
4- from api_app .analyzers_manager .exceptions import AnalyzerRunException
5-
6- try :
7- import die
8- except ImportError :
9- die = None
4+ import die
105
116from api_app .analyzers_manager .classes import FileAnalyzer
127from tests .mock_utils import MockUpResponse
@@ -22,20 +17,12 @@ def update(self):
2217 def run (self ):
2318 logger .info (f"Running DIE on { self .filepath } for { self .md5 } " )
2419
25- if die :
26- json_report = die .scan_file (
27- self .filepath ,
28- die .ScanFlags .RESULT_AS_JSON ,
29- str (die .database_path / "db" ),
30- )
31- result = json .loads (json_report )
32- else :
33- message = "DIE package not imported because incompatible in ARM"
34- self .report .errors .append (message )
35- result = {"errors" : message }
36- raise AnalyzerRunException (message )
37-
38- return result
20+ json_report = die .scan_file (
21+ self .filepath ,
22+ die .ScanFlags .RESULT_AS_JSON ,
23+ str (die .database_path / "db" ),
24+ )
25+ return json .loads (json_report )
3926
4027 @staticmethod
4128 def mocked_docker_analyzer_get (* args , ** kwargs ):
Original file line number Diff line number Diff line change @@ -48,7 +48,6 @@ RUN apt-get update \
4848 && pip3 install --no-cache-dir --upgrade pip
4949
5050COPY requirements/project-requirements.txt $PYTHONPATH/project-requirements.txt
51- COPY requirements/amd-only-requirements.txt $PYTHONPATH/amd-only-requirements.txt
5251COPY requirements/certego-requirements.txt $PYTHONPATH/certego-requirements.txt
5352WORKDIR $PYTHONPATH
5453
@@ -70,11 +69,6 @@ RUN touch ${LOG_PATH}/django/api_app.log ${LOG_PATH}/django/api_app_errors.log \
7069 # download github stuff
7170 && ${PYTHONPATH}/api_app/analyzers_manager/repo_downloader.sh
7271
73- # last step cause there is an if that could invalidate the cache
74- RUN if [[ "$TARGETARCH" == "amd64" ]]; \
75- then pip3 install --no-cache-dir --compile -r amd-only-requirements.txt; \
76- else echo "skipping installation of AMD only requirements" ; fi
77-
7872FROM backend-build
7973
8074COPY --from=frontend-build /build /var/www/reactapp
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ dataclasses==0.6
2929# https://github.com/advisories/GHSA-q4qm-xhf9-4p8f
3030# unpatched CVE: noproblem, we just use this for debugging purposes
3131flower==2.0.0
32- uWSGI==2.0.22
32+ uWSGI==2.0.28
3333uwsgitop==0.12
3434whitenoise==6.9.0
3535daphne==4.1.0
@@ -89,6 +89,7 @@ pylnk3==0.4.2
8989androguard==3.4.0a1 # version >=4.x of androguard raises a dependency conflict with quark-engine==25.1.1
9090wad==0.4.6
9191debloat==1.6.4
92+ die-python==0.4.0
9293
9394# httpx required for HTTP/2 support (Mullvad DNS rejects HTTP/1.1 with protocol errors)
9495httpx[http2]==0.28.1
You can’t perform that action at this time.
0 commit comments