Skip to content

Add cpu_info object and deprecate corresponding attributes in device_hw_info - #1630

Merged
floydtree merged 26 commits into
ocsf:mainfrom
jasonbreimer:cpu
Jun 23, 2026
Merged

Add cpu_info object and deprecate corresponding attributes in device_hw_info#1630
floydtree merged 26 commits into
ocsf:mainfrom
jasonbreimer:cpu

Conversation

@jasonbreimer

@jasonbreimer jasonbreimer commented May 12, 2026

Copy link
Copy Markdown
Contributor

Related Issue:

#1572

Description of Changes:

The existing flat CPU attributes on device_hw_info are brittle — they assume a
single homogeneous processor and can't represent multi-CPU systems or per-CPU detail.
This PR adds a new cpu_info object and cpu_info_list array, following the same
pattern established by gpu_info_list in v1.8.0.

New:

  • cpu_info object (array name cpu_info_list)
  • speed_mhz dictionary attribute
  • cores on device_hw_info — total core count across all installed CPUs

Deprecated on device_hw_info:

  • cpu_architecture, cpu_architecture_id, cpu_bits → use equivalents in cpu_info_list[*]
  • cpu_speed → use speed_mhz in cpu_info_list[*]
  • cpu_type → use model and vendor_name in cpu_info_list[*]
  • cpu_cores → use cores in cpu_info_list[*]

Retained:

  • cpu_count — system-wide aggregate, use cpu_info_list for per-CPU detail

Delete once you have confirmed the following:

  1. Did you add a single line summary of changes to Unreleased section in the CHANGELOG.md file? > Complete
  2. Have you followed the contribution guidelines? > Complete
  3. Did you run a local instance of the ocsf-server and ensure it ran without any errors/warnings? > Complete
  4. Is your PR title in sync with the description? > Complete

Add new speed attribute. Create cpu_info array dictionary item.

Signed-off-by: Jason Reimer <jason.reimer@tanium.com>
New object for cpu_info and array cpu_info_list

Signed-off-by: Jason Reimer <jason.reimer@tanium.com>
Add the cpu_info_list to the device hardware object.

Signed-off-by: Jason Reimer <jason.reimer@tanium.com>
Deprecate cpu_type for model and vendor.

Signed-off-by: Jason Reimer <jason.reimer@tanium.com>
Deprecation note for cpu_speed.

Signed-off-by: Jason Reimer <jason.reimer@tanium.com>
Add cpu_info object and deprecate flat CPU attributes on device_hw_info in favor of cpu_info_list.

Signed-off-by: Jason Reimer <jason.reimer@tanium.com>
Adjust deprecations and descriptions for cpu change.

Signed-off-by: Jason Reimer <jason.reimer@tanium.com>
Add "cores" as a replacement for "cpu_cores". 

Signed-off-by: Jason Reimer <jason.reimer@tanium.com>
Update for cpu changes.

Signed-off-by: Jason Reimer <jason.reimer@tanium.com>
@jasonbreimer jasonbreimer self-assigned this May 12, 2026
@jasonbreimer jasonbreimer added the enhancement New feature or request label May 12, 2026
@jasonbreimer jasonbreimer added the discovery Issues related to Discovery Category label May 12, 2026
@jasonbreimer jasonbreimer added breaking Any breaking, non backwards compatible changes v1.9.0 labels May 12, 2026
@github-actions

github-actions Bot commented May 12, 2026

Copy link
Copy Markdown

Schema Description Review

Automated suggestions for improving description clarity for LLM consumption. These are advisory — not required changes.

Looking at this PR update, I can confirm that all previous issues have been addressed:

Fixed: CHANGELOG spacing - The missing space before PR reference has been corrected in the speed_mhz entry.

Now reviewing the current state of all changed attributes:

New Issues Found

