Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] ScanPe adds dictionary to flags array #433

Closed
andrea-matsec opened this issue Feb 8, 2024 · 1 comment · Fixed by #434
Closed

[BUG] ScanPe adds dictionary to flags array #433

andrea-matsec opened this issue Feb 8, 2024 · 1 comment · Fixed by #434
Assignees
Labels
bug Something isn't working

Comments

@andrea-matsec
Copy link

Describe the bug
I'm not sure if this is a bug or an intentional change, but it seems that ScanPe adds a dictionary to the flags array under certain conditions.
I was able to identify the commit causing this change in behavior 6aec6d6#diff-8ab020f57ff0fffcfc6278539ec45f71021c8000ee44e3aa7a978fc13abaa976
and I was wondering if it was intentional to change the condition form

        if cert_dict := parse_certificates(data):
            if type(cert_dict) != str:
                self.event["security"] = cert_dict
            else:
                self.flags.append(cert_dict)

to

        if cert_dict := parse_certificates(data):
            if type(cert_dict) is str:
                self.event["security"] = cert_dict
            else:
                self.flags.append(cert_dict)

instead of

        if cert_dict := parse_certificates(data):
            if type(cert_dict) is not str:
                self.event["security"] = cert_dict
            else:
                self.flags.append(cert_dict)
@andrea-matsec andrea-matsec added the bug Something isn't working label Feb 8, 2024
@phutelmyer
Copy link
Contributor

phutelmyer commented Feb 12, 2024

@andrea-matsec Thank you so much for identifying this!
I definitely don't want to use that field for a dictionary. I'll fix that up and get that changed today.
Really appreciate it. :)

phutelmyer added a commit that referenced this issue Feb 12, 2024
@phutelmyer phutelmyer linked a pull request Feb 12, 2024 that will close this issue
5 tasks
phutelmyer added a commit that referenced this issue Feb 12, 2024
ScanPe Fix for Dictionary / Flag Type Change (Fix for #433)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants