Skip to content

Prowler security hub problem after last updates #8617

@Norther85

Description

@Norther85

Steps to Reproduce

  1. prowler aws -z -S -s accessanalyzer -R arn:aws:iam::xxxxxxxxx:role/infosec-cross-account -M csv
  2. aws
  3. multiacounts/org
  4. Traceback (most recent call last):
    File "/home/ec2-user/.local/bin/prowler", line 5, in
    from prowler.main import prowler
    File "/home/ec2-user/.local/lib/python3.9/site-packages/prowler/main.py", line 95, in
    from prowler.providers.aws.lib.security_hub.security_hub import SecurityHub
    File "/home/ec2-user/.local/lib/python3.9/site-packages/prowler/providers/aws/lib/security_hub/security_hub.py", line 66, in
    class SecurityHub:
    File "/home/ec2-user/.local/lib/python3.9/site-packages/prowler/providers/aws/lib/security_hub/security_hub.py", line 222, in SecurityHub
    ) -> tuple[str, Session | None]:
    TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'. ----- i use prowler once a month to scan about 150 aws account and save it in security hub. In this month after some update i get this error. Can someone check if i do something wrong or there is code problem? Thanks

Expected behavior

scan one of aws services and export results to securityhub and csv

Actual Result with Screenshots or Logs

File "/home/ec2-user/.local/bin/prowler", line 5, in
from prowler.main import prowler
File "/home/ec2-user/.local/lib/python3.9/site-packages/prowler/main.py", line 95, in
from prowler.providers.aws.lib.security_hub.security_hub import SecurityHub
File "/home/ec2-user/.local/lib/python3.9/site-packages/prowler/providers/aws/lib/security_hub/security_hub.py", line 66, in
class SecurityHub:
File "/home/ec2-user/.local/lib/python3.9/site-packages/prowler/providers/aws/lib/security_hub/security_hub.py", line 222, in SecurityHub
) -> tuple[str, Session | None]:
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'.

How did you install Prowler?

pip install prowler

Environment Resource

ec2 instance t4g

OS used

  1. amazon linux 2
  2. python version 3.9.23

Prowler version

error - i install latest one. Traceback (most recent call last): File "/home/ec2-user/.local/bin/prowler", line 5, in from prowler.main import prowler File "/home/ec2-user/.local/lib/python3.9/site-packages/prowler/main.py", line 95, in from prowler.providers.aws.lib.security_hub.security_hub import SecurityHub File "/home/ec2-user/.local/lib/python3.9/site-packages/prowler/providers/aws/lib/security_hub/security_hub.py", line 66, in class SecurityHub: File "/home/ec2-user/.local/lib/python3.9/site-packages/prowler/providers/aws/lib/security_hub/security_hub.py", line 222, in SecurityHub ) -> tuple[str, Session | None]: TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'

Pip version

pip 21.3.1 from /usr/lib/python3.9/site-packages/pip (python 3.9)

Context

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions