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

feat(cli): support manifest bigger than 1k packages #285

Merged
merged 3 commits into from
Jan 7, 2021

Conversation

afiune
Copy link
Contributor

@afiune afiune commented Jan 7, 2021

User Story

As a user of the Lacework CLI,
I would like to be able to submit scans of package manifests bigger than 1,000 packages,
So I don't have to implement a splitting mechanism and run multiple CLI commands for a single manifest.

Implementation Details

The CLI will now check if the package manifest has more than the maximum
number of packages, if so, it will split the package manifest into
multiple chunks and trigger multiple API requests.

NOTE: We disallow more than 10 parallel requests (workers), which
are more than 10,000 packages on a single manifest/system.

Closes #237

JIRA: ALLY-275

Signed-off-by: Salim Afiune Maya [email protected]

**User Story**

As a user of the Lacework CLI,
I would like to be able to submit scans of package manifests bigger than
1,000 packages,
So I don't have to implement a splitting mechanism and run multiple CLI
commands for a single manifest.

**Implementation Details**

The CLI will now check if the package manifest has more than the maximum
number of packages, if so, it will split the package manifest into
multiple chunks and trigger multiple API requests.

**NOTE:** We disallow more than 10 parallel requests (workers), which
are more than 10,000 packages on a single manifest/system.

Closes #237

Signed-off-by: Salim Afiune Maya <[email protected]>
@afiune afiune added feat New feature or request cli Something related to the Lacework CLI labels Jan 7, 2021
@afiune afiune self-assigned this Jan 7, 2021
@afiune
Copy link
Contributor Author

afiune commented Jan 7, 2021

Added new feature split_pkg_manifest

Screen Shot 2021-01-07 at 12 24 17 PM

This new feature event will show the following feature.data:

{
  "total_packages": 1159,
  "worker0_total_vulns": 14,
  "worker1_total_vulns": 3,
  "workers": 2
}

Which will match with what the user will see on the output of the command:

Screen Shot 2021-01-07 at 12 22 24 PM

Copy link
Contributor

@scottford-lw scottford-lw left a comment

Choose a reason for hiding this comment

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

👍 Great work on this @afiune 🙌

@afiune afiune merged commit ae2b677 into master Jan 7, 2021
@afiune afiune deleted the afiune/host_package_manifest-multiple-requests branch January 7, 2021 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Something related to the Lacework CLI feat New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support package-manifest with over 1k packages
3 participants