Skip to content

Add Configuration for SCALIBR - #1034

Open
bromivipo wants to merge 4 commits into
GoogleCloudPlatform:masterfrom
bromivipo:extended_config
Open

Add Configuration for SCALIBR#1034
bromivipo wants to merge 4 commits into
GoogleCloudPlatform:masterfrom
bromivipo:extended_config

Conversation

@bromivipo

Copy link
Copy Markdown
Contributor

This PR adds configuration support for SCALIBR extended inventory collection in agentconfig.

Changes Included:

  • Metadata keys added: osconfig-extended-inventory-enabled, osconfig-extended-inventory-collection-interval, osconfig-extended-inventory-extractors-allowed.
  • Parsing & Overrides: Added setExtendedInventory to support instance-level overrides for project settings, along with a parseSlice helper for extractors.
  • Tests: Unit tests added in agentconfig_test.go for defaults, project settings, and instance overrides.

@google-oss-prow

Copy link
Copy Markdown

Hi @bromivipo. Thanks for your PR.

I'm waiting for a GoogleCloudPlatform member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@google-oss-prow google-oss-prow Bot added the lgtm label Aug 4, 2026
@bromivipo
bromivipo marked this pull request as ready for review August 5, 2026 12:58
Comment thread agentconfig/agentconfig.go Outdated
scalibrLinuxEnabled bool
guestAttributesEnabled bool
traceGetInventory bool
extendedInventoryEnabled bool

@bromivipo bromivipo Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

If we're updating the SCALIBR flow, am I right in understanding that we can drop scalibrLinuxEnabled and rely on extendedInventoryEnabled for both linux and windows?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No, scalibrLinuxEnabled is a flag to enable extraction using osv-scalibr and extendedInventoryEnabled is used to enable extraction with extended set of extractors (other than currently supported).

@ganochenkodg ganochenkodg Aug 13, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

please correct me if i'm wrong. if we have scalibrLinuxEnabled = true - we just start to use current default extractors ("os/cos", "os/dpkg", "os/rpm"). with additional extendedInventoryEnabled = true we start to use other extractors by default, language extractors for example. and extendedInventoryExtractorsAllowed is used to filter those additionally activated extractors. @petercieslak is that correct?

my other theory - extendedInventoryExtractorsAllowed must be non-empty to use any additional extractors with extendedInventoryEnabled, otherwise will be no effect.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The first description is correct, with scalibrLinuxEnabled we use the default extractors. Additionally extendedInventoryEnabled allows us to use extendedInventoryExtractorsAllowed in the extraction process. The extendedInventoryExtractorsAllowed don't have to be non-empty - if that's the case we just use the default extractors.

Comment thread agentconfig/agentconfig.go Outdated
guestAttributesEnabled bool
traceGetInventory bool
extendedInventoryEnabled bool
extendedInventoryCollectionInterval int

@bromivipo bromivipo Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Is this field necessary, or could we reuse the existing osConfigPollInterval ticker instead of adding a new interval configuration? Since we discussed merging the results of extended and legacy scans, it makes sense for them to run simultaneously.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

That's a good point, it seems that we can reuse the existing ticker

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

removed it

@google-oss-prow google-oss-prow Bot removed the lgtm label Aug 12, 2026
@petercieslak

Copy link
Copy Markdown
Contributor

/ok-to-test

@petercieslak

Copy link
Copy Markdown
Contributor

/gcbrun

@google-oss-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: bromivipo, iliatsuprik, petercieslak
Once this PR has been reviewed and has the lgtm label, please assign zoltak-g for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@petercieslak

Copy link
Copy Markdown
Contributor

/gcbrun

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants