boman-cli 2.4.2__tar.gz → 2.4.4__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,17 +1,22 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: boman-cli
3
- Version: 2.4.2
3
+ Version: 2.4.4
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
10
9
  Classifier: Development Status :: 5 - Production/Stable
11
10
  Classifier: Intended Audience :: Developers
12
11
  Classifier: License :: OSI Approved :: BSD License
13
12
  Classifier: Operating System :: OS Independent
14
13
  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
15
20
 
16
21
  # Introduction
17
22
  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.
@@ -88,6 +93,18 @@ Example: boman-cli -a run -zap_session_script ./session.js
88
93
 
89
94
  ### Release Note:
90
95
 
96
+ ### V2.4.4
97
+ - Minor bug fix + V2.4.3
98
+
99
+ ### V2.4.3
100
+ - **New:** SonarCloud API integration. Navigate to **Integrations -> SonarCloud** in the Boman SaaS to setup SonarCloud.
101
+
102
+ ### V2.4.2
103
+ - **New:** Advanced ZAP setup. Navigate to **Integrations -> OWASP ZAP -> Integrate -> enable Advance Zap Authentication** in the Boman SaaS to enable Advanced Zap setup.
104
+
105
+ ### V2.4.0
106
+ - **New:** optimized CLI and Progression indicator in Boman SaaS.
107
+
91
108
  ### V2.3.0
92
109
  - **New:** The pipeline configuration has been relocated from `boman.yaml` to the SaaS platform. Navigate to **Apps -> App menu -> Configure pipeline** to set it up. The current `boman.yaml` configuration will remain functional until it is officially deprecated.
93
110
 
@@ -137,5 +154,3 @@ Released on: 21 May 2024
137
154
 
138
155
 
139
156
 
140
-
141
-
@@ -73,6 +73,18 @@ Example: boman-cli -a run -zap_session_script ./session.js
73
73
 
74
74
  ### Release Note:
75
75
 
76
+ ### V2.4.4
77
+ - Minor bug fix + V2.4.3
78
+
79
+ ### V2.4.3
80
+ - **New:** SonarCloud API integration. Navigate to **Integrations -> SonarCloud** in the Boman SaaS to setup SonarCloud.
81
+
82
+ ### V2.4.2
83
+ - **New:** Advanced ZAP setup. Navigate to **Integrations -> OWASP ZAP -> Integrate -> enable Advance Zap Authentication** in the Boman SaaS to enable Advanced Zap setup.
84
+
85
+ ### V2.4.0
86
+ - **New:** optimized CLI and Progression indicator in Boman SaaS.
87
+
76
88
  ### V2.3.0
77
89
  - **New:** The pipeline configuration has been relocated from `boman.yaml` to the SaaS platform. Navigate to **Apps -> App menu -> Configure pipeline** to set it up. The current `boman.yaml` configuration will remain functional until it is officially deprecated.
78
90
 
@@ -1,17 +1,22 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: boman-cli
3
- Version: 2.4.2
3
+ Version: 2.4.4
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
10
9
  Classifier: Development Status :: 5 - Production/Stable
11
10
  Classifier: Intended Audience :: Developers
12
11
  Classifier: License :: OSI Approved :: BSD License
13
12
  Classifier: Operating System :: OS Independent
14
13
  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
15
20
 
16
21
  # Introduction
17
22
  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.
@@ -88,6 +93,18 @@ Example: boman-cli -a run -zap_session_script ./session.js
88
93
 
89
94
  ### Release Note:
90
95
 
96
+ ### V2.4.4
97
+ - Minor bug fix + V2.4.3
98
+
99
+ ### V2.4.3
100
+ - **New:** SonarCloud API integration. Navigate to **Integrations -> SonarCloud** in the Boman SaaS to setup SonarCloud.
101
+
102
+ ### V2.4.2
103
+ - **New:** Advanced ZAP setup. Navigate to **Integrations -> OWASP ZAP -> Integrate -> enable Advance Zap Authentication** in the Boman SaaS to enable Advanced Zap setup.
104
+
105
+ ### V2.4.0
106
+ - **New:** optimized CLI and Progression indicator in Boman SaaS.
107
+
91
108
  ### V2.3.0
92
109
  - **New:** The pipeline configuration has been relocated from `boman.yaml` to the SaaS platform. Navigate to **Apps -> App menu -> Configure pipeline** to set it up. The current `boman.yaml` configuration will remain functional until it is officially deprecated.
93
110
 
@@ -137,5 +154,3 @@ Released on: 21 May 2024
137
154
 
138
155
 
139
156
 
140
-
141
-
@@ -1,3 +1,2 @@
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.2'
123
+ version = 'v2.4.4'
124
124
 
125
125
  boman_config_file = 'boman.yaml'
126
126
 
@@ -35,7 +35,7 @@ def new_authorize():
35
35
  Config.dast_adv_auth_enabled = True
36
36
  else:
37
37
  Config.dast_adv_auth_enabled = False
38
- logging.info(json_response)
38
+ # logging.info(json_response)
39
39
 
40
40
  except:
41
41
  logging.info('New Authorization: Failed!!! exit code: 2 (AUTH ERROR) Message: Authorization Failed unable to load json response')
@@ -570,6 +570,30 @@ def runImage(data=None,type=None):
570
570
 
571
571
  #### function to upload the test report to the server with other data -- MM ------------------------------------
572
572
  def uploadReport(filename,toolname,tool_id,scan_details_id,type):
573
+
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
+
573
597
 
574
598
  logging.info('Uploading %s report with filename: %s', toolname,filename)
575
599
  if True:
@@ -833,24 +857,38 @@ def main():
833
857
 
834
858
  if Config.sast_present is True:
835
859
 
860
+ if Config.sast_lang != 'sonar':
836
861
 
837
- logging.info('SAST: Preparing SAST Scan')
838
- logging.info('SAST: Working directory is %s',Config.sast_build_dir)
839
- if Config.sast_lang is None:
840
- #findLang()
841
- logging.error('SAST: Language was not defined. Exiting')
842
- exit(4) ## misconfig error
862
+ logging.info('SAST: Preparing SAST Scan')
863
+ logging.info('SAST: Working directory is %s',Config.sast_build_dir)
864
+ if Config.sast_lang is None:
865
+ #findLang()
866
+ logging.error('SAST: Language was not defined. Exiting')
867
+ exit(4) ## misconfig error
843
868
 
844
869
 
845
870
 
846
- for data in Config.sast_response:
871
+ for data in Config.sast_response:
847
872
 
848
- if data['scan_status'] == 2 :
849
- logging.warning('SAST: No Configuration found from SaaS')
850
- logging.info('SAST: Ignoring Scan')
851
- else:
852
- runImage(data=data,type='SAST')
853
- logging.info("SAST: Successfull !!!")
873
+ if data['scan_status'] == 2 :
874
+ logging.warning('SAST: No Configuration found from SaaS')
875
+ logging.info('SAST: Ignoring Scan')
876
+ else:
877
+ runImage(data=data,type='SAST')
878
+ logging.info("SAST: Successfull !!!")
879
+ else:
880
+ logging.warning('SAST: Configured with Sonar it will run on SaaS')
881
+ Config.sast_scan_status = 'SUCCESS'
882
+ 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
+
854
892
 
855
893
  else:
856
894
  logging.warning('SAST: Ignoring Scan. Message: Not Configured')
@@ -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"
@@ -906,7 +906,7 @@ def fetch_zap_advance_config():
906
906
 
907
907
  plan_file_present_in_adv_zap_config = False
908
908
  for file in config_files:
909
- logging.info('Zap Advacne Config: Fetching from %s filename %s',file['file_path'], file['file_name'])
909
+ logging.info('Zap Advance Config: Fetching from %s filename %s',file['file_path'], file['file_name'])
910
910
  download_file(file['file_path'], file['file_name'])
911
911
 
912
912
 
@@ -354,10 +354,10 @@ def tool_configuration_validation():
354
354
  logging.info("Tool Config: Failed!!! exit code: 1 (Server ERROR) Message: Problem occured while authorizing the scan, Please contact boman.ai team")
355
355
  exit(1) #server error
356
356
  try:
357
- logging.info( json_response['data'])
357
+ # logging.info( json_response['data'])
358
358
 
359
359
  Config.dast_response = json_response['data']['dast']
360
- logging.info(Config.dast_response)
360
+ # logging.info(Config.dast_response)
361
361
  Config.sast_response = json_response['data']['sast']
362
362
  Config.sca_response = json_response['data']['sca']
363
363
  Config.secret_scan_response = json_response['data']['secret_scan']
@@ -415,11 +415,15 @@ def tool_configuration_validation():
415
415
 
416
416
  try:
417
417
  if Config.sast_present:
418
- Config.sast_message = 'SAST is properly configured'
419
- Config.sast_ignore = True if Config.sast_configuration['ignore_files'].lower() == "true" else False
420
- Config.sast_target = Config.sast_configuration['target']
421
- Config.sast_lang = "semgrep"
422
- Config.sast_ignore_folders_and_files = Config.sast_configuration['sast_ignore_file_data']
418
+ if Config.sast_response[0]['lang'] != "sonar":
419
+ Config.sast_message = 'SAST is properly configured'
420
+ Config.sast_ignore = True if Config.sast_configuration['ignore_files'].lower() == "true" else False
421
+ Config.sast_target = Config.sast_configuration['target']
422
+ Config.sast_lang = "semgrep"
423
+ Config.sast_ignore_folders_and_files = Config.sast_configuration['sast_ignore_file_data']
424
+ else:
425
+ Config.sast_lang = "sonar"
426
+ logging.warning('Tool Config: SAST was properly configured on SaaS. It will be running Sonar from SaaS')
423
427
  else:
424
428
  Config.sast_message = 'SAST was not properly configured on SaaS'
425
429
  logging.warning('Tool Config: SAST was not properly configured on SaaS')
@@ -1,8 +1,9 @@
1
1
  [metadata]
2
2
  environment = prod
3
- version = 2.4.2
3
+ version = 2.4.4
4
4
  name = boman-cli
5
- saas_base_url = https://dashboard.boman.ai/
5
+ saas_base_url =
6
+ https = //dashboard.boman.ai/
6
7
 
7
8
  [egg_info]
8
9
  tag_build =
@@ -1,6 +1,6 @@
1
- coloredlogs<=15.0.1
2
1
  docker<=7.0.0
3
- pyfiglet<=1.0.2
4
- pyyaml
5
2
  requests<=2.31.0
3
+ pyyaml
4
+ coloredlogs<=15.0.1
6
5
  xmltodict<=0.13.0
6
+ pyfiglet<=1.0.2
File without changes
File without changes