boman-cli 2.4.4__tar.gz → 2.4.6__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,22 +1,17 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: boman-cli
3
- Version: 2.4.4
3
+ Version: 2.4.6
4
4
  Summary: CLI tool of boman.ai
5
5
  Home-page: https://boman.ai
6
6
  Author: Sumeru Software Solutions Pvt. Ltd.
7
7
  Author-email: support@boman.ai
8
8
  License: BSD 2-clause
9
+ Platform: UNKNOWN
9
10
  Classifier: Development Status :: 5 - Production/Stable
10
11
  Classifier: Intended Audience :: Developers
11
12
  Classifier: License :: OSI Approved :: BSD License
12
13
  Classifier: Operating System :: OS Independent
13
14
  Description-Content-Type: text/markdown
14
- Requires-Dist: docker<=7.0.0
15
- Requires-Dist: requests<=2.31.0
16
- Requires-Dist: pyyaml
17
- Requires-Dist: coloredlogs<=15.0.1
18
- Requires-Dist: xmltodict<=0.13.0
19
- Requires-Dist: pyfiglet<=1.0.2
20
15
 
21
16
  # Introduction
22
17
  Boman CLI is a Orchestration script written in python to run security scans on the local or CI/CD environment and upload the results to Boman.ai SaaS server.
@@ -80,6 +75,13 @@ Example: boman-cli -a run -config ./customboman.yaml
80
75
  Example: boman-cli -a run -zap_session_script ./session.js
81
76
 
82
77
 
78
+ ### To pass semgrep api token, pass it with -semgrep_token
79
+
80
+ `boman-cli -a run -semgrep_token <value>`
81
+
82
+
83
+
84
+
83
85
  # Error codes
84
86
 
85
87
  0 : Successfull scan
@@ -93,6 +95,13 @@ Example: boman-cli -a run -zap_session_script ./session.js
93
95
 
94
96
  ### Release Note:
95
97
 
98
+
99
+ ### V2.4.6
100
+ - **New:** Semgrep API integration. Pass the semgrpe token as -semgrep_token {value}.
101
+
102
+ ### V2.4.5
103
+ - **New:** Snyk API integration. Navigate to **Integrations -> Snyk** in the Boman SaaS to setup Snyk.
104
+
96
105
  ### V2.4.4
97
106
  - Minor bug fix + V2.4.3
98
107
 
@@ -154,3 +163,5 @@ Released on: 21 May 2024
154
163
 
155
164
 
156
165
 
166
+
167
+
@@ -60,6 +60,13 @@ Example: boman-cli -a run -config ./customboman.yaml
60
60
  Example: boman-cli -a run -zap_session_script ./session.js
61
61
 
62
62
 
63
+ ### To pass semgrep api token, pass it with -semgrep_token
64
+
65
+ `boman-cli -a run -semgrep_token <value>`
66
+
67
+
68
+
69
+
63
70
  # Error codes
64
71
 
65
72
  0 : Successfull scan
@@ -73,6 +80,13 @@ Example: boman-cli -a run -zap_session_script ./session.js
73
80
 
74
81
  ### Release Note:
75
82
 
83
+
84
+ ### V2.4.6
85
+ - **New:** Semgrep API integration. Pass the semgrpe token as -semgrep_token {value}.
86
+
87
+ ### V2.4.5
88
+ - **New:** Snyk API integration. Navigate to **Integrations -> Snyk** in the Boman SaaS to setup Snyk.
89
+
76
90
  ### V2.4.4
77
91
  - Minor bug fix + V2.4.3
78
92
 
@@ -1,22 +1,17 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: boman-cli
3
- Version: 2.4.4
3
+ Version: 2.4.6
4
4
  Summary: CLI tool of boman.ai
5
5
  Home-page: https://boman.ai
6
6
  Author: Sumeru Software Solutions Pvt. Ltd.
7
7
  Author-email: support@boman.ai
8
8
  License: BSD 2-clause
9
+ Platform: UNKNOWN
9
10
  Classifier: Development Status :: 5 - Production/Stable
10
11
  Classifier: Intended Audience :: Developers
11
12
  Classifier: License :: OSI Approved :: BSD License
12
13
  Classifier: Operating System :: OS Independent
13
14
  Description-Content-Type: text/markdown
14
- Requires-Dist: docker<=7.0.0
15
- Requires-Dist: requests<=2.31.0
16
- Requires-Dist: pyyaml
17
- Requires-Dist: coloredlogs<=15.0.1
18
- Requires-Dist: xmltodict<=0.13.0
19
- Requires-Dist: pyfiglet<=1.0.2
20
15
 
21
16
  # Introduction
22
17
  Boman CLI is a Orchestration script written in python to run security scans on the local or CI/CD environment and upload the results to Boman.ai SaaS server.
@@ -80,6 +75,13 @@ Example: boman-cli -a run -config ./customboman.yaml
80
75
  Example: boman-cli -a run -zap_session_script ./session.js
81
76
 
82
77
 
78
+ ### To pass semgrep api token, pass it with -semgrep_token
79
+
80
+ `boman-cli -a run -semgrep_token <value>`
81
+
82
+
83
+
84
+
83
85
  # Error codes
84
86
 
85
87
  0 : Successfull scan
@@ -93,6 +95,13 @@ Example: boman-cli -a run -zap_session_script ./session.js
93
95
 
94
96
  ### Release Note:
95
97
 
98
+
99
+ ### V2.4.6
100
+ - **New:** Semgrep API integration. Pass the semgrpe token as -semgrep_token {value}.
101
+
102
+ ### V2.4.5
103
+ - **New:** Snyk API integration. Navigate to **Integrations -> Snyk** in the Boman SaaS to setup Snyk.
104
+
96
105
  ### V2.4.4
97
106
  - Minor bug fix + V2.4.3
98
107
 
@@ -154,3 +163,5 @@ Released on: 21 May 2024
154
163
 
155
164
 
156
165
 
166
+
167
+
@@ -1,2 +1,3 @@
1
1
  [console_scripts]
2
2
  boman-cli = bomancli.main:default
3
+
@@ -120,7 +120,7 @@ class Config:
120
120
 
121
121
  log_level = "INFO"
122
122
 
123
- version = 'v2.4.4'
123
+ version = 'v2.4.6'
124
124
 
125
125
  boman_config_file = 'boman.yaml'
126
126
 
@@ -187,6 +187,6 @@ class Config:
187
187
  con_scan_configuration = None
188
188
  sbom_configuration = None
189
189
  iac_scan_configuration = None
190
-
190
+ semgrep_token = None
191
191
 
192
192
  dast_adv_auth_enabled = None
@@ -138,7 +138,7 @@ def authorize():
138
138
  logging.info("Authorization: Communicating with SaaS for Authorization")
139
139
  res = requests.post(url, json=data, headers=headers)
140
140
  #print('req:', json.dumps(data))
141
- logging.info('res: %s',json.loads(res.content))
141
+ # logging.info('res: %s',json.loads(res.content))
142
142
  except requests.ConnectionError:
143
143
  logging.error("Authorization: Failed!!! Message: Can't connect to the Server while authorizing, Please check your Internet connection.")
144
144
  exit(1) #server/saas error
@@ -36,7 +36,7 @@ parser = argparse.ArgumentParser(
36
36
  description='''
37
37
  #This is a CLI tool to communicate with Boman.ai SaaS server
38
38
  ''',
39
- epilog='copyright (c) 2024 SUMERU'
39
+ epilog='copyright (c) 2025 SUMERU'
40
40
  )
41
41
 
42
42
 
@@ -115,9 +115,13 @@ def runImage(data=None,type=None):
115
115
  # logging.info('environment var configured for the scan is not picked up by the cli')
116
116
  env = data['env']
117
117
  env_var = env.split(',')
118
- logging.info('Docker Run: environment var configured for the scan is %s',str(env_var))
118
+ logging.info('Docker Run: environment var configured for the scan is %s',Utils.masker(str(env_var)))
119
119
  except:
120
120
  env_var = ['test=test']
121
+ if Config.semgrep_token != None:
122
+ env_var.append(Config.semgrep_token)
123
+ logging.info('Docker Run: environment var configured for semgrep is is %s',Utils.masker(str(env_var)))
124
+
121
125
  logging.warning("Docker Run: environment var configuration failed or can't find the variables from sass")
122
126
 
123
127
 
@@ -130,8 +134,10 @@ def runImage(data=None,type=None):
130
134
  logging.error("SAST Configuration: Failed!!!. EXIT CODE:4(MISCONFIGURATION). Message: .bomanignore file was not found. Please check if you have '.bomanignore' file in the repository(Main Directory). As you have configured ignore files and folder")
131
135
  exit(4)
132
136
  target_file = Config.sast_target
137
+ docker_image = "semgrep/semgrep:latest"
133
138
  Utils.checkImageAlreadyExsist(docker_image)
134
139
 
140
+
135
141
  if (Config.sast_target is not None) and (Config.sast_target != "" ):
136
142
  Config.sast_build_dir = os.path.join(Config.sast_build_dir,Utils.remove_leading_slash(Config.sast_target))
137
143
 
@@ -571,30 +577,6 @@ def runImage(data=None,type=None):
571
577
  #### function to upload the test report to the server with other data -- MM ------------------------------------
572
578
  def uploadReport(filename,toolname,tool_id,scan_details_id,type):
573
579
 
574
- # if toolname.lower() == 'sonarcloud':
575
- # message = Config.sast_message
576
- # errors = Config.sast_errors
577
- # values = {'tool_name': toolname, 'time': time.time(),'scan_token':Config.scan_token, 'app_token':Config.app_token,'customer_token':Config.customer_token,'tool_id':tool_id,'scan_details_id':scan_details_id,"tool_results":None,"message":message,"errors":errors,"app_loc":Config.app_loc}
578
- # logging.info(values)
579
- # url = Config.boman_url+"/api/app/upload"
580
- # # with open(path) as f:
581
- # # file_obj = f
582
- # r = requests.post(url,json=values)
583
- # #print(r.status_code)
584
- # if r.status_code == 200:
585
- # logging.info('[COMPLETED]: %s Report uploaded Successfully! Report Name: %s',toolname,filename)
586
- # logging.info('Removing the result file')
587
- # os.remove(path)
588
- # return 1
589
- # elif r.status_code == 401 :
590
- # logging.error('Unauthorized Access while uploading the results. Please check the app/customer tokens')
591
- # exit(2) ## Auth error
592
- # else:
593
- # logging.error('Problem While uploading the results.')
594
- # logging.error('response code is %s',r.status_code)
595
- # return 0
596
-
597
-
598
580
  logging.info('Uploading %s report with filename: %s', toolname,filename)
599
581
  if True:
600
582
  #build_dir = '/home/boxuser/box/trainingdata/repos/youtube-dl/'
@@ -674,7 +656,7 @@ def uploadReport(filename,toolname,tool_id,scan_details_id,type):
674
656
  if r.status_code == 200:
675
657
  logging.info('[COMPLETED]: %s Report uploaded Successfully! Report Name: %s',toolname,filename)
676
658
  logging.info('Removing the result file')
677
- os.remove(path)
659
+ #os.remove(path)
678
660
  return 1
679
661
  elif r.status_code == 401 :
680
662
  logging.error('Unauthorized Access while uploading the results. Please check the app/customer tokens')
@@ -709,7 +691,7 @@ def initSecertScan(path,data):
709
691
 
710
692
 
711
693
  try:
712
- logging.info('Running Secert Scanning on the repository')
694
+ logging.info('Running Secret Scanning on the repository')
713
695
  container = Config.docker_client.containers.run(image_name, command_line_truffle, detach=True,volumes={build_dir: {
714
696
  'bind': bind_dir}})
715
697
  op = []
@@ -728,9 +710,11 @@ def initSecertScan(path,data):
728
710
  break
729
711
 
730
712
 
731
- logging.info('[SUCCESS]: Secert Scanning Completed ')
713
+ logging.info('[SUCCESS]: Secret Scanning Completed ')
732
714
  except errors.ContainerError as exc:
733
715
  Config.secret_scan_errors = str(exc)
716
+ Config.secret_scan_status ='Failed'
717
+ Config.secret_scan_message ='Error recorded while scanning Secret Scan'
734
718
  logging.error('Error Occured while running Trufflehog on the repository')
735
719
  logging.error('%s',str(exc))
736
720
  msg='\n The following error has been recorded while scanning Trufflehog'
@@ -880,14 +864,6 @@ def main():
880
864
  logging.warning('SAST: Configured with Sonar it will run on SaaS')
881
865
  Config.sast_scan_status = 'SUCCESS'
