Update Scheduled Job Activity class and expand job object attributes#1597
Update Scheduled Job Activity class and expand job object attributes#1597
Conversation
|
Re: the "job_result " field. I agree that there needs to be a way to represent the before and after state. There is currently an inconsistency in the way this is done: In File Activity there is "file" (required) and "file_result" (recommended) In Registry Value Activity there is a "reg_value" (required) and "prev_reg_value" optional. Since events can be captured asynchronously, after the mutation has occurred, the 2nd pattern makes more sense IMO since the original state may not be known. I recognise that some activity can be generated synchronously - e.g. a "access control" type product may use hooks, say, to intercept the modification and block it. It will want to report the current (unchanged) state and the state that would have existed had the modification been allowed. |
|
Thank you for the background, this helps very much. At a high level, scheduled jobs exist in all major operating systems, but the way they’re defined, triggered, and managed differs quite a bit between Windows and others like Linux/Unix or macOS. Perhaps an avenue for discussion: establishing the common attributes/intersection between:
Which areas of this PR are Windows specific versus which areas can be more broadly applied? We can try to sort a bit in the System Activity call. |
Let's gather some more thoughts on this. Question - could it help if we approached this by enriching the |
|
I think this issue is bigger than this PR, so I don't intend to derail it. However, my further thoughts : At the risk of stating the obvious for the 1st 3, which only need the reporting of 1 object :
Whatever is chosen, I think current state should be required and any other states should be optional or recommended. Selfishly, I prefer "object" and "prev_object" Instead of using "object_result" or "prev_object", maybe have 3 fields "object" : the state at the time the event was generated But its a big break and maybe I over-thought it! Unfortunately I am unavailable the OCSF weekly calls next week. |
|
Just wanted to highlight another point that we've discussed with @mikeradka on the last system call (03/18/2026):
Here's a generalized set of actions that I've come up with:
|
It would be interesting to fit BITS (https://attack.mitre.org/techniques/T1197/) into this now or later. a] offload downloading of tools to a operating system service (breaking the link between actors) There's no top level schedule, so doesn't obvious fit under "scheduled task", but there's a lot in common |
Schema Description ReviewAutomated suggestions for improving description clarity for LLM consumption. These are advisory — not required changes. Looking at the current schema changes compared to my previous review: Suggestions❌ All four HTML markup issues from the previous review remain unaddressed The HTML tags (
Anti-Pattern Findings
CHANGELOG Issues
SummaryFour HTML markup issues from the previous review remain unaddressed and should be converted to plain text for optimal cross-platform compatibility. The static analysis correctly identified a generic naming issue with the |
Signed-off-by: s-Fl <74200804+s-Fl@users.noreply.github.com>
|
Draft PR is in place for the FAQ on entity state: ocsf/ocsf-docs#134 |
Signed-off-by: s-Fl <74200804+s-Fl@users.noreply.github.com>
Schema Anti-Pattern CheckAutomated structural analysis for common schema design anti-patterns. These are advisory — not required changes. Warnings
Informational
Summary: 2 warning(s), 1 informational finding(s) |
|
A few angles to discuss in tomorrow's (4/22) system call:
|
|
@mikeradka , I renamed Inside the Scheduled Job Activity class: Should be good now. |
mikeradka
left a comment
There was a problem hiding this comment.
Looks great! Thank you for this contribution.







Job update
There's an
Update (2)value withinactivity_idin theScheduled Job Activityclass. However, no entity available to describe a resulting entity or an entity before the mutation.Thus, I suggest adding the
job_resultobject to this event class:Windows Task
According to Microsoft documentation, a Task consists of Triggers, Actions and other attributes. Each Task can have multiple Triggers and Actions:
Task Triggers
Triggers can be divided into 2 types:
See: https://learn.microsoft.com/en-us/windows/win32/taskschd/task-triggers
A list of triggers can be found here:
Or here:
Each trigger have a set of attributes. Some are common for all triggers and others are common for each type of trigger (time-based or event-based):
Common attributes for event-based triggers:

Common attributes for time-based triggers:
The amount of unique attributes is high. In my opinion, it would be ineffective to place each of them under the enum-value. I suppose, we can store some of them inside a Kev:value object. Also, if the trigger type is event-based, we need to specify an event identifier and a log source that the job should look for.
The resulting
job_triggerobject:Task Action
There are 4 actions available for a task to perform:
See: https://learn.microsoft.com/en-us/windows/win32/taskschd/task-actions#types-of-actions
Similarly, each action has different attributes. I think all of them can be stored inside a Key:value object; an exception for that is
cmd_line. This attribute was previously stored inside thejobobject (job.cmd_line). I deprecated thejob.cmd_lineattribute and created similar one inside thejob_actionobject.The resulting
job_actionobject:Additional job attributes
From the
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tasksregistry hive, we can see that each job has a unique identifier. So that, I propose addingjob.uidfield to store that data.During system call discussions, additional edits were made: #1597 (comment)
I've also added

Disabled (5)enum-value forrun_state_idattribute:The resulting
jobobject:I'm aware that
job.job_action/job.job_triggernaming is redundant. Glad to hear any suggestions.