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

Implement "greylisting" #62

Closed
wants to merge 9 commits into from
Closed

Implement "greylisting" #62

wants to merge 9 commits into from

Conversation

jahrules
Copy link

@jahrules jahrules commented Jun 17, 2023

Closes #61

Copy link
Contributor

@AbooMinister25 AbooMinister25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a few nitpicks.

src/mainframe/endpoints/report.py Outdated Show resolved Hide resolved
src/mainframe/endpoints/report.py Outdated Show resolved Hide resolved
@import-pandas-as-numpy
Copy link
Member

To explain this behavior to ensure we're accomplishing the objective properly:
If something flags on a new rule regardless we want to know about it. It should use whatever the most recent scan is to reference whether or not it has new behaviors.
e.g.:

numpyv1: rules matched [code marshaling]
numpyv2: rules matched [code marshaling] # doesn't flag
numpyv3: rules matched [code marshaling, malware] # does flag, new rule
numpyv4: rules matched [code marshaling, malware] # doesn't flag

Package flags should always reference the last seen version of the package to determine whether or not it will flag again.
New rule commits should generate new flags. If a rule is renamed and subsequently flags on a package, I consider this a potential benefit due to the ability to rename a rule with, say, a version number and have it be treated as an entirely unique rule.

@Robin5605
Copy link
Contributor

The feature @import-pandas-as-numpy needs to be implemented in the GET /package endpoint - we should be able to add a UNIQUE constraint to the returned rules so we don't return multiple versions that flagged on the same rule

@shenanigansd shenanigansd changed the title added the greylist feature Implement "greylisting" Jul 14, 2023
Previously did not take into account that the query might return `None`,
which would happen when the package is the first version.
Removed `is True` check.

Changed fstring to normal string.
@Robin5605
Copy link
Contributor

Closing this for now as it seems there was a misunderstanding on what the specification for #61 was. This may yet be a feature we want, and we will re-open it in the future after it's been discussed. Thanks all!

@Robin5605 Robin5605 closed this Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Greylist check
6 participants