[github] Allow polymorphic audit ruleset_conditions parameters via subobjects:false#20306
Draft
vatsaldesai93 wants to merge 1 commit into
Draft
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
vatsaldesai93
force-pushed
the
fix/github-audit-ruleset-conditions-subobjects
branch
from
July 23, 2026 02:32
5cc6e4f to
c369122
Compare
Contributor
ReviewersBuildkite won't run for external contributors automatically; you need to add a comment:
NOTE: https://github.com/elastic/integrations/blob/main/.buildkite/pull-requests.json contains all those details. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed commit message
The audit data stream declares ruleset condition
parameters.include/exclude(andrepository_ids) askeyword.That's correct for
repository_name/repository_idtargets, where GitHub sends strings — butrepository_propertytargets send objects (
{name, source, property_values}) in the same field. An object can't be stored as akeyword,so the whole document is rejected to the failure store with a
document_parsing_exception. No single fixed typeaccepts both shapes.
Setting
subobjects: falseon theparameters/old_parametersobjects lets both coexist: strings stay on thekeyword leaf, and objects expand into dotted keyword leaves (
parameters.include.name,parameters.include.source,...). The data stream has no
nestedfields here, so querying is unaffected.Trade-off: the explicit
include/exclude/repository_idsdeclarations become anobject_type: keywordcatch-all, because the package spec disallows explicit child
fieldsundersubobjects: false. The leaves staykeywordand queryable — they're just mapped dynamically rather than enumerated.Checklist
tips for building integrations and this pull
request is aligned with them.
changelog.ymlfile.guidelines.
Dashboard good practices (no
dashboard changes)
How to test this PR locally
A
keywordleaf accepts the string form but rejects the object form:Doc 2 fails with
document_parsing_exception. Withsubobjects: falseon the enclosing object both variants indexcleanly. Then:
elastic-package buildandelastic-package test pipeline -C packages/github.Related issues