devsecops-engine-tools 1.32.3__py3-none-any.whl → 1.32.4__py3-none-any.whl
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.
Potentially problematic release.
This version of devsecops-engine-tools might be problematic. Click here for more details.
- devsecops_engine_tools/engine_core/src/applications/runner_engine_core.py +1 -1
- devsecops_engine_tools/engine_sca/engine_container/src/infrastructure/driven_adapters/prisma_cloud/prisma_cloud_manager_scan.py +20 -14
- devsecops_engine_tools/version.py +1 -1
- {devsecops_engine_tools-1.32.3.dist-info → devsecops_engine_tools-1.32.4.dist-info}/METADATA +1 -1
- {devsecops_engine_tools-1.32.3.dist-info → devsecops_engine_tools-1.32.4.dist-info}/RECORD +8 -8
- {devsecops_engine_tools-1.32.3.dist-info → devsecops_engine_tools-1.32.4.dist-info}/WHEEL +0 -0
- {devsecops_engine_tools-1.32.3.dist-info → devsecops_engine_tools-1.32.4.dist-info}/entry_points.txt +0 -0
- {devsecops_engine_tools-1.32.3.dist-info → devsecops_engine_tools-1.32.4.dist-info}/top_level.txt +0 -0
|
@@ -146,7 +146,7 @@ def get_inputs_from_cli(args):
|
|
|
146
146
|
parser.add_argument(
|
|
147
147
|
"--token_engine_container",
|
|
148
148
|
required=False,
|
|
149
|
-
help="Token to execute engine_container if is necessary",
|
|
149
|
+
help="Token to execute engine_container if is necessary, accesskey:secretkey",
|
|
150
150
|
)
|
|
151
151
|
parser.add_argument(
|
|
152
152
|
"--token_engine_dependencies",
|
|
@@ -21,14 +21,13 @@ class PrismaCloudManagerScan(ToolGateway):
|
|
|
21
21
|
def download_twistcli(
|
|
22
22
|
self,
|
|
23
23
|
file_path,
|
|
24
|
-
|
|
25
|
-
prisma_secret_key,
|
|
24
|
+
prisma_key,
|
|
26
25
|
prisma_console_url,
|
|
27
26
|
prisma_api_version,
|
|
28
27
|
):
|
|
29
28
|
url = f"{prisma_console_url}/api/{prisma_api_version}/util/twistcli"
|
|
30
29
|
credentials = base64.b64encode(
|
|
31
|
-
|
|
30
|
+
prisma_key.encode()
|
|
32
31
|
).decode()
|
|
33
32
|
headers = {"Authorization": f"Basic {credentials}"}
|
|
34
33
|
try:
|
|
@@ -46,7 +45,7 @@ class PrismaCloudManagerScan(ToolGateway):
|
|
|
46
45
|
raise ValueError(f"Error downloading twistcli: {e}")
|
|
47
46
|
|
|
48
47
|
def scan_image(
|
|
49
|
-
self, file_path, image_name, result_file, remoteconfig,
|
|
48
|
+
self, file_path, image_name, result_file, remoteconfig, prisma_key
|
|
50
49
|
):
|
|
51
50
|
command = (
|
|
52
51
|
file_path,
|
|
@@ -55,9 +54,9 @@ class PrismaCloudManagerScan(ToolGateway):
|
|
|
55
54
|
"--address",
|
|
56
55
|
remoteconfig["PRISMA_CLOUD"]["PRISMA_CONSOLE_URL"],
|
|
57
56
|
"--user",
|
|
58
|
-
|
|
57
|
+
self._split_prisma_token(prisma_key)[0],
|
|
59
58
|
"--password",
|
|
60
|
-
|
|
59
|
+
self._split_prisma_token(prisma_key)[1],
|
|
61
60
|
"--output-file",
|
|
62
61
|
result_file,
|
|
63
62
|
"--details",
|
|
@@ -100,11 +99,11 @@ class PrismaCloudManagerScan(ToolGateway):
|
|
|
100
99
|
except subprocess.CalledProcessError as e:
|
|
101
100
|
logger.error(f"Error during write image base of {base_image}: {e.stderr}")
|
|
102
101
|
|
|
103
|
-
def _generate_sbom(self, image_scanned, remoteconfig,
|
|
102
|
+
def _generate_sbom(self, image_scanned, remoteconfig, prisma_key, image_name):
|
|
104
103
|
|
|
105
104
|
url = f"{remoteconfig['PRISMA_CLOUD']['PRISMA_CONSOLE_URL']}/api/{remoteconfig['PRISMA_CLOUD']['PRISMA_API_VERSION']}/sbom/download/cli-images"
|
|
106
105
|
credentials = base64.b64encode(
|
|
107
|
-
|
|
106
|
+
prisma_key.encode()
|
|
108
107
|
).decode()
|
|
109
108
|
headers = {"Authorization": f"Basic {credentials}"}
|
|
110
109
|
try:
|
|
@@ -137,11 +136,19 @@ class PrismaCloudManagerScan(ToolGateway):
|
|
|
137
136
|
except Exception as e:
|
|
138
137
|
logger.error(f"Error generating SBOM: {e}")
|
|
139
138
|
|
|
139
|
+
|
|
140
|
+
def _split_prisma_token(self, prisma_key):
|
|
141
|
+
try:
|
|
142
|
+
access_prisma, token_prisma = prisma_key.split(":")
|
|
143
|
+
return access_prisma, token_prisma
|
|
144
|
+
except ValueError:
|
|
145
|
+
raise ValueError("The string is not properly formatted. Make sure it contains a ':'.")
|
|
146
|
+
|
|
140
147
|
def run_tool_container_sca(
|
|
141
148
|
self, remoteconfig, secret_tool, token_engine_container, image_name, result_file, base_image, exclusions, generate_sbom
|
|
142
149
|
):
|
|
143
|
-
|
|
144
|
-
secret_tool["
|
|
150
|
+
prisma_key = (
|
|
151
|
+
f"{secret_tool['access_prisma']}:{secret_tool['token_prisma']}" if secret_tool else token_engine_container
|
|
145
152
|
)
|
|
146
153
|
file_path = os.path.join(
|
|
147
154
|
os.getcwd(), remoteconfig["PRISMA_CLOUD"]["TWISTCLI_PATH"]
|
|
@@ -151,8 +158,7 @@ class PrismaCloudManagerScan(ToolGateway):
|
|
|
151
158
|
if not os.path.exists(file_path):
|
|
152
159
|
self.download_twistcli(
|
|
153
160
|
file_path,
|
|
154
|
-
|
|
155
|
-
prisma_secret_key,
|
|
161
|
+
prisma_key,
|
|
156
162
|
remoteconfig["PRISMA_CLOUD"]["PRISMA_CONSOLE_URL"],
|
|
157
163
|
remoteconfig["PRISMA_CLOUD"]["PRISMA_API_VERSION"],
|
|
158
164
|
)
|
|
@@ -161,7 +167,7 @@ class PrismaCloudManagerScan(ToolGateway):
|
|
|
161
167
|
image_name,
|
|
162
168
|
result_file,
|
|
163
169
|
remoteconfig,
|
|
164
|
-
|
|
170
|
+
prisma_key
|
|
165
171
|
)
|
|
166
172
|
if base_image:
|
|
167
173
|
self._write_image_base(result_file, base_image, exclusions)
|
|
@@ -169,7 +175,7 @@ class PrismaCloudManagerScan(ToolGateway):
|
|
|
169
175
|
sbom_components = self._generate_sbom(
|
|
170
176
|
image_scanned,
|
|
171
177
|
remoteconfig,
|
|
172
|
-
|
|
178
|
+
prisma_key,
|
|
173
179
|
image_name
|
|
174
180
|
)
|
|
175
181
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
version = '1.32.
|
|
1
|
+
version = '1.32.4'
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
devsecops_engine_tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
devsecops_engine_tools/version.py,sha256=
|
|
2
|
+
devsecops_engine_tools/version.py,sha256=0uZtIbhK55lCaidPU2RJOEwavxsRwzccsr8jQzMdHG8,19
|
|
3
3
|
devsecops_engine_tools/engine_core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
devsecops_engine_tools/engine_core/src/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
devsecops_engine_tools/engine_core/src/applications/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
-
devsecops_engine_tools/engine_core/src/applications/runner_engine_core.py,sha256=
|
|
6
|
+
devsecops_engine_tools/engine_core/src/applications/runner_engine_core.py,sha256=poPtyIEmOWjkE2L0l8l01O50dRG84xkp3V33zXDxU6g,7779
|
|
7
7
|
devsecops_engine_tools/engine_core/src/deployment/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
8
|
devsecops_engine_tools/engine_core/src/deployment/infrastructure/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
9
|
devsecops_engine_tools/engine_core/src/domain/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -186,7 +186,7 @@ devsecops_engine_tools/engine_sca/engine_container/src/infrastructure/driven_ada
|
|
|
186
186
|
devsecops_engine_tools/engine_sca/engine_container/src/infrastructure/driven_adapters/docker/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
187
187
|
devsecops_engine_tools/engine_sca/engine_container/src/infrastructure/driven_adapters/docker/docker_images.py,sha256=kJfJbbsHgwmN1NWJ0lb4HhWNcadaFuSnLzr5xUV7QoM,1857
|
|
188
188
|
devsecops_engine_tools/engine_sca/engine_container/src/infrastructure/driven_adapters/prisma_cloud/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
189
|
-
devsecops_engine_tools/engine_sca/engine_container/src/infrastructure/driven_adapters/prisma_cloud/prisma_cloud_manager_scan.py,sha256=
|
|
189
|
+
devsecops_engine_tools/engine_sca/engine_container/src/infrastructure/driven_adapters/prisma_cloud/prisma_cloud_manager_scan.py,sha256=C4We_sIE-hO2z0udrPDAQMT7o0kRtYRoZFZ8nNHoudA,6688
|
|
190
190
|
devsecops_engine_tools/engine_sca/engine_container/src/infrastructure/driven_adapters/prisma_cloud/prisma_deserialize_output.py,sha256=oK0NKuPODm38qDgQjf6w40lfNG6NFJS43p5k44wDoMA,2562
|
|
191
191
|
devsecops_engine_tools/engine_sca/engine_container/src/infrastructure/driven_adapters/trivy_tool/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
192
192
|
devsecops_engine_tools/engine_sca/engine_container/src/infrastructure/driven_adapters/trivy_tool/trivy_deserialize_output.py,sha256=LGqnO10Zt-0-TxUW6F1S46jVktlIwxWSYATKSVblCWI,2535
|
|
@@ -324,8 +324,8 @@ devsecops_engine_tools/engine_utilities/utils/name_conversion.py,sha256=ADJrRGax
|
|
|
324
324
|
devsecops_engine_tools/engine_utilities/utils/printers.py,sha256=amYAr9YQfYgR6jK9a2l26z3oovFPQ3FAKmhq6BKhEBA,623
|
|
325
325
|
devsecops_engine_tools/engine_utilities/utils/session_manager.py,sha256=Z0fdhB3r-dxU0nGSD9zW_B4r2Qol1rUnUCkhFR0U-HQ,487
|
|
326
326
|
devsecops_engine_tools/engine_utilities/utils/utils.py,sha256=dAklY11OGNDODjZyt9dO68Xiwu9pLJmqLOslqQ7rXa8,6112
|
|
327
|
-
devsecops_engine_tools-1.32.
|
|
328
|
-
devsecops_engine_tools-1.32.
|
|
329
|
-
devsecops_engine_tools-1.32.
|
|
330
|
-
devsecops_engine_tools-1.32.
|
|
331
|
-
devsecops_engine_tools-1.32.
|
|
327
|
+
devsecops_engine_tools-1.32.4.dist-info/METADATA,sha256=RWdJP57TxK9VFY5Q7zcgaHQcTY28RqYnYly6pTzMOuM,11378
|
|
328
|
+
devsecops_engine_tools-1.32.4.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
|
|
329
|
+
devsecops_engine_tools-1.32.4.dist-info/entry_points.txt,sha256=MHCTFFs9bdNKo6YcWCcBW2_8X6yTisgLOlmVx-V8Rxc,276
|
|
330
|
+
devsecops_engine_tools-1.32.4.dist-info/top_level.txt,sha256=ge6y0X_xBAU1aG3EMWFtl9djbVyg5BxuSp2r2Lg6EQU,23
|
|
331
|
+
devsecops_engine_tools-1.32.4.dist-info/RECORD,,
|
|
File without changes
|
{devsecops_engine_tools-1.32.3.dist-info → devsecops_engine_tools-1.32.4.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{devsecops_engine_tools-1.32.3.dist-info → devsecops_engine_tools-1.32.4.dist-info}/top_level.txt
RENAMED
|
File without changes
|