Suggestions

  1. Object/Class: cpu_info
    Attribute: cpu_architecture
    Issue: Description references another attribute using HTML code tags instead of providing standalone clarity
    Current: "The CPU architecture, normalized to the caption of the cpu_architecture_id value. In the case of Other, it is defined by the source."
    Suggested: "The CPU architecture as a human-readable string (e.g., 'x86', 'ARM', 'RISC-V'). When the architecture is not in the standard set, this contains the source-specific architecture name."

  2. Object/Class: cpu_info
    Attribute: cpu_architecture_id
    Issue: "Normalized identifier" is vague without context
    Current: "The normalized identifier of the CPU architecture."
    Suggested: "The standardized numeric identifier for the CPU architecture type (0=Unknown, 1=x86, 2=ARM, 3=RISC-V, 99=Other)."

Summary

The descriptions are generally clear and well-structured, with good cross-references between related attributes. Two minor improvements would enhance LLM comprehension by making the CPU architecture attributes more self-contained and removing dependency on cross-referencing other schema elements for understanding.

Add PR for change log entries.

Signed-off-by: Jason Reimer <jason.reimer@tanium.com>
Removed object level description

Signed-off-by: Jason Reimer <jason.reimer@tanium.com>
Comment thread objects/cpu_info.json
Comment thread objects/cpu_info.json
Comment thread objects/cpu_info.json
Comment thread dictionary.json Outdated
Remove content that is already defined in dictionary and unnecessary at this level.

Signed-off-by: Jason Reimer <jason.reimer@tanium.com>
Update description to describe the physical cpu package.

Signed-off-by: Jason Reimer <jason.reimer@tanium.com>
Comment thread objects/device_hw_info.json Outdated
Comment thread objects/device_hw_info.json Outdated
Comment thread dictionary.json Outdated
Comment thread CHANGELOG.md Outdated
Comment thread objects/device_hw_info.json Outdated
@davemcatcisco davemcatcisco changed the title Add cpu_info object and deprecate flat CPU attributes in device_hw_info Add cpu_info object and deprecate corresponding attributes in device_hw_info Jun 5, 2026
Modify descriptions to use the <code> tag.

Signed-off-by: Jason Reimer <jason.reimer@tanium.com>
Update case on "information".

Signed-off-by: Jason Reimer <jason.reimer@tanium.com>
Modify spacing for ocsf#1630

Signed-off-by: Jason Reimer <jason.reimer@tanium.com>
Signed-off-by: Jason Reimer <jason.reimer@tanium.com>
@jasonbreimer

Copy link
Copy Markdown
Contributor Author

Thanks for all the comments and review team! All changes are complete 6/9.

davemcatcisco
davemcatcisco previously approved these changes Jun 9, 2026

@mikeradka mikeradka left a comment

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.

One CHANGELOG issue before approval: the PR appears to have introduced duplicate ### Bugfixes / ### Deprecated headings under [Unreleased], and it duplicates/moves some unrelated #1597/#1603 deprecation entries. Can you move the #1630 deprecation entries into the existing ### Deprecated section and leave the unrelated entries where they are?

Here is the permalink for reference: https://github.com/jasonbreimer/ocsf-schema/blob/d27d9b13ad821ca9c56bcaa0be86fc03e8455807/CHANGELOG.md

Aniak5
Aniak5 previously approved these changes Jun 9, 2026

@Aniak5 Aniak5 left a comment

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.

LGTM!

Changes by request

Signed-off-by: Jason Reimer <jason.reimer@tanium.com>
@jasonbreimer
jasonbreimer dismissed stale reviews from Aniak5 and davemcatcisco via 5ba6d80 June 11, 2026 20:01
@jasonbreimer

Copy link
Copy Markdown
Contributor Author

Thanks @mikeradka good catch. I just fixed.

@jasonbreimer
jasonbreimer requested a review from mikeradka June 11, 2026 20:11
Signed-off-by: Jason Reimer <jason.reimer@tanium.com>
@floydtree
floydtree merged commit 142d454 into ocsf:main Jun 23, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Any breaking, non backwards compatible changes discovery Issues related to Discovery Category enhancement New feature or request v1.9.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants