boman-cli 2.5.9__tar.gz → 2.5.11__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.
- {boman_cli-2.5.9 → boman_cli-2.5.11}/PKG-INFO +1 -1
- {boman_cli-2.5.9 → boman_cli-2.5.11}/boman_cli.egg-info/PKG-INFO +1 -1
- {boman_cli-2.5.9 → boman_cli-2.5.11}/bomancli/Config.py +3 -2
- {boman_cli-2.5.9 → boman_cli-2.5.11}/bomancli/main.py +15 -2
- {boman_cli-2.5.9 → boman_cli-2.5.11}/setup.cfg +1 -1
- {boman_cli-2.5.9 → boman_cli-2.5.11}/README.md +0 -0
- {boman_cli-2.5.9 → boman_cli-2.5.11}/boman_cli.egg-info/SOURCES.txt +0 -0
- {boman_cli-2.5.9 → boman_cli-2.5.11}/boman_cli.egg-info/dependency_links.txt +0 -0
- {boman_cli-2.5.9 → boman_cli-2.5.11}/boman_cli.egg-info/entry_points.txt +0 -0
- {boman_cli-2.5.9 → boman_cli-2.5.11}/boman_cli.egg-info/requires.txt +0 -0
- {boman_cli-2.5.9 → boman_cli-2.5.11}/boman_cli.egg-info/top_level.txt +0 -0
- {boman_cli-2.5.9 → boman_cli-2.5.11}/bomancli/_init_.py +0 -0
- {boman_cli-2.5.9 → boman_cli-2.5.11}/bomancli/auth.py +0 -0
- {boman_cli-2.5.9 → boman_cli-2.5.11}/bomancli/base_logger.py +0 -0
- {boman_cli-2.5.9 → boman_cli-2.5.11}/bomancli/dev_attribution.py +0 -0
- {boman_cli-2.5.9 → boman_cli-2.5.11}/bomancli/loc_finder.py +0 -0
- {boman_cli-2.5.9 → boman_cli-2.5.11}/bomancli/sbom_enricher.py +0 -0
- {boman_cli-2.5.9 → boman_cli-2.5.11}/bomancli/templates/template_plan.yaml +0 -0
- {boman_cli-2.5.9 → boman_cli-2.5.11}/bomancli/utils.py +0 -0
- {boman_cli-2.5.9 → boman_cli-2.5.11}/bomancli/validation.py +0 -0
- {boman_cli-2.5.9 → boman_cli-2.5.11}/setup.py +0 -0
|
@@ -121,7 +121,7 @@ class Config:
|
|
|
121
121
|
|
|
122
122
|
log_level = "INFO"
|
|
123
123
|
|
|
124
|
-
version = '
|
|
124
|
+
version = 'v2.5.11'
|
|
125
125
|
|
|
126
126
|
boman_config_file = 'boman.yaml'
|
|
127
127
|
|
|
@@ -167,7 +167,8 @@ class Config:
|
|
|
167
167
|
sbom_scan_status=None
|
|
168
168
|
sbom_target=None
|
|
169
169
|
sbom_output_file=None
|
|
170
|
-
|
|
170
|
+
set_cache_dir = False
|
|
171
|
+
cache_dir = " --cache-dir /tmp/.trivycache"
|
|
171
172
|
#IAC scanning
|
|
172
173
|
iac_scan_present=None
|
|
173
174
|
iac_scan_build_dir=None
|
|
@@ -554,7 +554,13 @@ def runImage(data=None,type=None):
|
|
|
554
554
|
|
|
555
555
|
try:
|
|
556
556
|
Config.build_dir = Config.sbom_build_dir = os.getcwd()+'/'
|
|
557
|
+
command_line = "--format cyclonedx --output /src/boman_trivy_sbom_scan.json --scanners vuln fs /{target}"
|
|
557
558
|
command_line = "% s" % command_line.format(target = 'src/')
|
|
559
|
+
#added upon jenkins sbom issue - GM
|
|
560
|
+
if Config.set_cache_dir:
|
|
561
|
+
command_line = command_line + Config.cache_dir
|
|
562
|
+
logging.info('SBOM Docker: Cache directory is set for the scan, updated command is %s',command_line[-20:])
|
|
563
|
+
logging.info(f"SBOM Docker: command ==> {command_line[-20:]}")
|
|
558
564
|
container_output = docker.containers.run(docker_image, command_line, volumes={Config.sbom_build_dir: {
|
|
559
565
|
'bind': data['bind']}}, user=uid, remove=True)
|
|
560
566
|
logging.info('SBOM Docker: SUCCESS!!! Message: %s Scan Completed',tool_name)
|
|
@@ -714,13 +720,14 @@ def runImage(data=None,type=None):
|
|
|
714
720
|
Config.reachability_status ='Completed'
|
|
715
721
|
except errors.ContainerError as exc:
|
|
716
722
|
logging.error('Reachability Docker: Failed!!! Message: Some Error recorded while scanning %s',str(exc))
|
|
717
|
-
msg='\n The following error has been recorded while scanning
|
|
723
|
+
msg='\n The following error has been recorded while scanning Reachability'
|
|
718
724
|
Config.reachability_status ='Failed'
|
|
719
725
|
Config.reachability_errors =f'{str(exc)}]'
|
|
720
726
|
Utils.logError(msg,str(exc))
|
|
727
|
+
reachables = None
|
|
721
728
|
|
|
722
729
|
try:
|
|
723
|
-
if will_generate_output == 1:
|
|
730
|
+
if will_generate_output == 1 and reachables is not None:
|
|
724
731
|
logging.info('Reachability: Uploading %s to the server',output_file)
|
|
725
732
|
output_reachability = {
|
|
726
733
|
'output_file': output_file,
|
|
@@ -1253,6 +1260,7 @@ def default():
|
|
|
1253
1260
|
parser.add_argument('-semgrep_token','--semgrepToken',default='No',help="Pass the semgrep community token here")
|
|
1254
1261
|
parser.add_argument('-pot','--pollTime',default=60,help="Polling Time. Min : 30s, Max: 5min, Default : 1min. Format: input the time in seconds eg: 1min => 60 ")
|
|
1255
1262
|
parser.add_argument('-pof','--pollFrequency',default=10,help="Polling Frequency. Min : 5s, Max: 1min, Default : 10s. Format: input the time in seconds eg: 1min => 60 ")
|
|
1263
|
+
parser.add_argument('-std','--setCacheDir',default=False,help="Set the cache directory for the scan. Set true if you use jenkins cicd")
|
|
1256
1264
|
args = parser.parse_args()
|
|
1257
1265
|
|
|
1258
1266
|
# if len(sys.args) == 1:
|
|
@@ -1274,6 +1282,11 @@ def default():
|
|
|
1274
1282
|
else:
|
|
1275
1283
|
###logging.info('jenkins is not choosen')
|
|
1276
1284
|
Config.jenkins = 'no'
|
|
1285
|
+
|
|
1286
|
+
if args.setCacheDir:
|
|
1287
|
+
Config.set_cache_dir = True
|
|
1288
|
+
else:
|
|
1289
|
+
Config.set_cache_dir = False
|
|
1277
1290
|
|
|
1278
1291
|
# lingu user id set
|
|
1279
1292
|
if args.semgrepToken == 'No':
|
|
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
|