882
866
  Config.sast_message = f'SAST Scan: Success. Sonar is configured and will run on SaaS'
883
- # data = Config.sast_response[0]
884
- # tool_name =data['tool']
885
- # output_file= data['output_file']
886
- # tool_id= data['tool_id']
887
- # scan_details_id= data['scan_details_id']
888
- # if uploadReport(output_file,tool_name,tool_id,scan_details_id,'SAST'):
889
- # Config.sast_upload_status ='SuCCESS'
890
-
891
867
 
892
868
 
893
869
  else:
@@ -919,21 +895,26 @@ def main():
919
895
 
920
896
  else:
921
897
  logging.info('DAST: Ignoring scan. Message: Not Configured')
898
+
922
899
 
923
-
900
+
924
901
  if Config.sca_present is True:
925
- logging.info('SCA: Preparing scan')
926
-
927
-
928
- for data in Config.sca_response:
902
+ if Config.sca_response[0]['tool'] != "SNYK":
903
+ logging.info('SCA: Preparing scan')
929
904
 
930
- if data['scan_status'] == 2 :
931
- logging.info('SCA: No Configuration found from SaaS')
932
- logging.info('SCA: Ignoring Scan')
933
- else:
934
- runImage(data=data,type='SCA')
935
- logging.info("SCA: Successfull !!!")
936
905
 
906
+ for data in Config.sca_response:
907
+
908
+ if data['scan_status'] == 2 :
909
+ logging.info('SCA: No Configuration found from SaaS')
910
+ logging.info('SCA: Ignoring Scan')
911
+ else:
912
+ runImage(data=data,type='SCA')
913
+ logging.info("SCA: Successfull !!!")
914
+ else:
915
+ logging.warning('SCA: Configured with SNYK it will run on SaaS')
916
+ Config.sca_scan_status = 'SUCCESS'
917
+ Config.sca_message = f'SCA Scan: Success. SNYK is configured and will run on SaaS'
937
918
  else:
938
919
  logging.info('SCA: Ignoring scan. Message: Not Configured')
939
920
 
@@ -947,26 +928,39 @@ def main():
947
928
 
948
929
  else:
949
930
  logging.error('Secret Scan: Failed !!!. Message: The Directory is not Git directory %s',Config.sast_build_dir)
931
+ data=Config.secret_scan_response
932
+ tool_name = data[0]['tool']
933
+ file_name = data[0]['output_file']
934
+ tool_id = data[0]['tool_id']
935
+ scan_details_id = data[0]['scan_details_id']
936
+ uploadReport(file_name,tool_name,tool_id,scan_details_id,'SS')
950
937
  Config.secret_scan_status = 'Failed'
951
938
  Config.secret_scan_upload_status ='NA'
939
+ Config.secret_scan_errors = "Secret Scan: Failed !!!. Message: The Directory is not Git directory %s"
952
940
  Config.secret_scan_message = f'Secret Scan: Failed. The Directory is not Git directory {Config.sast_build_dir}'
953
941
  logging.warning('Secret Scan: Ignoring scan')
954
942
  else:
955
943
  logging.warning('Secret Scan: Ignoring scan. Message: Not Configured')
956
944
 
945
+
957
946
  if Config.con_scan_present is True:
958
- logging.info("Container Scan: Preparing scan")
959
-
960
- for data in Config.con_scan_response:
947
+ if Config.con_scan_response[0]['tool'] != "SNYK":
948
+ logging.info("Container Scan: Preparing scan")
949
+
950
+ for data in Config.con_scan_response:
961
951
 
962
- if data['scan_status'] == 2 :
963
- logging.info('Container Scan: No Configuration found from SaaS')
964
- logging.warning('Container Scan: Ignoring Scan')
965
- else:
966
- runImage(data=data,type='container_scan')
952
+ if data['scan_status'] == 2 :
953
+ logging.info('Container Scan: No Configuration found from SaaS')
954
+ logging.warning('Container Scan: Ignoring Scan')
955
+ else:
956
+ runImage(data=data,type='container_scan')
957
+ else:
958
+ logging.warning('Container Scan: Configured with SNYK it will run on SaaS')
959
+ Config.con_scan_status = 'SUCCESS'
960
+ Config.con_scan_message = f'Container Scan: Success. SNYK is configured and will run on SaaS'
967
961
  else:
968
962
  logging.warning('Container Scan: Ignoring scan. Message: Not Configured')
969
-
963
+
970
964
  if Config.sbom_present is True:
971
965
  logging.info("SBOM: Preparing requirements")
972
966
 
@@ -980,16 +974,22 @@ def main():
980
974
  else:
981
975
  logging.warning('SBOM: Ignoring. Message: Not Configured')
982
976
 
983
- if Config.iac_scan_present is True:
984
- logging.info("IaC: Preparing Scan")
985
977
 
986
- for data in Config.iac_scan_response:
978
+ if Config.iac_scan_present is True:
979
+ if Config.iac_scan_response[0]['tool'] != "SNYK":
980
+ logging.info("IaC: Preparing Scan")
981
+
982
+ for data in Config.iac_scan_response:
987
983
 
988
- if data['scan_status'] == 2 :
989
- logging.info('IaC: No Configuration found from SaaS')
990
- logging.warning('IaC: Ignoring Scan')
991
- else:
992
- runImage(data=data,type='iac')
984
+ if data['scan_status'] == 2 :
985
+ logging.info('IaC: No Configuration found from SaaS')
986
+ logging.warning('IaC: Ignoring Scan')
987
+ else:
988
+ runImage(data=data,type='iac')
989
+ else:
990
+ logging.warning('IaC: Configured with SNYK it will run on SaaS')
991
+ Config.iac_scan_status = 'SUCCESS'
992
+ Config.iac_scan_message = f'IaC Scan: Success. SNYK is configured and will run on SaaS'
993
993
  else:
994
994
  logging.warning('IaC: Ignoring scan. Message: Not Configured')
995
995
 
@@ -1012,6 +1012,7 @@ def default():
1012
1012
  parser.add_argument('-zap_plan','--zap_custom_plan',default='boman_zap_auth_plan.yaml',help="Pass the file name if you have any custom zap context plan. eg:custom-zap-plan.yaml")
1013
1013
  parser.add_argument('-zap_session_script','--zap_custom_session_script',default='session_management.js',help="Pass the file name if you have any custom zap session script file name. eg:custom-script.js")
1014
1014
  # parser.add_argument('-uid','--user_id',default='1000:1000',help="[internal] Pass the custom userid:groupid incase the lingu detec function is failed")
1015
+ parser.add_argument('-semgrep_token','--semgrepToken',default='No',help="Pass the semgrep community token here")
1015
1016
  args = parser.parse_args()
1016
1017
 
1017
1018
  # if len(sys.args) == 1:
@@ -1034,6 +1035,16 @@ def default():
1034
1035
  ###logging.info('jenkins is not choosen')
1035
1036
  Config.jenkins = 'no'
1036
1037
 
1038
+ # lingu user id set
1039
+ if args.semgrepToken == 'No':
1040
+ ##logging.info('jenkins is choosen')
1041
+ Config.semgrep_token = None
1042
+ else:
1043
+ ###logging.info('jenkins is not choosen')
1044
+ Config.semgrep_token = args.semgrepToken
1045
+
1046
+
1047
+
1037
1048
  ## lingu user id set
1038
1049
  # if args.user_id == '1000:1000':
1039
1050
  # ##logging.info('jenkins is choosen')
@@ -1,139 +1,139 @@
1
- ---
2
- env:
3
- contexts:
4
- - name: "Boman Authenticated Scan"
5
- urls:
6
- - "https://demo.testfire.net/"
7
- authentication:
8
- method: "form"
9
- parameters: # May include any required for scripts. All of the parameters support vars except for the port
10
- loginPageUrl: "https://demo.testfire.net/login.jsp"
11
- loginRequestUrl: "https://demo.testfire.net/doLogin"
12
- loginRequestBody: "uid={%username%}&passw={%password%}&btnSubmit=Login"
13
- verification:
14
- method: "both" # String, one of 'response', 'request', 'both', 'poll'
15
- loggedOutRegex: ".*Sign In.*" # String, regex pattern for determining if logged
16
- sessionManagement:
17
- method: ""
18
- parameters:
19
- script: ""
20
- scriptEngine: ""
21
- users: # List of one or more users available to use for authentication
22
- - name: "demoadmin" # String, the name to be used by the jobs
23
- credentials: # List of user credentials - may include any required for scripts
24
- username: "admin" # String, the username to use when authenticating, vars supported
25
- password: "admin"
26
- includePaths: []
27
- excludePaths: []
28
- technology:
29
- exclude:
30
- - "C"
31
- - "ASP"
32
- - "IBM DB2"
33
- - "PHP"
34
- - "CouchDB"
35
- - "XML"
36
- - "Microsoft SQL Server"
37
- - "JSP/Servlet"
38
- - "Firebird"
39
- - "MongoDB"
40
- - "HypersonicSQL"
41
- - "SAP MaxDB"
42
- - "Ruby"
43
- - "SCM"
44
- - "WS"
45
- - "Microsoft Access"
46
- - "Sybase"
47
- - "Python"
48
- parameters:
49
- failOnError: true
50
- failOnWarning: false
51
- progressToStdout: true
52
- vars: {}
53
- jobs:
54
- - parameters:
55
- scanOnlyInScope: true
56
- enableTags: false
57
- disableAllRules: false
58
- rules: []
59
- name: "passiveScan-config"
60
- type: "passiveScan-config"
61
- - parameters:
62
- context: "Demo testfire"
63
- user: "demoadmin"
64
- url: "https://demo.testfire.net"
65
- maxDuration: 1
66
- maxDepth: 2
67
- maxChildren: 0
68
- name: "spider"
69
- type: "spider"
70
- tests:
71
- - onFail: "INFO"
72
- statistic: "automation.spider.urls.added"
73
- site: ""
74
- operator: ">="
75
- value: 100
76
- name: "At least 100 URLs found"
77
- type: "stats"
78
- - name: "spider logged in" # Name of the test, optional
79
- type: stats # Specifies that the test is of type 'stats'
80
- statistic: "stats.auth.success" # Name of an integer / long statistic
81
- operator: ">=" # One of '==', '!=', '>=', '>', '<', '<='
82
- value: 2 # Value to compare statistic against
83
- onFail: "info"
84
- - name: "spider failed" # Name of the test, optional
85
- type: stats # Specifies that the test is of type 'stats'
86
- statistic: "stats.auth.failure" # Name of an integer / long statisti
87
- operator: ">=" # One of '==', '!=', '>=', '>', '<', '<='
88
- value: 2 # Value to compare statistic against
89
- onFail: "info"
90
- - parameters: {}
91
- name: "passiveScan-wait"
92
- type: "passiveScan-wait"
93
- - parameters:
94
- context: "Demo testfire"
95
- user: "demoadmin"
96
- policy: ""
97
- maxRuleDurationInMins: 0
98
- maxScanDurationInMins: 5
99
- maxAlertsPerRule: 0
100
- policyDefinition:
101
- defaultStrength: "medium"
102
- defaultThreshold: "medium"
103
- rules: []
104
- tests:
105
- - name: "spider logged in" # Name of the test, optional
106
- type: stats # Specifies that the test is of type 'stats'
107
- statistic: "stats.auth.success" # Name of an integer / long statistic
108
- operator: ">=" # One of '==', '!=', '>=', '>', '<', '<='
109
- value: 2 # Value to compare statistic against
110
- onFail: "info"
111
- - name: "spider failed" # Name of the test, optional
112
- type: stats # Specifies that the test is of type 'stats'
113
- statistic: "stats.auth.failure" # Name of an integer / long statisti
114
- operator: ">=" # One of '==', '!=', '>=', '>', '<', '<='
115
- value: 2 # Value to compare statistic against
116
- onFail: "info"
117
- name: "activeScan"
118
- type: "activeScan"
119
- - parameters:
120
- template: "traditional-json"
121
- reportDir: ""
122
- reportFile: ""
123
- reportTitle: "Boman_Scanning_Report"
124
- reportDescription: ""
125
- displayReport: false
126
- risks:
127
- - "info"
128
- - "low"
129
- - "medium"
130
- - "high"
131
- confidences:
132
- - "falsepositive"
133
- - "low"
134
- - "medium"
135
- - "high"
136
- - "confirmed"
137
- sites: []
138
- name: "report"
139
- type: "report"
1
+ ---
2
+ env:
3
+ contexts:
4
+ - name: "Boman Authenticated Scan"
5
+ urls:
6
+ - "https://demo.testfire.net/"
7
+ authentication:
8
+ method: "form"
9
+ parameters: # May include any required for scripts. All of the parameters support vars except for the port
10
+ loginPageUrl: "https://demo.testfire.net/login.jsp"
11
+ loginRequestUrl: "https://demo.testfire.net/doLogin"
12
+ loginRequestBody: "uid={%username%}&passw={%password%}&btnSubmit=Login"
13
+ verification:
14
+ method: "both" # String, one of 'response', 'request', 'both', 'poll'
15
+ loggedOutRegex: ".*Sign In.*" # String, regex pattern for determining if logged
16
+ sessionManagement:
17
+ method: ""
18
+ parameters:
19
+ script: ""
20
+ scriptEngine: ""
21
+ users: # List of one or more users available to use for authentication
22
+ - name: "demoadmin" # String, the name to be used by the jobs
23
+ credentials: # List of user credentials - may include any required for scripts
24
+ username: "admin" # String, the username to use when authenticating, vars supported
25
+ password: "admin"
26
+ includePaths: []
27
+ excludePaths: []
28
+ technology:
29
+ exclude:
30
+ - "C"
31
+ - "ASP"
32
+ - "IBM DB2"
33
+ - "PHP"
34
+ - "CouchDB"
35
+ - "XML"
36
+ - "Microsoft SQL Server"
37
+ - "JSP/Servlet"
38
+ - "Firebird"
39
+ - "MongoDB"
40
+ - "HypersonicSQL"
41
+ - "SAP MaxDB"
42
+ - "Ruby"
43
+ - "SCM"
44
+ - "WS"
45
+ - "Microsoft Access"
46
+ - "Sybase"
47
+ - "Python"
48
+ parameters:
49
+ failOnError: true
50
+ failOnWarning: false
51
+ progressToStdout: true
52
+ vars: {}
53
+ jobs:
54
+ - parameters:
55
+ scanOnlyInScope: true
56
+ enableTags: false
57
+ disableAllRules: false
58
+ rules: []
59
+ name: "passiveScan-config"
60
+ type: "passiveScan-config"
61
+ - parameters:
62
+ context: "Demo testfire"
63
+ user: "demoadmin"
64
+ url: "https://demo.testfire.net"
65
+ maxDuration: 1
66
+ maxDepth: 2
67
+ maxChildren: 0
68
+ name: "spider"
69
+ type: "spider"
70
+ tests:
71
+ - onFail: "INFO"
72
+ statistic: "automation.spider.urls.added"
73
+ site: ""
74
+ operator: ">="
75
+ value: 100
76
+ name: "At least 100 URLs found"
77
+ type: "stats"
78
+ - name: "spider logged in" # Name of the test, optional
79
+ type: stats # Specifies that the test is of type 'stats'
80
+ statistic: "stats.auth.success" # Name of an integer / long statistic
81
+ operator: ">=" # One of '==', '!=', '>=', '>', '<', '<='
82
+ value: 2 # Value to compare statistic against
83
+ onFail: "info"
84
+ - name: "spider failed" # Name of the test, optional
85
+ type: stats # Specifies that the test is of type 'stats'
86
+ statistic: "stats.auth.failure" # Name of an integer / long statisti
87
+ operator: ">=" # One of '==', '!=', '>=', '>', '<', '<='
88
+ value: 2 # Value to compare statistic against
89
+ onFail: "info"
90
+ - parameters: {}
91
+ name: "passiveScan-wait"
92
+ type: "passiveScan-wait"
93
+ - parameters:
94
+ context: "Demo testfire"
95
+ user: "demoadmin"
96
+ policy: ""
97
+ maxRuleDurationInMins: 0
98
+ maxScanDurationInMins: 5
99
+ maxAlertsPerRule: 0
100
+ policyDefinition:
101
+ defaultStrength: "medium"
102
+ defaultThreshold: "medium"
103
+ rules: []
104
+ tests:
105
+ - name: "spider logged in" # Name of the test, optional
106
+ type: stats # Specifies that the test is of type 'stats'
107
+ statistic: "stats.auth.success" # Name of an integer / long statistic
108
+ operator: ">=" # One of '==', '!=', '>=', '>', '<', '<='
109
+ value: 2 # Value to compare statistic against
110
+ onFail: "info"
111
+ - name: "spider failed" # Name of the test, optional
112
+ type: stats # Specifies that the test is of type 'stats'
113
+ statistic: "stats.auth.failure" # Name of an integer / long statisti
114
+ operator: ">=" # One of '==', '!=', '>=', '>', '<', '<='
115
+ value: 2 # Value to compare statistic against
116
+ onFail: "info"
117
+ name: "activeScan"
118
+ type: "activeScan"
119
+ - parameters:
120
+ template: "traditional-json"
121
+ reportDir: ""
122
+ reportFile: ""
123
+ reportTitle: "Boman_Scanning_Report"
124
+ reportDescription: ""
125
+ displayReport: false
126
+ risks:
127
+ - "info"
128
+ - "low"
129
+ - "medium"
130
+ - "high"
131
+ confidences:
132
+ - "falsepositive"
133
+ - "low"
134
+ - "medium"
135
+ - "high"
136
+ - "confirmed"
137
+ sites: []
138
+ name: "report"
139
+ type: "report"
@@ -483,7 +483,12 @@ def tool_configuration_validation():
483
483
 
484
484
  try:
485
485
  if Config.sca_present:
486
- Config.sca_message = 'SCA is properly configured'
486
+ if Config.sca_response[0]['tool'] != "SNYK":
487
+ Config.sca_message = 'SCA is properly configured'
488
+ else:
489
+ Config.sca_lang = "snyk"
490
+ logging.warning('Tool Config: SCA was properly configured on SaaS. It will be running SNYK from SaaS')
491
+
487
492
  else:
488
493
  Config.sca_message = 'SCA was not properly configured on SaaS'
489
494
  logging.warning('Tool Config: SCA was not properly configured on SaaS')
@@ -505,8 +510,12 @@ def tool_configuration_validation():
505
510
 
506
511
  try:
507
512
  if Config.iac_scan_present:
508
- Config.iac_scan_message = 'IaC scan is properly configured'
509
- Config.iac_scan_target = Config.iac_scan_configuration['target']
513
+ if Config.iac_scan_response[0]['tool'] != "SNYK":
514
+ Config.iac_scan_message = 'IaC scan is properly configured'
515
+ Config.iac_scan_target = Config.iac_scan_configuration['target']
516
+ else:
517
+ logging.warning('Tool Config: IaC was properly configured on SaaS. It will be running SNYK from SaaS')
518
+
510
519
  else:
511
520
  Config.iac_scan_message = 'IaC scan was not properly configured on SaaS'
512
521
  logging.warning('Tool Config: IaC scan was not properly configured on SaaS')
@@ -517,9 +526,12 @@ def tool_configuration_validation():
517
526
 
518
527
  try:
519
528
  if Config.con_scan_present:
520
- Config.con_scan_message = 'Container Scan is properly configured'
521
- Config.con_scan_type = Config.con_scan_configuration['type'].lower()
522
- Config.con_scan_target = Config.con_scan_configuration['target']
529
+ if Config.con_scan_response[0]['tool'] != "SNYK":
530
+ Config.con_scan_message = 'Container Scan is properly configured'
531
+ Config.con_scan_type = Config.con_scan_configuration['type'].lower()
532
+ Config.con_scan_target = Config.con_scan_configuration['target']
533
+ else:
534
+ logging.warning('Tool Config: Container Scan was properly configured on SaaS. It will be running SNYK from SaaS')
523
535
  else:
524
536
  Config.con_scan_message = 'Container Scan was not properly configured on SaaS'
525
537
  logging.warning('Tool Config: Container Scan was not properly configured on SaaS')
@@ -1,9 +1,8 @@
1
1
  [metadata]
2
2
  environment = prod
3
- version = 2.4.4
3
+ version = 2.4.6
4
4
  name = boman-cli
5
- saas_base_url =
6
- https = //dashboard.boman.ai/
5
+ saas_base_url = https://dashboard.boman.ai/
7
6
 
8
7
  [egg_info]
9
8
  tag_build =
@@ -1,6 +1,6 @@
1
+ coloredlogs<=15.0.1
1
2
  docker<=7.0.0
2
- requests<=2.31.0
3
+ pyfiglet<=1.0.2
3
4
  pyyaml
4
- coloredlogs<=15.0.1
5
+ requests<=2.31.0
5
6
  xmltodict<=0.13.0
6
- pyfiglet<=1.0.2
File without changes
File without changes
File without changes