Skip to content

fix(LINK-2046: stop using integrations for get registries #1705

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kendall-choy-lw
Copy link
Contributor

@kendall-choy-lw kendall-choy-lw commented Apr 25, 2025

Summary

The vulnerability container list-registries command is currently missing data. It relies on container registry integration data to get a list of scanned registries. However, proxy scanner and inline scanner integrations don't contain the registry domain, and we are only able to get this data by looking at the container assessment. We can use the container assessment API here to get a full list of scanned registries in the last 7 days

The vulnerability container list-assessments command is also missing data. It calls the container assessment API while filtering for registry domains coming from the integration information. This only include platform scans, and would also consistently hit the API 500,000 total row limitation. We can improve this by breaking up the API requests further by scanner type. Breaking it up into four separate requests by scanner type prevents us from missing non-platform scan assessments. However, we are still hitting the API row limitation.

How did you test this change?

Tested list-registries, list-assessments, and container scan commands with local built CLI

Issue

https://lacework.atlassian.net/browse/LINK-2046

@@ -109,7 +109,7 @@ func userFriendlyErrorForOnDemandCtrVulnScan(err error, registry, repo, tag stri
"Could not find vulnerability integrations",
) {

registries, errReg := getContainerRegistries()
registries, errReg := getPlatformScannerIntegrationContainerRegistries()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since this cli command is to trigger a platform on-demand scan, we do only want registry domains from integrations

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.

1 participant