boman-cli 2.5.9__tar.gz → 2.5.10__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.10
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.10
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.10'
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)
@@ -1253,6 +1259,7 @@ def default():
1253
1259
  parser.add_argument('-semgrep_token','--semgrepToken',default='No',help="Pass the semgrep community token here")
1254
1260
  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
1261
  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 ")
1262
+ parser.add_argument('-std','--setCacheDir',default=False,help="Set the cache directory for the scan. Set true if you use jenkins cicd")
1256
1263
  args = parser.parse_args()
1257
1264
 
1258
1265
  # if len(sys.args) == 1:
@@ -1274,6 +1281,11 @@ def default():
1274
1281
  else:
1275
1282
  ###logging.info('jenkins is not choosen')
1276
1283
  Config.jenkins = 'no'
1284
+
1285
+ if args.setCacheDir:
1286
+ Config.set_cache_dir = True
1287
+ else:
1288
+ Config.set_cache_dir = False
1277
1289
 
1278
1290
  # lingu user id set
1279
1291
  if args.semgrepToken == 'No':
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  environment = prod
3
- version = 2.5.9
3
+ version = 2.5.10
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