regscale-cli 6.16.1.0__py3-none-any.whl → 6.16.3.0__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 regscale-cli might be problematic. Click here for more details.
- regscale/__init__.py +1 -1
- regscale/core/app/internal/login.py +1 -1
- regscale/core/app/internal/poam_editor.py +1 -1
- regscale/core/app/utils/api_handler.py +4 -11
- regscale/integrations/commercial/__init__.py +2 -2
- regscale/integrations/commercial/ad.py +1 -1
- regscale/integrations/commercial/crowdstrike.py +0 -1
- regscale/integrations/commercial/grype/__init__.py +3 -0
- regscale/integrations/commercial/grype/commands.py +72 -0
- regscale/integrations/commercial/grype/scanner.py +390 -0
- regscale/integrations/commercial/import_all/import_all_cmd.py +2 -2
- regscale/integrations/commercial/opentext/__init__.py +6 -0
- regscale/integrations/commercial/opentext/commands.py +77 -0
- regscale/integrations/commercial/opentext/scanner.py +449 -85
- regscale/integrations/commercial/qualys.py +50 -61
- regscale/integrations/commercial/servicenow.py +1 -0
- regscale/integrations/commercial/snyk.py +2 -2
- regscale/integrations/commercial/synqly/ticketing.py +29 -0
- regscale/integrations/commercial/trivy/__init__.py +5 -0
- regscale/integrations/commercial/trivy/commands.py +74 -0
- regscale/integrations/commercial/trivy/scanner.py +276 -0
- regscale/integrations/commercial/veracode.py +1 -1
- regscale/integrations/commercial/wizv2/utils.py +1 -1
- regscale/integrations/jsonl_scanner_integration.py +869 -0
- regscale/integrations/public/fedramp/fedramp_common.py +4 -4
- regscale/integrations/public/fedramp/inventory_items.py +3 -3
- regscale/integrations/scanner_integration.py +225 -59
- regscale/models/integration_models/cisa_kev_data.json +65 -7
- regscale/models/integration_models/{flat_file_importer.py → flat_file_importer/__init__.py} +29 -8
- regscale/models/integration_models/snyk.py +141 -15
- regscale/models/integration_models/synqly_models/capabilities.json +1 -1
- regscale/models/integration_models/tenable_models/integration.py +42 -7
- regscale/models/integration_models/veracode.py +91 -48
- regscale/models/regscale_models/regscale_model.py +1 -1
- regscale/models/regscale_models/user.py +3 -4
- regscale/models/regscale_models/vulnerability.py +21 -0
- regscale/utils/version.py +3 -5
- {regscale_cli-6.16.1.0.dist-info → regscale_cli-6.16.3.0.dist-info}/METADATA +3 -3
- {regscale_cli-6.16.1.0.dist-info → regscale_cli-6.16.3.0.dist-info}/RECORD +43 -38
- regscale/integrations/commercial/grype.py +0 -165
- regscale/integrations/commercial/opentext/click.py +0 -99
- regscale/integrations/commercial/trivy.py +0 -162
- {regscale_cli-6.16.1.0.dist-info → regscale_cli-6.16.3.0.dist-info}/LICENSE +0 -0
- {regscale_cli-6.16.1.0.dist-info → regscale_cli-6.16.3.0.dist-info}/WHEEL +0 -0
- {regscale_cli-6.16.1.0.dist-info → regscale_cli-6.16.3.0.dist-info}/entry_points.txt +0 -0
- {regscale_cli-6.16.1.0.dist-info → regscale_cli-6.16.3.0.dist-info}/top_level.txt +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
regscale/__init__.py,sha256=
|
|
1
|
+
regscale/__init__.py,sha256=jJ-ZEy_438JmVlyusriDiBL0lTIAVFQSRZYNzLmelSA,25
|
|
2
2
|
regscale/regscale.py,sha256=kztX3Opi2ERFo3PVAE8ZC9fqzyOwHO3jYuNo6VdCRLM,30730
|
|
3
3
|
regscale/airflow/__init__.py,sha256=yMwN0Bz4JbM0nl5qY_hPegxo_O2ilhTOL9PY5Njhn-s,270
|
|
4
4
|
regscale/airflow/click_dags.py,sha256=H3SUR5jkvInNMv1gu-VG-Ja_H-kH145CpQYNalWNAbE,4520
|
|
@@ -47,14 +47,14 @@ regscale/core/app/internal/encrypt.py,sha256=yOEMDDlpI0Sc0LkoeCtXbypnOF8cxoDrzKR
|
|
|
47
47
|
regscale/core/app/internal/evidence.py,sha256=P_I0wyk37M48NZMWkXwX55HQlTjdxrbhuto4SUMHpt8,50470
|
|
48
48
|
regscale/core/app/internal/file_uploads.py,sha256=EfQ4ViJBHzU9bxnFunK3ahA6T9A6pnA-Jk2NrtgmrQY,4776
|
|
49
49
|
regscale/core/app/internal/healthcheck.py,sha256=ef4Mwk19vi71bv-Xkny5_EGG1UXTbCO5dvEIzHyyfVA,2010
|
|
50
|
-
regscale/core/app/internal/login.py,sha256=
|
|
50
|
+
regscale/core/app/internal/login.py,sha256=k6Qrg0YGs5msY1MgbawpVybLyO5TvhWjZP-xQB_V4xU,10770
|
|
51
51
|
regscale/core/app/internal/migrations.py,sha256=wHIzb1uglLVOXawnb-K3Yt70Z5QyfQYb8ZZOMDrNRU4,7983
|
|
52
52
|
regscale/core/app/internal/model_editor.py,sha256=Lt-DmwO9lS7VFZ0eD5Gax6g5gcVRqWq2d7024tzzbNY,61309
|
|
53
|
-
regscale/core/app/internal/poam_editor.py,sha256=
|
|
53
|
+
regscale/core/app/internal/poam_editor.py,sha256=3PtpSMpV7bqKFuTHD2ACYcTyB3EEtTRKuYv-XArjd0A,22929
|
|
54
54
|
regscale/core/app/internal/workflow.py,sha256=SpgYk1QyzdilVLOK1fFzaKhdLspumaugf5VezgboxhQ,4007
|
|
55
55
|
regscale/core/app/utils/XMLIR.py,sha256=M_RrCsbjznihatkucCKw6dPgHTPQczXyqIdUXWhuCLI,8328
|
|
56
56
|
regscale/core/app/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
57
|
-
regscale/core/app/utils/api_handler.py,sha256=
|
|
57
|
+
regscale/core/app/utils/api_handler.py,sha256=T1meKw6Yi3ZAgRbQ1xuKDVh9Q9B8mbMqqN_LrSwIlAM,11765
|
|
58
58
|
regscale/core/app/utils/app_utils.py,sha256=PnZeSU3AJqqe4NtdqABYowH1c3emiPSGDgRUdVp1kDc,36246
|
|
59
59
|
regscale/core/app/utils/file_utils.py,sha256=URKWVEiR9aFnwoW3-Io7R22tBVeROTC3sX1wOZuhqXw,8912
|
|
60
60
|
regscale/core/app/utils/parser_utils.py,sha256=aBEgcFwbJMD-ARf3wzf-tyWwR6NHvzEcdYcPMm8hGqo,2533
|
|
@@ -108,32 +108,31 @@ regscale/exceptions/license_exception.py,sha256=5lDYW1uGf7dHFKBkhzYD3FlNnI6W4BIC
|
|
|
108
108
|
regscale/exceptions/validation_exception.py,sha256=_DW_GARtPr_Dyy8tolnvC_AYsHRsUUvRz_Rkk8-fjgk,219
|
|
109
109
|
regscale/integrations/__init__.py,sha256=Sqthp3Jggo7co_go380cLn3OAb0cHwqL609_4QJSFBY,58
|
|
110
110
|
regscale/integrations/integration_override.py,sha256=PH7t_bf-RCe_it3FJ61tlKX5UghqHuSEQNJWDfCamAg,5480
|
|
111
|
-
regscale/integrations/
|
|
111
|
+
regscale/integrations/jsonl_scanner_integration.py,sha256=ixHAyTpevqusMpp2LS4vkATUbrCKvG4fSqu8VYOh254,38064
|
|
112
|
+
regscale/integrations/scanner_integration.py,sha256=8hikqPvcjPSIiuiVQC7s0goXsi-1FFtc3dokTMs3QV8,129339
|
|
112
113
|
regscale/integrations/variables.py,sha256=_knfoweXyvarsDGijvpsy87tXAXIijKGRXk9Hw5gGlQ,1904
|
|
113
|
-
regscale/integrations/commercial/__init__.py,sha256=
|
|
114
|
-
regscale/integrations/commercial/ad.py,sha256=
|
|
114
|
+
regscale/integrations/commercial/__init__.py,sha256=bRSeNMGQorH-A7Pp6U62ll92WbVG8WTyBv2Lp4jlkBw,13160
|
|
115
|
+
regscale/integrations/commercial/ad.py,sha256=YXSmK8vRf6yi2GnREGa5GrE6GelhFrLj44SY8AO1pK0,15509
|
|
115
116
|
regscale/integrations/commercial/burp.py,sha256=5hK4bVivfnP1H0UnBdTp_A4WfpCgIn2bsjSQ57JF7WQ,2522
|
|
116
117
|
regscale/integrations/commercial/cpe.py,sha256=eXZeDXicnp1yYgKuyKcthQUYxXi2Pgc__UD8lUqr5H0,4924
|
|
117
|
-
regscale/integrations/commercial/crowdstrike.py,sha256=
|
|
118
|
+
regscale/integrations/commercial/crowdstrike.py,sha256=6x7_GlYDRCZvPZwqgrDT5KMnXCa6H4RKO-FNkiYxHgU,40194
|
|
118
119
|
regscale/integrations/commercial/defender.py,sha256=SA3cn4tdRcD6ZjbCZgULl3ts2fAUqnf27RkdDo7ULGM,65920
|
|
119
120
|
regscale/integrations/commercial/dependabot.py,sha256=V4VbHbwrxHfe7eCilJ7U_MBeIO6X3wetGfIo2DJYe_c,7793
|
|
120
121
|
regscale/integrations/commercial/ecr.py,sha256=47iCigssDANlfHYGznU4rfOq6O-1QMGOuP8lBmn7Df0,2693
|
|
121
122
|
regscale/integrations/commercial/gitlab.py,sha256=dzfqJQ68QI1ee_BriNMyPuXLkzOhc2vR1hhVfq2j13Y,12496
|
|
122
|
-
regscale/integrations/commercial/grype.py,sha256=81hmc0gpZvNzuh4Hq1dpegY6VsPCgwjBeMAm6mCljqQ,6156
|
|
123
123
|
regscale/integrations/commercial/ibm.py,sha256=RQrivu4tOl_8gh5iUa9m9sGbHusphP8rnU2BZZc9IMs,2772
|
|
124
124
|
regscale/integrations/commercial/jira.py,sha256=1fBF3y4kotbD9hFtqZxlBIb4Q6iNkhIKyPI_MUiqZ6w,39222
|
|
125
125
|
regscale/integrations/commercial/nexpose.py,sha256=lqPw9yk7ywHDoLwPeXKSz9DaLyVzOQIKOotCgayVTNE,2853
|
|
126
126
|
regscale/integrations/commercial/okta.py,sha256=VNwE848xiBxkha4DibkhLJN-fi0T8rLMd30PPAmRjpk,30837
|
|
127
127
|
regscale/integrations/commercial/prisma.py,sha256=shr71NkaSfcg2m-Ak6EVV9ozAFPibiOoehEty24MtyA,2841
|
|
128
|
-
regscale/integrations/commercial/qualys.py,sha256=
|
|
128
|
+
regscale/integrations/commercial/qualys.py,sha256=cMx39E_u0Y-2j6KZO_vknmpJ34cHnoOdDzWxmYEc-JU,53151
|
|
129
129
|
regscale/integrations/commercial/salesforce.py,sha256=vvXWlXxhJMQj45tU7wz7o4YbkhqjPlaMx_6SWYkI3Bs,36671
|
|
130
|
-
regscale/integrations/commercial/servicenow.py,sha256=
|
|
131
|
-
regscale/integrations/commercial/snyk.py,sha256=
|
|
130
|
+
regscale/integrations/commercial/servicenow.py,sha256=nUVZwt8-G1rQhwACX6i2BKIAjkMtd46uskBznxgOOsA,64014
|
|
131
|
+
regscale/integrations/commercial/snyk.py,sha256=j2cN90BzzcZDeORDcnMbuQwL3__FRd-X5JnH3ZpMKJE,2816
|
|
132
132
|
regscale/integrations/commercial/sonarcloud.py,sha256=_E4DuKRZUqXNNPsxS3UJ3q6llVu-5sfw5pTHxe_UMk0,9821
|
|
133
133
|
regscale/integrations/commercial/sqlserver.py,sha256=PcDLmsZ9xU5NlFpwPZyMhhxCgX4JK2Ztn2S6kCG4mws,11614
|
|
134
134
|
regscale/integrations/commercial/synqly_jira.py,sha256=dmw3m_lKtii2OpVcrmtNJ-ClUNThV8-1IOrWyE2RQLE,33002
|
|
135
|
-
regscale/integrations/commercial/
|
|
136
|
-
regscale/integrations/commercial/veracode.py,sha256=ZEK-CW5nGIYl5bydSxssCpAZYeBLgmSZkrU-ilyRpI0,2910
|
|
135
|
+
regscale/integrations/commercial/veracode.py,sha256=SYJEXRgExwVPTWBcqap2jcsdggp-4TvdETLrSCVEOvo,2919
|
|
137
136
|
regscale/integrations/commercial/xray.py,sha256=egJO6fCQ8jhSpyu6Gj2xczTtUMEiSAJKDz05dT-YZ6M,2734
|
|
138
137
|
regscale/integrations/commercial/amazon/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
139
138
|
regscale/integrations/commercial/amazon/common.py,sha256=8ITptlZjJD720_DGfPqmEXeNF4GbAseq8o0s80E4CyY,3252
|
|
@@ -165,8 +164,11 @@ regscale/integrations/commercial/gcp/__init__.py,sha256=XNiGNoYOGRKgZwqQCqTGRazr
|
|
|
165
164
|
regscale/integrations/commercial/gcp/auth.py,sha256=DSakDZL9JE67r5W-USqavCyrRS2rqVQ7-FxGi3h4kNg,3186
|
|
166
165
|
regscale/integrations/commercial/gcp/control_tests.py,sha256=AvM6Dv2FgFi3bsgXYxq6yxxlbmXuhtFZkmEAJU_qQiE,9913
|
|
167
166
|
regscale/integrations/commercial/gcp/variables.py,sha256=tFxPS0SXAmYGpaDTVxOLDp4NpDyIgbEWp6OB3x9Jog4,797
|
|
167
|
+
regscale/integrations/commercial/grype/__init__.py,sha256=KRuTTlOokQjrkpOmhrefwdB90k1jGSEIiDYFbPcjAJY,81
|
|
168
|
+
regscale/integrations/commercial/grype/commands.py,sha256=EH6l8b76u89gfeMqosgKaGqcQ95sXRqgAXE6xQz6Q2w,2027
|
|
169
|
+
regscale/integrations/commercial/grype/scanner.py,sha256=0nrjXq3_alSTdmhO5Y4z0Un4YGo1WB2X08PyKNc3_VU,16419
|
|
168
170
|
regscale/integrations/commercial/import_all/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
169
|
-
regscale/integrations/commercial/import_all/import_all_cmd.py,sha256=
|
|
171
|
+
regscale/integrations/commercial/import_all/import_all_cmd.py,sha256=87OGCiOeMSAmEZEN4i8MhEK3qyOJUndk-d4i-Q-l_xc,18286
|
|
170
172
|
regscale/integrations/commercial/import_all/scan_file_fingerprints.json,sha256=8c_hnfwbq9bEHr3f14hzcnA9vrehQ-_ZsAIZ4YTPB6w,1981
|
|
171
173
|
regscale/integrations/commercial/mappings/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
172
174
|
regscale/integrations/commercial/mappings/csf_controls.json,sha256=EHOLWrnFr0oRsHBx4LX6pLVoqLuX-Mn7O-CXuzpw-v4,57504
|
|
@@ -174,9 +176,9 @@ regscale/integrations/commercial/mappings/nist_800_53_r5_controls.json,sha256=Vu
|
|
|
174
176
|
regscale/integrations/commercial/nessus/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
175
177
|
regscale/integrations/commercial/nessus/nessus_utils.py,sha256=lP1_xVmYeyL17muy0jGMnJ5xdON3mi22BVAyDHa9WfU,13525
|
|
176
178
|
regscale/integrations/commercial/nessus/scanner.py,sha256=xz-OBd98ZbKKWnuxsP7oTqTdqa30TQDQMMuPLm82hfU,17335
|
|
177
|
-
regscale/integrations/commercial/opentext/__init__.py,sha256=
|
|
178
|
-
regscale/integrations/commercial/opentext/
|
|
179
|
-
regscale/integrations/commercial/opentext/scanner.py,sha256=
|
|
179
|
+
regscale/integrations/commercial/opentext/__init__.py,sha256=zqCPb_4rYRZZPXfeKn4AoZyyYyQ6MU4C0lCs2ysOBhc,251
|
|
180
|
+
regscale/integrations/commercial/opentext/commands.py,sha256=c5aAxFXp6vO0plGuX1eZe_90iDifYX3vCaqMd5jbunU,2142
|
|
181
|
+
regscale/integrations/commercial/opentext/scanner.py,sha256=gTUbvrJtFD8sp4YBcHeIrhL3EP5lCmixijVtRA0AyA0,21608
|
|
180
182
|
regscale/integrations/commercial/sap/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
181
183
|
regscale/integrations/commercial/sap/click.py,sha256=pWgjUOA_4WKkDUWcE8z4EshnJUdrTl15NKUfKpKyqzE,522
|
|
182
184
|
regscale/integrations/commercial/sap/sysdig/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -199,7 +201,7 @@ regscale/integrations/commercial/stigv2/click_commands.py,sha256=8cVuq_KXnOCktIm
|
|
|
199
201
|
regscale/integrations/commercial/stigv2/stig_integration.py,sha256=pnR0RMLSJYclJ5DHm-EQJ0Qncc4RJE0dkZhD5W7KfG8,9169
|
|
200
202
|
regscale/integrations/commercial/synqly/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
201
203
|
regscale/integrations/commercial/synqly/assets.py,sha256=GcDGe6XvumaAYyo5Af8Ccmg1DzLfgnNFGdsyRdKsiEs,1412
|
|
202
|
-
regscale/integrations/commercial/synqly/ticketing.py,sha256=
|
|
204
|
+
regscale/integrations/commercial/synqly/ticketing.py,sha256=6UhmDa0l-GYTJAyc93HiaS-maCVQD9UtDcGIjQ9n270,4909
|
|
203
205
|
regscale/integrations/commercial/synqly/vulnerabilities.py,sha256=B8GwfKVDdoOIikjZO-4KqDNf-ApXlcJNkwmno0FjDOQ,7842
|
|
204
206
|
regscale/integrations/commercial/tenablev2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
205
207
|
regscale/integrations/commercial/tenablev2/authenticate.py,sha256=ZFtyw26zjt1nky15PSP0Dl1-0WXEydU9s3UaS8oQaZ8,751
|
|
@@ -208,6 +210,9 @@ regscale/integrations/commercial/tenablev2/scanner.py,sha256=hNFwKTqYys4GDjopXHq
|
|
|
208
210
|
regscale/integrations/commercial/tenablev2/stig_parsers.py,sha256=01h5ImYMUsjrVHaGgqj5JVBx6Jzlhg06ufu0SL_uBEs,5983
|
|
209
211
|
regscale/integrations/commercial/tenablev2/utils.py,sha256=3Mf_HNgFBL27HtsdVs3CqLhgDNl3_RSytS21lcQfKj0,2907
|
|
210
212
|
regscale/integrations/commercial/tenablev2/variables.py,sha256=GWzzNmFkQ6i55RYK7DkVq3ibStaU3hSwapvxsqbNsxE,822
|
|
213
|
+
regscale/integrations/commercial/trivy/__init__.py,sha256=fTTABeR1Z3Wei3l-A54SoTPn2mrMQrKLmr9SwTyYLTM,117
|
|
214
|
+
regscale/integrations/commercial/trivy/commands.py,sha256=uzK-15k6ZNdOQ9TxAIF_3wj5rqiJ9UDRRlZVPnXhQvQ,2068
|
|
215
|
+
regscale/integrations/commercial/trivy/scanner.py,sha256=MzZvcwe5CpOFqkGImNd19kKySrbpGDwb_rC0jswkM10,10726
|
|
211
216
|
regscale/integrations/commercial/wizv2/WizDataMixin.py,sha256=s7F_rVrP9IZa_x_vh3MswR7W_UBHRfd4kHGVsNX4ips,3606
|
|
212
217
|
regscale/integrations/commercial/wizv2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
213
218
|
regscale/integrations/commercial/wizv2/click.py,sha256=wml9JygBSk2ptOvjVuewdS88ssUCGQpUCtiHzTz8hLU,13033
|
|
@@ -217,7 +222,7 @@ regscale/integrations/commercial/wizv2/models.py,sha256=hZ6557LJfcp1_NRbMM0V_G1e
|
|
|
217
222
|
regscale/integrations/commercial/wizv2/parsers.py,sha256=YcFOGdYZZ17hj2pcRMC9Ho2wPY94dfJ4hHwqTR5BB6c,11095
|
|
218
223
|
regscale/integrations/commercial/wizv2/sbom.py,sha256=QcGaYiBGtZ3mBcbo-KGl-I2u6QHKAIinTk26LPy0Kng,4466
|
|
219
224
|
regscale/integrations/commercial/wizv2/scanner.py,sha256=3Vx2vCvwDlNAogYa3-qFgRDSVjUFtIIzBW4PFSYpe5k,18419
|
|
220
|
-
regscale/integrations/commercial/wizv2/utils.py,sha256=
|
|
225
|
+
regscale/integrations/commercial/wizv2/utils.py,sha256=VuAus03sSK_IZaZQnVvEkxDRg4MrvhT2UOoOawb4NQg,31326
|
|
221
226
|
regscale/integrations/commercial/wizv2/variables.py,sha256=BRtYjMNPqZDLgql-bbBJ0dlVx0KkR647aXKc0HGdWVo,2132
|
|
222
227
|
regscale/integrations/commercial/wizv2/wiz_auth.py,sha256=BpQTYJn3u0QiWC2IAw-bunZpBPsJtDJgOsC2zOL_UU4,5554
|
|
223
228
|
regscale/integrations/integration/__init__.py,sha256=WJgPLnEahD94QLE8NR8QCzlf8xk2ix76_WPDlf98ezU,70
|
|
@@ -238,13 +243,13 @@ regscale/integrations/public/fedramp/click.py,sha256=cIMo5ZGXoSDyKvI9kLUFuLT0zfA
|
|
|
238
243
|
regscale/integrations/public/fedramp/components.py,sha256=z6PMObm-kjRR42bT04EfnjisrEULfXlwxb7576uuMmY,27010
|
|
239
244
|
regscale/integrations/public/fedramp/docx_parser.py,sha256=EA9g1iTlB6-GtOzV9JwGW8x_SruhbaIMOzstCBvjiq8,10526
|
|
240
245
|
regscale/integrations/public/fedramp/fedramp_cis_crm.py,sha256=RKZdwX12RAGsTWd0xndHxaj5iABiKrULoee7L399E9c,44294
|
|
241
|
-
regscale/integrations/public/fedramp/fedramp_common.py,sha256=
|
|
246
|
+
regscale/integrations/public/fedramp/fedramp_common.py,sha256=Mdy3_WdCEcTwSXEEKXiODmr2YJTWcTg6jfyWZJWfruQ,115406
|
|
242
247
|
regscale/integrations/public/fedramp/fedramp_docx.py,sha256=GnRjuWEgE9XSe9egPOQSZ8lMjY4CpqcD2IS5paI-xQc,13742
|
|
243
248
|
regscale/integrations/public/fedramp/fedramp_five.py,sha256=-dogAC3J7BNW5Yl6Aw5XHJbjW3PxFi_HjGQCfxfcWns,90771
|
|
244
249
|
regscale/integrations/public/fedramp/fedramp_traversal.py,sha256=BkgwsFluZO5g0Rc0WujYgbc1_YLofamJzFP7Z5UYfao,4528
|
|
245
250
|
regscale/integrations/public/fedramp/import_fedramp_r4_ssp.py,sha256=Opld0vEZ4b71cIDogu6ykTUL86tXZVTSnwQzjz8w_4U,9925
|
|
246
251
|
regscale/integrations/public/fedramp/import_workbook.py,sha256=VFNBjBNLLRL3WjkJmE9CamizNsLgfdX5g8YolOr8lPY,19658
|
|
247
|
-
regscale/integrations/public/fedramp/inventory_items.py,sha256=
|
|
252
|
+
regscale/integrations/public/fedramp/inventory_items.py,sha256=nBgVgigMyZ2C6fJ9QCvz-8KvSlGtqi1lqC3alBUlzyg,10080
|
|
248
253
|
regscale/integrations/public/fedramp/markdown_parser.py,sha256=I2VI8NImOnHfB1eE3iLG_gK6uqqqImL7I_YEkzh6INE,5339
|
|
249
254
|
regscale/integrations/public/fedramp/metadata.py,sha256=eh8AA5YNHUxHGnlbLRmhovINBKqkAJR98EUFDX1g5Z0,26543
|
|
250
255
|
regscale/integrations/public/fedramp/parts_mapper.py,sha256=aBh1gWo-3-JFDDxHQaxrvqC7OFTxS6qWEFfoHlknomc,3787
|
|
@@ -290,11 +295,10 @@ regscale/models/integration_models/azure_alerts.py,sha256=2etrpvcxa7jVQrc98bJlVG
|
|
|
290
295
|
regscale/models/integration_models/base64.py,sha256=sxV6O5qY1_TstJENX5jBPsSdQwmA83-NNhgJFunXiZE,570
|
|
291
296
|
regscale/models/integration_models/burp.py,sha256=hPQkmmUdC84MBFTE2Di5NvjbGz1ssISSkZdDaVi-ZoQ,16941
|
|
292
297
|
regscale/models/integration_models/burp_models.py,sha256=UytDTAcCaxyu-knFkm_mEUH6UmWK3OTXKSC9Sc6OjVs,3669
|
|
293
|
-
regscale/models/integration_models/cisa_kev_data.json,sha256=
|
|
298
|
+
regscale/models/integration_models/cisa_kev_data.json,sha256=4ucPXc0vgND9_2JgV_17n2vL97bc0dE0VOHmOki7R9A,1151325
|
|
294
299
|
regscale/models/integration_models/defender_data.py,sha256=jsAcjKxiGmumGerj7xSWkFd6r__YpuKDnYX5o7xHDiE,2844
|
|
295
300
|
regscale/models/integration_models/defenderimport.py,sha256=OFwEH0Xu-HFLIZJZ8hP60Ov3lS8RR7KHEsw4wI8QnoE,5766
|
|
296
301
|
regscale/models/integration_models/drf.py,sha256=Aq7AdLa_CH97NrnR-CxaFI22JjVN9uCxVN7Z-BBUaNU,18896
|
|
297
|
-
regscale/models/integration_models/flat_file_importer.py,sha256=pA7hnME_-qJX6aR8yVXijpaDeXXhj9SLXqrL3FHxFvg,43288
|
|
298
302
|
regscale/models/integration_models/grype_import.py,sha256=MgCEK_jCwY7NTXZgxQtnXLbovmH7OuSOmSOm-a7egZg,9710
|
|
299
303
|
regscale/models/integration_models/ibm.py,sha256=S2LZkHhxfRBTAS8T2mwiQ_pCfoX1-UwvFXRNz1rb7g0,4760
|
|
300
304
|
regscale/models/integration_models/implementation_results.py,sha256=nJOAFPMS73SudAA2dzxxxRu6h5qagPmr6H9NAOLWzLw,2704
|
|
@@ -303,9 +307,9 @@ regscale/models/integration_models/prisma.py,sha256=83LeS96rUgaZvPzl6ei_FWjTFBoj
|
|
|
303
307
|
regscale/models/integration_models/qualys.py,sha256=PJr9iX7IXH_3dQNzzpf8cmJhIdy_tP3Z8ouVmrKOK2I,26999
|
|
304
308
|
regscale/models/integration_models/qualys_scanner.py,sha256=6rAeCR9qI10MM_LWtZtOhWaT6mERWtII2IxxyvQhfKw,6453
|
|
305
309
|
regscale/models/integration_models/send_reminders.py,sha256=Zon6fyV0nODp8l5KuABe97Rz8l37o4biRb5iML7GHiE,26137
|
|
306
|
-
regscale/models/integration_models/snyk.py,sha256=
|
|
310
|
+
regscale/models/integration_models/snyk.py,sha256=Wk04Dbz67s2uniWkfllRHhlEBrRYiZq5CRwkOpDyHls,11524
|
|
307
311
|
regscale/models/integration_models/trivy_import.py,sha256=R6aZXUaNKf5Gdo1kNxIKM-HMW95XDWVCG_gMrzDYNuQ,9210
|
|
308
|
-
regscale/models/integration_models/veracode.py,sha256=
|
|
312
|
+
regscale/models/integration_models/veracode.py,sha256=qcNllrTstGshpTaWDFm0Z-XYbP-mSVMWWiGoq5karO0,10431
|
|
309
313
|
regscale/models/integration_models/xray.py,sha256=rnDF9kOAYMhTO9xEi1bwmIrQvfTCQAW6ENNp3Hsfaes,5848
|
|
310
314
|
regscale/models/integration_models/amazon_models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
311
315
|
regscale/models/integration_models/amazon_models/inspector.py,sha256=AcV_Nk4ZJMJqmRMpmpbu8LDqp4F2D6GD_IcKsh9MYcs,12915
|
|
@@ -313,10 +317,11 @@ regscale/models/integration_models/amazon_models/inspector_scan.py,sha256=A1uaOv
|
|
|
313
317
|
regscale/models/integration_models/ecr_models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
314
318
|
regscale/models/integration_models/ecr_models/data.py,sha256=l28DCidXar1JygYBQZL9MYenQA9N-Cx3Skf51IOjZcw,1017
|
|
315
319
|
regscale/models/integration_models/ecr_models/ecr.py,sha256=-s_5mj4BVKImrvfMaOJLT4qc5EqTCbv8qM4uJiH_nKc,9502
|
|
320
|
+
regscale/models/integration_models/flat_file_importer/__init__.py,sha256=Mq4V3tRa3OK4PBJMyU-nZrk8vsnk1_ZkmXEJWohou_I,44271
|
|
316
321
|
regscale/models/integration_models/sbom/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
317
322
|
regscale/models/integration_models/sbom/cyclone_dx.py,sha256=0pFR0BWBrF5c8_cC_8mj2MXvNOMHOdHbBYXvTVfFAh8,4058
|
|
318
323
|
regscale/models/integration_models/synqly_models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
319
|
-
regscale/models/integration_models/synqly_models/capabilities.json,sha256=
|
|
324
|
+
regscale/models/integration_models/synqly_models/capabilities.json,sha256=mQHEMe9WyyJBHEWvidOBjw9Hf0VgCszyDeNv6i0Bs-4,232304
|
|
320
325
|
regscale/models/integration_models/synqly_models/connector_types.py,sha256=8nxptkTexpskySnmL0obNAff_iu_fx6tJ7i1-4hJvao,461
|
|
321
326
|
regscale/models/integration_models/synqly_models/ocsf_mapper.py,sha256=vrtto3-VxbEtK5JSHNluypLm8yvmT_IDupyiJIeFedY,14535
|
|
322
327
|
regscale/models/integration_models/synqly_models/param.py,sha256=45zgYUV4U9Ia8-CdIb4TlE3vfDMMtbfA1y5LOiznnH8,2645
|
|
@@ -327,7 +332,7 @@ regscale/models/integration_models/synqly_models/connectors/assets.py,sha256=HHN
|
|
|
327
332
|
regscale/models/integration_models/synqly_models/connectors/ticketing.py,sha256=yRBuCkRAVfa_C91r3WqJ9gxrQsoD0qV9cY48YXpJl70,25358
|
|
328
333
|
regscale/models/integration_models/synqly_models/connectors/vulnerabilities.py,sha256=kwKvmEIsxkLDOYoDOiqdtyapBZ5fHYQcrQjDpFJQvWc,7143
|
|
329
334
|
regscale/models/integration_models/tenable_models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
330
|
-
regscale/models/integration_models/tenable_models/integration.py,sha256=
|
|
335
|
+
regscale/models/integration_models/tenable_models/integration.py,sha256=4Lhp2SY6Hb6uPmeQcITra20Mw-yKE1fm0CKwPZwJ9PM,9672
|
|
331
336
|
regscale/models/integration_models/tenable_models/models.py,sha256=dmG7btkN4YkDWwnfW5Ldc3tWEAGjPiaRgJjrqMOkPEU,15846
|
|
332
337
|
regscale/models/regscale_models/__init__.py,sha256=OmFpksQ7e1P52xkBfP5_CTew1A4JiB65cvNuwchGXWU,1900
|
|
333
338
|
regscale/models/regscale_models/assessment.py,sha256=ekzNlcsfDGBu97PMCi7hBRGbzVgxk7Ij0RfrdGh1Rfw,20440
|
|
@@ -389,7 +394,7 @@ regscale/models/regscale_models/questionnaire.py,sha256=yWNeKLx2pc9gyc1SCwcjXfWK
|
|
|
389
394
|
regscale/models/regscale_models/questionnaire_instance.py,sha256=Hfa27stfcK1_vjtqj8t-5s3LdxZUlLjKLRm4P5qEHKU,7071
|
|
390
395
|
regscale/models/regscale_models/rbac.py,sha256=4byeEmr0TxtSyKx7efCX_HGphBzf6s2EFZ1xfTAttPk,4523
|
|
391
396
|
regscale/models/regscale_models/reference.py,sha256=P_7jT6H-NZIa7TyH3j98N-ZHlB6FsjpZVRZCCpms-D4,3253
|
|
392
|
-
regscale/models/regscale_models/regscale_model.py,sha256=
|
|
397
|
+
regscale/models/regscale_models/regscale_model.py,sha256=GTQVoQHWK9ZniqQkOJYJyj_B60aPBQfkA_CUQ6-EhAM,66491
|
|
393
398
|
regscale/models/regscale_models/requirement.py,sha256=-8PnMbuWAZHol5X1w-fzm-moD784Et0oevSVbz6xLhU,767
|
|
394
399
|
regscale/models/regscale_models/risk.py,sha256=QPwX8-4ERLYkJdrQYLQWTsNYCYgWn5wKY28djv6L-_s,8493
|
|
395
400
|
regscale/models/regscale_models/sbom.py,sha256=UYS3lBizGqz7A7vNPYBYzpL8PWIaXLl7ZQox_hlJ2ZQ,1722
|
|
@@ -407,9 +412,9 @@ regscale/models/regscale_models/tag.py,sha256=D4n5ABDzjI7u1ukjRyHgmgyVd8iNTNJlQr
|
|
|
407
412
|
regscale/models/regscale_models/tag_mapping.py,sha256=QtafVsWjpBR8BAxRhabk3FL3E4WI5OdCv95fuvNOrZs,657
|
|
408
413
|
regscale/models/regscale_models/task.py,sha256=eKVdR89Gb6M9E2plhK4fru8teQI3zPJpgtJ0f43FOrY,4919
|
|
409
414
|
regscale/models/regscale_models/threat.py,sha256=4TNZcRnTgmlDwBsYu5Pbh9GRd8ZWAtqqr0Xph3uPNAA,7255
|
|
410
|
-
regscale/models/regscale_models/user.py,sha256=
|
|
415
|
+
regscale/models/regscale_models/user.py,sha256=9kqKKr7KRKylIcqmh8z3q5kqpLqOfTHrPYyrlVqFid8,6493
|
|
411
416
|
regscale/models/regscale_models/user_group.py,sha256=6j-lkhu21zNukof804Dsk7eHPtEwD7779yInWm6lHTs,1860
|
|
412
|
-
regscale/models/regscale_models/vulnerability.py,sha256=
|
|
417
|
+
regscale/models/regscale_models/vulnerability.py,sha256=VKgWMVvAQ74Sq46myYsivGfIeW63dHq3bv3cRCkDcbg,10960
|
|
413
418
|
regscale/models/regscale_models/vulnerability_mapping.py,sha256=cq44xkkCH7rfp0BJxavr4DLiEAHouyyPmi5EaizH6NI,6261
|
|
414
419
|
regscale/models/regscale_models/workflow.py,sha256=uMNVVAn5qR8wxjMP5PHbcvMmvPRe1gn1oclVUpbv52s,1873
|
|
415
420
|
regscale/models/regscale_models/workflow_action.py,sha256=zMHrvUkTQJlkCj6Xx6wadozBwsVPpObj5GD81LI2VZc,925
|
|
@@ -432,7 +437,7 @@ regscale/utils/numbers.py,sha256=0LkZvewuKXogk6_oWF90OAoGIuzK1fjWZ4gRCC9_TlQ,301
|
|
|
432
437
|
regscale/utils/shell.py,sha256=H9Zzwt3zxyzWmfiH3tVrcIoAcEHtF_pXzM5ERd7PAGc,4176
|
|
433
438
|
regscale/utils/string.py,sha256=3TYMjGHr0T98SswyGl6f54jXKB_-zlW5it9ZxTOm6bg,3918
|
|
434
439
|
regscale/utils/synqly_utils.py,sha256=DjkdAxdUJBOU5YfAJ7pFFNBPSP37Gs9NQS10xduaYmA,6324
|
|
435
|
-
regscale/utils/version.py,sha256=
|
|
440
|
+
regscale/utils/version.py,sha256=bOH1vlvOEAt1f-fzzFxtZrg3VcnqL5SA4ud1TjZVQGU,4265
|
|
436
441
|
regscale/utils/threading/__init__.py,sha256=xdaPVA-vab5_grbx_ESD9k_i-FGt5xb9pBJd2xvkExU,254
|
|
437
442
|
regscale/utils/threading/threadhandler.py,sha256=W6Ujc-kf0vOhlQgsMb7MRFImtBuWQ-IsOiCunRAqCuY,4709
|
|
438
443
|
regscale/utils/threading/threadsafe_counter.py,sha256=Dwt-jt4nN-ApMgpxONM7RFll6FU4hMCeZCW54rjDPjs,1037
|
|
@@ -474,9 +479,9 @@ tests/regscale/models/test_regscale_model.py,sha256=ZsrEZkC4EtdIsoQuayn1xv2gEGcV
|
|
|
474
479
|
tests/regscale/models/test_report.py,sha256=eiSvS_zS0aVeL0HBvtmHVvEzcfF9ZFVn2twj5g8KttY,970
|
|
475
480
|
tests/regscale/models/test_tenable_integrations.py,sha256=PNJC2Zu6lv1xj7y6e1yOsz5FktSU3PRKb5x3n5YG3w0,4072
|
|
476
481
|
tests/regscale/models/test_user_model.py,sha256=e9olv28qBApgnvK6hFHOgXjUC-pkaV8aGDirEIWASL4,4427
|
|
477
|
-
regscale_cli-6.16.
|
|
478
|
-
regscale_cli-6.16.
|
|
479
|
-
regscale_cli-6.16.
|
|
480
|
-
regscale_cli-6.16.
|
|
481
|
-
regscale_cli-6.16.
|
|
482
|
-
regscale_cli-6.16.
|
|
482
|
+
regscale_cli-6.16.3.0.dist-info/LICENSE,sha256=ytNhYQ9Rmhj_m-EX2pPq9Ld6tH5wrqqDYg-fCf46WDU,1076
|
|
483
|
+
regscale_cli-6.16.3.0.dist-info/METADATA,sha256=3Xut5oxIwSOAFXsP1ORtk4it41rgZoc1nCcBHTQKgzY,30913
|
|
484
|
+
regscale_cli-6.16.3.0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
485
|
+
regscale_cli-6.16.3.0.dist-info/entry_points.txt,sha256=cLOaIP1eRv1yZ2u7BvpE3aB4x3kDrDwkpeisKOu33z8,269
|
|
486
|
+
regscale_cli-6.16.3.0.dist-info/top_level.txt,sha256=Uv8VUCAdxRm70bgrD4YNEJUmDhBThad_1aaEFGwRByc,15
|
|
487
|
+
regscale_cli-6.16.3.0.dist-info/RECORD,,
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Module for processing Grype scan results and loading them into RegScale.
|
|
3
|
-
"""
|
|
4
|
-
|
|
5
|
-
import logging
|
|
6
|
-
import traceback
|
|
7
|
-
from datetime import datetime
|
|
8
|
-
from typing import List, Optional, Union
|
|
9
|
-
|
|
10
|
-
import click
|
|
11
|
-
from pathlib import Path
|
|
12
|
-
|
|
13
|
-
from regscale.core.app.utils.file_utils import (
|
|
14
|
-
download_from_s3,
|
|
15
|
-
find_files,
|
|
16
|
-
iterate_files,
|
|
17
|
-
move_file,
|
|
18
|
-
)
|
|
19
|
-
from regscale.models.integration_models.flat_file_importer import FlatFileImporter
|
|
20
|
-
from regscale.models.integration_models.grype_import import GrypeImport
|
|
21
|
-
|
|
22
|
-
logger = logging.getLogger(__name__)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
class GrypeProcessingError(Exception):
|
|
26
|
-
"""Custom exception for Grype processing errors."""
|
|
27
|
-
|
|
28
|
-
pass
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
@click.group()
|
|
32
|
-
def grype():
|
|
33
|
-
"""Performs actions from the Grype scanner integration."""
|
|
34
|
-
pass
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
@grype.command("import_scans")
|
|
38
|
-
@FlatFileImporter.common_scanner_options(
|
|
39
|
-
message="File path to the folder containing Grype .json files to process to RegScale.",
|
|
40
|
-
prompt="File path for Grype files",
|
|
41
|
-
import_name="grype",
|
|
42
|
-
)
|
|
43
|
-
@click.option("--destination", "-d", type=click.Path(exists=True, dir_okay=True), required=False)
|
|
44
|
-
@click.option("--file_pattern", "-p", type=str, required=False, default="grype*.json")
|
|
45
|
-
def import_scans(
|
|
46
|
-
destination: Optional[Path],
|
|
47
|
-
file_pattern: str,
|
|
48
|
-
folder_path: Path,
|
|
49
|
-
regscale_ssp_id: int,
|
|
50
|
-
scan_date: datetime,
|
|
51
|
-
mappings_path: Path,
|
|
52
|
-
disable_mapping: bool,
|
|
53
|
-
s3_bucket: str,
|
|
54
|
-
s3_prefix: str,
|
|
55
|
-
aws_profile: str,
|
|
56
|
-
upload_file: bool,
|
|
57
|
-
) -> None:
|
|
58
|
-
"""
|
|
59
|
-
Process Grype scan results from a folder containing Grype scan files and load into RegScale.
|
|
60
|
-
"""
|
|
61
|
-
import_grype_scans(
|
|
62
|
-
destination=destination,
|
|
63
|
-
file_pattern=file_pattern,
|
|
64
|
-
folder_path=folder_path,
|
|
65
|
-
regscale_ssp_id=regscale_ssp_id,
|
|
66
|
-
scan_date=scan_date,
|
|
67
|
-
mappings_path=mappings_path,
|
|
68
|
-
disable_mapping=disable_mapping,
|
|
69
|
-
s3_bucket=s3_bucket,
|
|
70
|
-
s3_prefix=s3_prefix,
|
|
71
|
-
aws_profile=aws_profile,
|
|
72
|
-
upload_file=upload_file,
|
|
73
|
-
)
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
def import_grype_scans(
|
|
77
|
-
folder_path: Path,
|
|
78
|
-
regscale_ssp_id: int,
|
|
79
|
-
scan_date: datetime,
|
|
80
|
-
mappings_path: Optional[Path] = None,
|
|
81
|
-
disable_mapping: Optional[bool] = False,
|
|
82
|
-
s3_bucket: Optional[str] = None,
|
|
83
|
-
s3_prefix: Optional[str] = None,
|
|
84
|
-
aws_profile: Optional[str] = None,
|
|
85
|
-
destination: Optional[Path] = None,
|
|
86
|
-
file_pattern: Optional[str] = "grype*.json",
|
|
87
|
-
upload_file: Optional[bool] = True,
|
|
88
|
-
) -> None:
|
|
89
|
-
"""
|
|
90
|
-
Process Grype scan results from a folder container grype scan files and load into RegScale.
|
|
91
|
-
|
|
92
|
-
:param Path folder_path: Path to the Grype scan results JSON file
|
|
93
|
-
:param int regscale_ssp_id: RegScale SSP ID
|
|
94
|
-
:param datetime scan_date: The date of the scan
|
|
95
|
-
:param Optional[Path] mappings_path: Path to the header mapping file, default: None
|
|
96
|
-
:param Optional[bool] disable_mapping: Disable the header mapping, default: False
|
|
97
|
-
:param Optional[str] s3_bucket: S3 bucket to download scan files from, default: None
|
|
98
|
-
:param Optional[str] s3_prefix: Prefix (folder path) within the S3 bucket, default: None
|
|
99
|
-
:param Optional[str] aws_profile: AWS profile to use for S3 access, default: None
|
|
100
|
-
:param Optional[Path] destination: Destination folder for processed files, default: None
|
|
101
|
-
:param Optional[str] file_pattern: File pattern to search for in the directory, default: grype*.json
|
|
102
|
-
:param Optional[bool] upload_file: Whether to upload the file to RegScale after processing, default: True
|
|
103
|
-
:raises GrypeProcessingError: If there is an error processing the Grype results
|
|
104
|
-
:rtype: None
|
|
105
|
-
"""
|
|
106
|
-
from regscale.exceptions import ValidationException
|
|
107
|
-
from regscale.core.app.application import Application
|
|
108
|
-
|
|
109
|
-
try:
|
|
110
|
-
if s3_bucket and s3_prefix and aws_profile:
|
|
111
|
-
download_from_s3(bucket=s3_bucket, prefix=s3_prefix, local_path=destination, aws_profile=aws_profile)
|
|
112
|
-
files = find_files(path=destination, pattern=file_pattern)
|
|
113
|
-
logger.info("Downloaded all Grype scan files from S3. Processing...")
|
|
114
|
-
elif destination and not s3_bucket:
|
|
115
|
-
logger.info("Moving Grype scan files to %s", destination)
|
|
116
|
-
stored_file_collection = find_files(path=folder_path, pattern=file_pattern)
|
|
117
|
-
move_all_files(stored_file_collection, destination)
|
|
118
|
-
files = find_files(path=destination, pattern=file_pattern)
|
|
119
|
-
logger.info("Done moving files")
|
|
120
|
-
else:
|
|
121
|
-
stored_file_collection = find_files(path=folder_path, pattern=file_pattern)
|
|
122
|
-
files = stored_file_collection
|
|
123
|
-
if not files:
|
|
124
|
-
logger.error("No Grype scan results found in the specified directory")
|
|
125
|
-
return
|
|
126
|
-
|
|
127
|
-
except Exception as e:
|
|
128
|
-
logger.error(f"Error processing Grype results: {str(e)}")
|
|
129
|
-
logger.error(traceback.format_exc())
|
|
130
|
-
raise GrypeProcessingError(f"Failed to process Grype results: {str(e)}")
|
|
131
|
-
|
|
132
|
-
for file in files:
|
|
133
|
-
try:
|
|
134
|
-
GrypeImport(
|
|
135
|
-
name="Grype",
|
|
136
|
-
app=Application(),
|
|
137
|
-
file_path=str(file),
|
|
138
|
-
file_type=file.suffix,
|
|
139
|
-
parent_id=regscale_ssp_id,
|
|
140
|
-
parent_module="securityplans",
|
|
141
|
-
scan_date=scan_date,
|
|
142
|
-
mappings_path=mappings_path,
|
|
143
|
-
disable_mapping=disable_mapping,
|
|
144
|
-
upload_file=upload_file,
|
|
145
|
-
file_name=file.name,
|
|
146
|
-
)
|
|
147
|
-
except ValidationException as e:
|
|
148
|
-
logger.error(f"Validation error on {file}: {e}")
|
|
149
|
-
continue
|
|
150
|
-
logger.info("Completed Grype processing.")
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
def move_all_files(file_collection: List[Union[Path, str]], destination: Union[Path, str]) -> None:
|
|
154
|
-
"""
|
|
155
|
-
Move all Grype files in the current directory to a folder called 'processed'.
|
|
156
|
-
|
|
157
|
-
:param List[Union[Path, str]] file_collection: A list of file paths or S3 URIs
|
|
158
|
-
:param Union[Path, str] destination: The destination folder
|
|
159
|
-
:rtype: None
|
|
160
|
-
"""
|
|
161
|
-
for file in iterate_files(file_collection):
|
|
162
|
-
file_path = Path(file)
|
|
163
|
-
new_filename = f"{file_path.stem}{file_path.suffix}"
|
|
164
|
-
new_file_path = Path(destination) / new_filename
|
|
165
|
-
move_file(file, new_file_path)
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
This module contains the Click commands for the opentext integration.
|
|
3
|
-
"""
|
|
4
|
-
|
|
5
|
-
# pylint: disable=W0621
|
|
6
|
-
|
|
7
|
-
from datetime import datetime
|
|
8
|
-
from os import PathLike
|
|
9
|
-
from typing import Optional
|
|
10
|
-
|
|
11
|
-
import click
|
|
12
|
-
from pathlib import Path
|
|
13
|
-
|
|
14
|
-
from regscale.integrations.commercial.opentext.scanner import WebInspect
|
|
15
|
-
from regscale.models.integration_models.flat_file_importer import FlatFileImporter
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
@click.group()
|
|
19
|
-
def fortify():
|
|
20
|
-
"""Performs actions on the OpenText Fortify"""
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
@fortify.group(name="web_inspect")
|
|
24
|
-
def web_inspect():
|
|
25
|
-
"""Performs actions on the OpenText Web Inspect files."""
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
@web_inspect.command(name="import_file")
|
|
29
|
-
@FlatFileImporter.common_scanner_options(
|
|
30
|
-
message="File path to the folder containing Fortify WebInspect .xml files to process to RegScale.",
|
|
31
|
-
prompt="File path for Web Inspect files",
|
|
32
|
-
import_name="web_inspect",
|
|
33
|
-
)
|
|
34
|
-
def import_file(
|
|
35
|
-
folder_path: PathLike[str],
|
|
36
|
-
regscale_ssp_id: int,
|
|
37
|
-
scan_date: datetime,
|
|
38
|
-
mappings_path: Path,
|
|
39
|
-
disable_mapping: bool,
|
|
40
|
-
s3_bucket: str,
|
|
41
|
-
s3_prefix: str,
|
|
42
|
-
aws_profile: str,
|
|
43
|
-
upload_file: bool,
|
|
44
|
-
):
|
|
45
|
-
"""
|
|
46
|
-
Import and process a folder of Fortify WebInspect XML file(s).
|
|
47
|
-
"""
|
|
48
|
-
import_opentext_file(
|
|
49
|
-
folder_path=folder_path,
|
|
50
|
-
regscale_ssp_id=regscale_ssp_id,
|
|
51
|
-
scan_date=scan_date,
|
|
52
|
-
mappings_path=mappings_path,
|
|
53
|
-
disable_mapping=disable_mapping,
|
|
54
|
-
s3_bucket=s3_bucket,
|
|
55
|
-
s3_prefix=s3_prefix,
|
|
56
|
-
aws_profile=aws_profile,
|
|
57
|
-
upload_file=upload_file,
|
|
58
|
-
)
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
def import_opentext_file(
|
|
62
|
-
folder_path: PathLike[str],
|
|
63
|
-
regscale_ssp_id: int,
|
|
64
|
-
scan_date: datetime,
|
|
65
|
-
mappings_path: Optional[Path] = None,
|
|
66
|
-
disable_mapping: Optional[bool] = False,
|
|
67
|
-
s3_bucket: Optional[str] = None,
|
|
68
|
-
s3_prefix: Optional[str] = None,
|
|
69
|
-
aws_profile: Optional[str] = None,
|
|
70
|
-
upload_file: Optional[bool] = True,
|
|
71
|
-
) -> None:
|
|
72
|
-
"""
|
|
73
|
-
Import and process a folder of Fortify WebInspect XML file(s).
|
|
74
|
-
|
|
75
|
-
:param click.Path folder_path: The Path to a folder of XML file(s) to import
|
|
76
|
-
:param int regscale_ssp_id: RegScale SSP ID
|
|
77
|
-
:param datetime scan_date: The date of the scan
|
|
78
|
-
:param Optional[Path] mappings_path: Path to the header mapping file, default: None
|
|
79
|
-
:param Optional[bool] disable_mapping: Disable the header mapping, default: False
|
|
80
|
-
:param Optional[str] s3_bucket: S3 bucket to download scan files from, default: None
|
|
81
|
-
:param Optional[str] s3_prefix: Prefix (folder path) within the S3 bucket, default: None
|
|
82
|
-
:param Optional[str] aws_profile: AWS profile to use for S3 access, default: None
|
|
83
|
-
:param Optional[bool] upload_file: Whether to upload the file to RegScale after processing, default: True
|
|
84
|
-
:return: None
|
|
85
|
-
"""
|
|
86
|
-
FlatFileImporter.import_files(
|
|
87
|
-
import_type=WebInspect,
|
|
88
|
-
import_name="Web Inspect",
|
|
89
|
-
file_types=".xml",
|
|
90
|
-
folder_path=folder_path,
|
|
91
|
-
regscale_ssp_id=regscale_ssp_id,
|
|
92
|
-
scan_date=scan_date,
|
|
93
|
-
mappings_path=mappings_path,
|
|
94
|
-
disable_mapping=disable_mapping,
|
|
95
|
-
s3_bucket=s3_bucket,
|
|
96
|
-
s3_prefix=s3_prefix,
|
|
97
|
-
aws_profile=aws_profile,
|
|
98
|
-
upload_file=upload_file,
|
|
99
|
-
)
|