boman-cli 2.6.1__tar.gz → 2.6.3__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.
Files changed (23) hide show
  1. {boman_cli-2.6.1 → boman_cli-2.6.3}/PKG-INFO +7 -1
  2. {boman_cli-2.6.1 → boman_cli-2.6.3}/README.md +6 -0
  3. {boman_cli-2.6.1 → boman_cli-2.6.3}/boman_cli.egg-info/PKG-INFO +7 -1
  4. {boman_cli-2.6.1 → boman_cli-2.6.3}/boman_cli.egg-info/SOURCES.txt +1 -1
  5. {boman_cli-2.6.1 → boman_cli-2.6.3}/bomancli/Config.py +1 -1
  6. {boman_cli-2.6.1 → boman_cli-2.6.3}/bomancli/main.py +4 -4
  7. boman_cli-2.6.3/bomancli/malware_rules/boman/js/boman-malware-detection.yml +35 -0
  8. {boman_cli-2.6.1 → boman_cli-2.6.3}/bomancli/utils.py +2 -2
  9. {boman_cli-2.6.1 → boman_cli-2.6.3}/setup.cfg +2 -2
  10. {boman_cli-2.6.1 → boman_cli-2.6.3}/setup.py +1 -1
  11. boman_cli-2.6.1/bomancli/opengrep_rules/boman-malware-detection.yml +0 -36
  12. {boman_cli-2.6.1 → boman_cli-2.6.3}/boman_cli.egg-info/dependency_links.txt +0 -0
  13. {boman_cli-2.6.1 → boman_cli-2.6.3}/boman_cli.egg-info/entry_points.txt +0 -0
  14. {boman_cli-2.6.1 → boman_cli-2.6.3}/boman_cli.egg-info/requires.txt +0 -0
  15. {boman_cli-2.6.1 → boman_cli-2.6.3}/boman_cli.egg-info/top_level.txt +0 -0
  16. {boman_cli-2.6.1 → boman_cli-2.6.3}/bomancli/_init_.py +0 -0
  17. {boman_cli-2.6.1 → boman_cli-2.6.3}/bomancli/auth.py +0 -0
  18. {boman_cli-2.6.1 → boman_cli-2.6.3}/bomancli/base_logger.py +0 -0
  19. {boman_cli-2.6.1 → boman_cli-2.6.3}/bomancli/dev_attribution.py +0 -0
  20. {boman_cli-2.6.1 → boman_cli-2.6.3}/bomancli/loc_finder.py +0 -0
  21. {boman_cli-2.6.1 → boman_cli-2.6.3}/bomancli/sbom_enricher.py +0 -0
  22. {boman_cli-2.6.1 → boman_cli-2.6.3}/bomancli/templates/template_plan.yaml +0 -0
  23. {boman_cli-2.6.1 → boman_cli-2.6.3}/bomancli/validation.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: boman-cli
3
- Version: 2.6.1
3
+ Version: 2.6.3
4
4
  Summary: CLI tool of boman.ai
5
5
  Home-page: https://boman.ai
6
6
  Author: Sumeru Software Solutions Pvt. Ltd.
@@ -103,6 +103,12 @@ Example: boman-cli -a run -zap_session_script ./session.js
103
103
 
104
104
  # Release Notes:
105
105
 
106
+ ### 2.6.3
107
+ - **Bug fix** - minor bug fixes
108
+
109
+ ### 2.6.2
110
+ - **Updated rules** - new rules added
111
+
106
112
  ### 2.6.1
107
113
  - **Updated tools** - updated SAST, SCA and Secret scan tools
108
114
 
@@ -81,6 +81,12 @@ Example: boman-cli -a run -zap_session_script ./session.js
81
81
 
82
82
  # Release Notes:
83
83
 
84
+ ### 2.6.3
85
+ - **Bug fix** - minor bug fixes
86
+
87
+ ### 2.6.2
88
+ - **Updated rules** - new rules added
89
+
84
90
  ### 2.6.1
85
91
  - **Updated tools** - updated SAST, SCA and Secret scan tools
86
92
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: boman-cli
3
- Version: 2.6.1
3
+ Version: 2.6.3
4
4
  Summary: CLI tool of boman.ai
5
5
  Home-page: https://boman.ai
6
6
  Author: Sumeru Software Solutions Pvt. Ltd.
@@ -103,6 +103,12 @@ Example: boman-cli -a run -zap_session_script ./session.js
103
103
 
104
104
  # Release Notes:
105
105
 
106
+ ### 2.6.3
107
+ - **Bug fix** - minor bug fixes
108
+
109
+ ### 2.6.2
110
+ - **Updated rules** - new rules added
111
+
106
112
  ### 2.6.1
107
113
  - **Updated tools** - updated SAST, SCA and Secret scan tools
108
114
 
@@ -17,5 +17,5 @@ bomancli/main.py
17
17
  bomancli/sbom_enricher.py
18
18
  bomancli/utils.py
19
19
  bomancli/validation.py
20
- bomancli/opengrep_rules/boman-malware-detection.yml
20
+ bomancli/malware_rules/boman/js/boman-malware-detection.yml
21
21
  bomancli/templates/template_plan.yaml
@@ -121,7 +121,7 @@ class Config:
121
121
 
122
122
  log_level = "INFO"
123
123
 
124
- version = 'v2.6.1'
124
+ version = 'v2.6.3'
125
125
 
126
126
  boman_config_file = 'boman.yaml'
127
127
 
@@ -181,8 +181,8 @@ def runImage(data=None,type=None):
181
181
 
182
182
  # logging.info('Semgrep token present')
183
183
  logging.info("copying custom opengrep rules to the build directory")
184
- Utils.copy_rules_to_base_docker('opengrep_rules/boman-malware-detection.yml', Config.sast_build_dir)
185
- command_line = f"{command_line} --config auto --config /src/opengrep_rules/boman-malware-detection.yml"
184
+ Utils.copy_rules_to_base_docker('malware_rules', Config.sast_build_dir)
185
+ command_line = f"{command_line} --config auto --config /src/malware_rules --exclude='/src/malware_rules/**' --exclude='/src/boman_opengrep.json'"
186
186
  if Config.jenkins == 'yes':
187
187
 
188
188
  logging.info('SAST Docker: Preparing %s scan for jenkins env with %s user ', tool_name , userid)
@@ -200,7 +200,7 @@ def runImage(data=None,type=None):
200
200
  'bind': data['bind']}},user=userid,detach=detach,environment=env_var,remove=True)
201
201
  logging.info('SAST Docker: SUCCESS !!!. Message: %s Scan Completed',tool_name)
202
202
  logging.info('SAST Docker: Deleting custom opengrep rules from the build directory')
203
- shutil.rmtree('opengrep_rules')
203
+ shutil.rmtree('malware_rules')
204
204
  except errors.ContainerError as exc:
205
205
  msg='\n The following error has been recorded while scanning SAST'
206
206
  Utils.logError(msg,str(exc))
@@ -208,7 +208,7 @@ def runImage(data=None,type=None):
208
208
  Config.sast_scan_status = 'Failed'
209
209
  Config.sast_errors = f'Exit Status {exc.exit_status}:{str(exc)}]'
210
210
  logging.info('SAST Docker: Deleting custom opengrep rules from the build directory')
211
- shutil.rmtree('opengrep_rules')
211
+ shutil.rmtree('malware_rules')
212
212
 
213
213
 
214
214
 
@@ -0,0 +1,35 @@
1
+ rules:
2
+ - id: global-require-capability-capture-obfuscation-potential-malware
3
+ languages: [regex]
4
+ severity: HIGH
5
+ metadata:
6
+ category: security
7
+ technique: capability-smuggling
8
+ confidence: HIGH
9
+ impact: HIGH
10
+ message: >
11
+ Obfuscated malicious code was identified within the source code repository.
12
+ The code appears to have been introduced through a third-party dependency or
13
+ inadvertently committed by a developer. Its presence poses a supply chain security risk
14
+ and may enable unauthorized actions, data exfiltration, or compromise the integrity of
15
+ the application and development environment.
16
+ pattern-regex: '(global(This)?)\s*(\[(?:[^\[\]]|\[[^\[\]]*\]){1,80}\]|\.[A-Za-z0-9_$]+)\s*=\s*require\b'
17
+
18
+ - id: json-file-contains-obfuscated-js-code-potential-malware
19
+ languages: [regex]
20
+ severity: HIGH
21
+ paths:
22
+ include:
23
+ - "*.json"
24
+ metadata:
25
+ category: security
26
+ technique: format-integrity
27
+ confidence: MEDIUM
28
+ impact: HIGH
29
+ message: >
30
+ Obfuscated malicious code was identified within the source code repository.
31
+ The code appears to have been introduced through a third-party dependency or
32
+ inadvertently committed by a developer. Its presence poses a supply chain security risk
33
+ and may enable unauthorized actions, data exfiltration, or compromise the integrity of
34
+ the application and development environment.
35
+ pattern-regex: '(?s)\A(?=.*(?:\brequire\s*\(|\bfunction\s*\(|\beval\s*\(|=>|\b(?:var|let|const)\s+\w+\s*=|;\s*$))'
@@ -391,9 +391,9 @@ def copy_rules_to_base_docker(opengrep_rules_path, base_docker_path):
391
391
  logging.info('Copying the opengrep rules to base docker image')
392
392
  try:
393
393
  rules_path = pkg_resources.resource_filename(__name__,opengrep_rules_path)
394
- os.makedirs(os.path.join(base_docker_path, opengrep_rules_path), exist_ok=True)
394
+ # os.makedirs(os.path.join(base_docker_path, opengrep_rules_path), exist_ok=True)
395
395
  # logging.info(rules_path, os.path.join(base_docker_path, opengrep_rules_path))
396
- shutil.copy(rules_path, os.path.join(base_docker_path, opengrep_rules_path))
396
+ shutil.copytree(rules_path, os.path.join(base_docker_path, opengrep_rules_path))
397
397
  logging.info('Copied the opengrep rules to base docker image successfully')
398
398
  except Exception as e:
399
399
  logging.error('Error while copying the opengrep rules to base docker image: %s', e)
@@ -1,9 +1,9 @@
1
1
  [metadata]
2
2
  environment = prod
3
- version = v2.6.1
3
+ version = 2.6.3
4
4
  name = boman-cli
5
5
  saas_base_url =
6
- https = //qa.boman.ai/
6
+ https = //dashboard.boman.ai/
7
7
 
8
8
  [egg_info]
9
9
  tag_build =
@@ -46,7 +46,7 @@ setup(
46
46
  license='BSD 2-clause',
47
47
  entry_points = entry_points,
48
48
  packages=['bomancli'],
49
- package_data={'bomancli': ['templates/template_plan.yaml', 'opengrep_rules/boman-malware-detection.yml']},
49
+ package_data={'bomancli': ['templates/template_plan.yaml', 'malware_rules/**/*', 'malware_rules/**/**/*']},
50
50
  install_requires=['docker<=7.0.0',
51
51
  'requests<=2.31.0',
52
52
  'pyyaml',
@@ -1,36 +0,0 @@
1
- rules:
2
- - id: boman-global-require-capability-capture-obfuscation
3
- languages: [regex]
4
- severity: HIGH
5
- metadata:
6
- category: security
7
- technique: capability-smuggling
8
- confidence: HIGH
9
- impact: HIGH
10
- message: >
11
- Code stashes require/module/__dirname/__filename onto the global object
12
- under a (possibly obfuscated/computed) property name -- a known technique
13
- for smuggling Node.js module-loading capability into a context that
14
- should not normally have it (config file, eval'd snippet, stripped
15
- bundle). Seen in jsjiami/javascript-obfuscator-packed droppers.
16
- pattern-regex: '(global(This)?)\s*(\[(?:[^\[\]]|\[[^\[\]]*\]){1,80}\]|\.[A-Za-z0-9_$]+)\s*=\s*require\b'
17
-
18
- - id: boman-json-file-contains-obfuscated-js-code-tokens
19
- languages: [regex]
20
- severity: HIGH
21
- paths:
22
- include:
23
- - "*.json"
24
- metadata:
25
- category: security
26
- technique: format-integrity
27
- confidence: MEDIUM
28
- impact: HIGH
29
- message: >
30
- This .json file contains tokens that are not legal outside a JSON string
31
- value (require(, function(, eval(, var/let/const declarations, =>,
32
- statement-terminating semicolons). A well-formed JSON document should
33
- never contain executable-looking code -- this is a strong signal that
34
- non-JSON content has been appended/smuggled into a file that tooling
35
- (bundlers, config loaders) treats as trusted configuration.
36
- pattern-regex: '(?s)\A(?=.*(?:\brequire\s*\(|\bfunction\s*\(|\beval\s*\(|=>|\b(?:var|let|const)\s+\w+\s*=|;\s*$))'
File without changes
File without changes