boman-cli 2.5.8__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.
- {boman_cli-2.5.8 → boman_cli-2.5.10}/PKG-INFO +9 -4
- {boman_cli-2.5.8 → boman_cli-2.5.10}/README.md +8 -3
- {boman_cli-2.5.8 → boman_cli-2.5.10}/boman_cli.egg-info/PKG-INFO +9 -4
- {boman_cli-2.5.8 → boman_cli-2.5.10}/bomancli/Config.py +3 -2
- {boman_cli-2.5.8 → boman_cli-2.5.10}/bomancli/main.py +30 -8
- {boman_cli-2.5.8 → boman_cli-2.5.10}/bomancli/sbom_enricher.py +10 -9
- {boman_cli-2.5.8 → boman_cli-2.5.10}/bomancli/utils.py +2 -2
- {boman_cli-2.5.8 → boman_cli-2.5.10}/setup.cfg +1 -1
- {boman_cli-2.5.8 → boman_cli-2.5.10}/boman_cli.egg-info/SOURCES.txt +0 -0
- {boman_cli-2.5.8 → boman_cli-2.5.10}/boman_cli.egg-info/dependency_links.txt +0 -0
- {boman_cli-2.5.8 → boman_cli-2.5.10}/boman_cli.egg-info/entry_points.txt +0 -0
- {boman_cli-2.5.8 → boman_cli-2.5.10}/boman_cli.egg-info/requires.txt +0 -0
- {boman_cli-2.5.8 → boman_cli-2.5.10}/boman_cli.egg-info/top_level.txt +0 -0
- {boman_cli-2.5.8 → boman_cli-2.5.10}/bomancli/_init_.py +0 -0
- {boman_cli-2.5.8 → boman_cli-2.5.10}/bomancli/auth.py +0 -0
- {boman_cli-2.5.8 → boman_cli-2.5.10}/bomancli/base_logger.py +0 -0
- {boman_cli-2.5.8 → boman_cli-2.5.10}/bomancli/dev_attribution.py +0 -0
- {boman_cli-2.5.8 → boman_cli-2.5.10}/bomancli/loc_finder.py +0 -0
- {boman_cli-2.5.8 → boman_cli-2.5.10}/bomancli/templates/template_plan.yaml +0 -0
- {boman_cli-2.5.8 → boman_cli-2.5.10}/bomancli/validation.py +0 -0
- {boman_cli-2.5.8 → boman_cli-2.5.10}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: boman-cli
|
|
3
|
-
Version: 2.5.
|
|
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.
|
|
@@ -112,11 +112,16 @@ Example: boman-cli -a run -zap_session_script ./session.js
|
|
|
112
112
|
|
|
113
113
|
### Release Note:
|
|
114
114
|
|
|
115
|
-
### 2.5.
|
|
116
|
-
- **SBOM API BUg** -
|
|
115
|
+
### 2.5.9
|
|
116
|
+
- **SBOM API BUg** - New Feature. Additional sbom columns were added
|
|
117
|
+
|
|
118
|
+
### 2.5.8
|
|
119
|
+
|
|
120
|
+
- SBOM API BUg - Bug Fix. Added exception handling in the SBOM API.
|
|
117
121
|
|
|
118
122
|
### 2.5.6
|
|
119
|
-
|
|
123
|
+
|
|
124
|
+
- Bitbucket Bug fix - Bug Fix. Reachability scan bug fix in bitbucket env.
|
|
120
125
|
|
|
121
126
|
### 2.5.5
|
|
122
127
|
- **CLOC** - New feature. CLI will now generate lines of code of the repo and push it to SaaS.
|
|
@@ -81,11 +81,16 @@ Example: boman-cli -a run -zap_session_script ./session.js
|
|
|
81
81
|
|
|
82
82
|
### Release Note:
|
|
83
83
|
|
|
84
|
-
### 2.5.
|
|
85
|
-
- **SBOM API BUg** -
|
|
84
|
+
### 2.5.9
|
|
85
|
+
- **SBOM API BUg** - New Feature. Additional sbom columns were added
|
|
86
|
+
|
|
87
|
+
### 2.5.8
|
|
88
|
+
|
|
89
|
+
- SBOM API BUg - Bug Fix. Added exception handling in the SBOM API.
|
|
86
90
|
|
|
87
91
|
### 2.5.6
|
|
88
|
-
|
|
92
|
+
|
|
93
|
+
- Bitbucket Bug fix - Bug Fix. Reachability scan bug fix in bitbucket env.
|
|
89
94
|
|
|
90
95
|
### 2.5.5
|
|
91
96
|
- **CLOC** - New feature. CLI will now generate lines of code of the repo and push it to SaaS.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: boman-cli
|
|
3
|
-
Version: 2.5.
|
|
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.
|
|
@@ -112,11 +112,16 @@ Example: boman-cli -a run -zap_session_script ./session.js
|
|
|
112
112
|
|
|
113
113
|
### Release Note:
|
|
114
114
|
|
|
115
|
-
### 2.5.
|
|
116
|
-
- **SBOM API BUg** -
|
|
115
|
+
### 2.5.9
|
|
116
|
+
- **SBOM API BUg** - New Feature. Additional sbom columns were added
|
|
117
|
+
|
|
118
|
+
### 2.5.8
|
|
119
|
+
|
|
120
|
+
- SBOM API BUg - Bug Fix. Added exception handling in the SBOM API.
|
|
117
121
|
|
|
118
122
|
### 2.5.6
|
|
119
|
-
|
|
123
|
+
|
|
124
|
+
- Bitbucket Bug fix - Bug Fix. Reachability scan bug fix in bitbucket env.
|
|
120
125
|
|
|
121
126
|
### 2.5.5
|
|
122
127
|
- **CLOC** - New feature. CLI will now generate lines of code of the repo and push it to SaaS.
|
|
@@ -121,7 +121,7 @@ class Config:
|
|
|
121
121
|
|
|
122
122
|
log_level = "INFO"
|
|
123
123
|
|
|
124
|
-
version = 'v2.5.
|
|
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)
|
|
@@ -564,44 +570,53 @@ def runImage(data=None,type=None):
|
|
|
564
570
|
##running reachability before sbom upload
|
|
565
571
|
|
|
566
572
|
|
|
567
|
-
#this part i removed since, reachabitlity bug has
|
|
573
|
+
#this part i removed since, reachabitlity bug has tobe solved later
|
|
568
574
|
|
|
569
575
|
#### sbom entrich part starts here
|
|
570
576
|
|
|
571
577
|
|
|
572
578
|
# Load SBOM (generated by Trivy or Syft)
|
|
579
|
+
# Load SBOM (generated by Trivy or Syft)
|
|
573
580
|
enricher = SBOMEnricher(Config.sbom_output_file)
|
|
574
581
|
|
|
575
582
|
# Enrich with additional fields
|
|
576
583
|
enriched_data = enricher.enrich_components()
|
|
577
584
|
|
|
578
585
|
# Save final SBOM
|
|
579
|
-
enricher.save_sbom(
|
|
580
|
-
|
|
586
|
+
enricher.save_sbom('sbom_enriched.json')
|
|
581
587
|
|
|
588
|
+
#print(Config.sbom_output_file)
|
|
582
589
|
|
|
590
|
+
|
|
583
591
|
output_file = 'sbom_enriched.json'
|
|
592
|
+
|
|
593
|
+
logging.info('Enrichment done %s',output_file)
|
|
594
|
+
|
|
595
|
+
|
|
596
|
+
|
|
597
|
+
sbom_output_file = output_file
|
|
584
598
|
csv_file = Config.hssc_output_file
|
|
585
599
|
#generating sbom more data
|
|
586
600
|
|
|
587
601
|
|
|
588
602
|
#i should run the heisenger
|
|
589
603
|
|
|
590
|
-
logging.info('Running
|
|
604
|
+
logging.info('Running SSC check on the repo')
|
|
591
605
|
|
|
592
606
|
|
|
593
607
|
|
|
594
608
|
try:
|
|
595
|
-
Utils.runheisenberg(
|
|
609
|
+
Utils.runheisenberg(sbom_output_file) #docker of hsc
|
|
596
610
|
except e:
|
|
597
611
|
logging.info('Some error occured while Running HSC on the repo')
|
|
598
612
|
exit(6)
|
|
599
613
|
|
|
600
614
|
logging.info('Enrichment with more data is going to happen %s',Config.sbom_output_file)
|
|
601
615
|
|
|
602
|
-
enricher.run_heisenberg(
|
|
616
|
+
enricher.run_heisenberg(sbom_output_file, csv_file)
|
|
603
617
|
|
|
604
618
|
logging.info('Enrichment done %s',Config.sbom_output_file)
|
|
619
|
+
##exit(-1)
|
|
605
620
|
|
|
606
621
|
except errors.ContainerError as exc:
|
|
607
622
|
logging.error('SBOM Docker: Failed!!! Message: Some Error recorded while scanning %s',str(exc))
|
|
@@ -683,7 +698,6 @@ def runImage(data=None,type=None):
|
|
|
683
698
|
logging.info('Running %s',tool_name)
|
|
684
699
|
|
|
685
700
|
try:
|
|
686
|
-
|
|
687
701
|
workspace = os.getcwd()
|
|
688
702
|
|
|
689
703
|
tmp_dir = os.path.join(workspace, ".ci_tmp")
|
|
@@ -693,6 +707,7 @@ def runImage(data=None,type=None):
|
|
|
693
707
|
os.makedirs(home_dir, exist_ok=True)
|
|
694
708
|
|
|
695
709
|
command_line = "% s" % command_line.format(lang = Config.reachability_language)
|
|
710
|
+
#command_line ="atom reachables -l python -o /app/app.atom -s /app/reachables.slices.json /app"
|
|
696
711
|
Config.build_dir = Config.reachability_build_dir = Config.sca_build_dir
|
|
697
712
|
container_output = docker.containers.run(docker_image, command_line, volumes={
|
|
698
713
|
tmp_dir: {'bind': '/tmp', 'mode': 'rw'},
|
|
@@ -821,8 +836,9 @@ def uploadReport(filename,toolname,tool_id,scan_details_id,type):
|
|
|
821
836
|
logging.info('Removing the result file')
|
|
822
837
|
if type != "sbom" and type != "reachability":
|
|
823
838
|
logging.info("remvoing file here")
|
|
824
|
-
|
|
839
|
+
os.remove(path)
|
|
825
840
|
elif Config.reachability_present is not True and type == 'sbom':
|
|
841
|
+
#print('dmdmd')
|
|
826
842
|
os.remove(path)
|
|
827
843
|
elif type == "reachability":
|
|
828
844
|
os.remove(path)
|
|
@@ -1243,6 +1259,7 @@ def default():
|
|
|
1243
1259
|
parser.add_argument('-semgrep_token','--semgrepToken',default='No',help="Pass the semgrep community token here")
|
|
1244
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 ")
|
|
1245
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")
|
|
1246
1263
|
args = parser.parse_args()
|
|
1247
1264
|
|
|
1248
1265
|
# if len(sys.args) == 1:
|
|
@@ -1264,6 +1281,11 @@ def default():
|
|
|
1264
1281
|
else:
|
|
1265
1282
|
###logging.info('jenkins is not choosen')
|
|
1266
1283
|
Config.jenkins = 'no'
|
|
1284
|
+
|
|
1285
|
+
if args.setCacheDir:
|
|
1286
|
+
Config.set_cache_dir = True
|
|
1287
|
+
else:
|
|
1288
|
+
Config.set_cache_dir = False
|
|
1267
1289
|
|
|
1268
1290
|
# lingu user id set
|
|
1269
1291
|
if args.semgrepToken == 'No':
|
|
@@ -830,6 +830,7 @@ class SBOMEnricher:
|
|
|
830
830
|
links = ver_data.get("links", [])
|
|
831
831
|
repo_url = next((l.get("url") for l in links if l.get("label") in ["SOURCE_REPO", "HOMEPAGE"]), "")
|
|
832
832
|
|
|
833
|
+
#print(f'advisores are: {advisories}')
|
|
833
834
|
return {
|
|
834
835
|
"current_version": version,
|
|
835
836
|
"latest_version": latest,
|
|
@@ -838,7 +839,7 @@ class SBOMEnricher:
|
|
|
838
839
|
"license": licenses[0] if licenses else "Unknown",
|
|
839
840
|
"update_available": update_av,
|
|
840
841
|
"versions_behind": behind,
|
|
841
|
-
"security_advisories":
|
|
842
|
+
"security_advisories": ", ".join(item['id'] for item in advisories),
|
|
842
843
|
"security_score": "HIGH" if len(advisories) > 5 else "MEDIUM" if len(advisories) > 0 else "LOW",
|
|
843
844
|
"other_references": self.extract_links(ver_data)
|
|
844
845
|
}
|
|
@@ -859,7 +860,7 @@ class SBOMEnricher:
|
|
|
859
860
|
component["benign"] = True
|
|
860
861
|
component["usage"] = {
|
|
861
862
|
"used": self.safe_int(row.get("dependents", 0)) > 0,
|
|
862
|
-
"reachable":
|
|
863
|
+
"reachable": False #default is false
|
|
863
864
|
}
|
|
864
865
|
component["heisenberg"] = {
|
|
865
866
|
"update_available": row.get("deprecated", "false").lower() == "true",
|
|
@@ -874,21 +875,21 @@ class SBOMEnricher:
|
|
|
874
875
|
"""Maps API data fields to component structure."""
|
|
875
876
|
component["source_repo"] = api_data["repo_url"]
|
|
876
877
|
component["repo_metadata"] = {
|
|
877
|
-
"stars":
|
|
878
|
-
"forks":
|
|
879
|
-
"open_issues":
|
|
878
|
+
"stars":None,
|
|
879
|
+
"forks":None ,
|
|
880
|
+
"open_issues": None,
|
|
880
881
|
"license": api_data["license"]
|
|
881
882
|
}
|
|
882
|
-
component["malicious"] =
|
|
883
|
-
component["benign"] =
|
|
883
|
+
component["malicious"] = '-'
|
|
884
|
+
component["benign"] = '-'
|
|
884
885
|
component["usage"] = {"used": True, "reachable": True}
|
|
885
886
|
component["heisenberg"] = {
|
|
886
887
|
"current_version": api_data["current_version"],
|
|
887
888
|
"latest_version": api_data["latest_version"],
|
|
888
889
|
"latest_version_by_date": api_data["latest_version_by_date"],
|
|
889
890
|
"update_available": api_data["update_available"],
|
|
890
|
-
"maintained_score":
|
|
891
|
-
"popular_score":
|
|
891
|
+
"maintained_score": None,
|
|
892
|
+
"popular_score": None,
|
|
892
893
|
"versions_behind": api_data["versions_behind"],
|
|
893
894
|
"security_score": api_data["security_score"],
|
|
894
895
|
"security_advisories": api_data["security_advisories"],
|
|
@@ -1244,11 +1244,11 @@ def runheisenberg(sbom_file_path):
|
|
|
1244
1244
|
sbom_path = Config.sbom_build_dir+'/'+sbom_file_path
|
|
1245
1245
|
hsc_path = Config.sbom_build_dir+'/'+Config.hssc_output_file
|
|
1246
1246
|
|
|
1247
|
-
logging.info('running the
|
|
1247
|
+
logging.info('running the SSC for %s and %s',sbom_path,hsc_path)
|
|
1248
1248
|
|
|
1249
1249
|
command_line = f"vendor --sbom-file {sbom_path} -o {hsc_path}"
|
|
1250
1250
|
tool_name ='HSC'
|
|
1251
|
-
logging.info('Preparing the
|
|
1251
|
+
logging.info('Preparing the SSC tool')
|
|
1252
1252
|
try:
|
|
1253
1253
|
|
|
1254
1254
|
logging.info('HSC Docker: Preparing %s scan for jenkins env with %s user ', tool_name , userid)
|
|
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
|