Bug fix #181 and #182 #183
Merged
Merged
Conversation
`filter_attributes_by_profiles_set/2` used `Enum.filter/2` on a map, which returns a list of tuples. Jason cannot encode tuples, causing a 500 error on `/api/classes/:id?profiles=...`. Use `Map.filter/2` when attributes is a map to preserve the map structure.
Signed-off-by: Rajas Panat <rajaspa@amazon.com>
…he server Signed-off-by: Rajas Panat <rajaspa@amazon.com>
Signed-off-by: Rajas Panat <rajaspa@amazon.com>
rmouritzen-splunk
approved these changes
Jun 17, 2026
pagbabian-splunk
approved these changes
Jun 17, 2026
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.
Summary
/api/classes/:id?profiles=...endpoints (fixes [v1.8.0] Not able to fetch schema by class and profile name via /api/classes/ #182)sourcemeta schema attribute to matchreferencesstyle (fixes The Source meta schema attribute is not rendered consistently with the References rendering #181)Details
Profile filtering crash (#182)
filter_attributes_by_profiles_set/2inutils.exusedEnum.filter/2on a map of attributes. In Elixir,Enum.filteron a map returns a list of{key, value}tuples — not a map. When passed toJason.encode!/2, it raisedProtocol.UndefinedErrorbecause Jason cannot encode tuples.Added a
when is_map(attributes)clause that usesMap.filter/2to preserve the map structure.Source attribute rendering (#181)
The
sourcemeta schema attribute was rendered as a bold<dt>definition term on its own line, whilereferencesrendered as a subdued inline element. Sincesourceindicates the original field name in the standard referenced byreferences, it now renders inline after the reference tags:Changed
inline_references/1to accept an optionalsourceparameter and append it as(as <code>source</code>)in a muted style consistent with the refs label.Test plan
GET /api/classes/account_change?profiles=host→ 200 with filtered attributesGET /api/classes/account_change?profiles=%22host%22→ 200GET /api/classes/account_change?profiles=%5B%22host%22%5D→ 200GET /api/classes/file_activity?profiles=cloud→ 200GET /api/classes/account_change(no profile) → 200, unchanged behaviorsourceoccurrences render inline with refs (verified:detection_finding.impact_id,email.message_uid,network_connection_info.community_uid,process_entity.cpid)sourcerender refs unchangedmix compilepasses cleanly