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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: boman-cli
3
- Version: 2.5.9
3
+ Version: 2.5.11
4
4
  Summary: CLI tool of boman.ai
5
5
  Home-page: https://boman.ai
6
6
  Author: Sumeru Software Solutions Pvt. Ltd.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: boman-cli
3
- Version: 2.5.9
3
+ Version: 2.5.11
4
4
  Summary: CLI tool of boman.ai
5
5
  Home-page: https://boman.ai
6
6
  Author: Sumeru Software Solutions Pvt. Ltd.
@@ -121,7 +121,7 @@ class Config:
121
121
 
122
122
  log_level = "INFO"
123
123
 
124
- version = 'v15.6.10'
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 IaC'
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':
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  environment = prod
3
- version = 2.5.9
3
+ version = 2.5.11
4
4
  name = boman-cli
5
5
  saas_base_url = https://dashboard.boman.ai/
6
6
 
File without changes
File without changes
File without changes
File without changes
File without changes