-
Notifications
You must be signed in to change notification settings - Fork 69
scan: make max db allowed build age configurable #1677
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
scan: make max db allowed build age configurable #1677
Conversation
Signed-off-by: Hector Fernandez <[email protected]>
Signed-off-by: Hector Fernandez <[email protected]>
// DisableSBOMCache controls whether the scanner will cache SBOMs generated from | ||
// APKs. If true, the scanner will not cache SBOMs or use existing cached SBOMs. | ||
DisableSBOMCache bool | ||
} | ||
|
||
// DefaultOptions is the recommended default configuration for a new Scanner. | ||
// These options are suitable for most use scanning cases. | ||
var DefaultOptions = Options{} | ||
var DefaultOptions = Options{ | ||
MaxAllowedBuildAge: 120 * time.Hour, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we planning to keep the 120 permanently or temporary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a temporary change, I've added a warning suggesting a recommended age. I also added a note to the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems really confusing
we have a recommended age of 48hrs, but default to 120hrs
i guess until we better understand the reasoning behind the 48hr
i would recommend keeping the default behavior and allowing users to avoid it as necessary
rather than setting a new default that really shouldnt be the default
Signed-off-by: Hector Fernandez <[email protected]>
Signed-off-by: Hector Fernandez <[email protected]>
9f74f2d
to
aaffeec
Compare
This changes the current default value for the grype configuration max-allowed-built-age to 120h as in Grype. We currently set it to 48h.
We made this change to temporary overcome this issue on the upstream grype repo https://github.com/anchore/grype-db/actions/workflows/daily-db-publisher-r2.yaml which has been failing during the last 2 days.