Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add file_result to File Hosting Activity #1045

Merged
merged 1 commit into from
Apr 17, 2024

Conversation

shellcromancer
Copy link
Contributor

Related Issue:

Discussion in Slack here and discussed during the Network meeting on 2024-04-17.

The file hosting activity class has the File object, which has an owner attribute, but this doesn't make it easy to model the change. Should this class get a file_result attribute so that both the old and new owner can be represented? That way it'd be file.owner for the old owner, and file_result.owner for the new/updated owner of a document

Really good use case observation. If there are more transfers besides owner, then a file_result of type File would make sense, but if it is only a change of owner it could be handled in a lighter way, given how rich of an object File is (e.g. new_owner - I don't really like that though, it's a bit too kludgy for one use case). If the name could change, the size could change, its path changes, any of its extended attributes, its classification: having a file_result makes sense. There is a Rename activity already, and so I think your suggestion is the right one. I can imagine other activities in the future too.

Description of changes:

This addresses use-cases where the the activity was an Update but the changes were unable to be captured such as a new file.owner, file.size, file.name, etc.

@mikeradka mikeradka added enhancement New feature or request application_activity Issues related to Application Activity Category v1.3.0 Changes marked for v1.3.0 of OCSF labels Apr 17, 2024
@mikeradka mikeradka added the non_breaking Non Breaking, backwards compatible changes label Apr 17, 2024
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
This addresses use-cases where the the activity was an Update but
the changes were unable to be captured such as a new file.owner,
file.size, file.name, etc.
@mikeradka
Copy link
Contributor

Another question here for clarification - is the intent for file_result to represent a new file object? If so, this object may have to be set as type: "file" in the dictionary.

@mikeradka
Copy link
Contributor

Another question here for clarification - is the intent for file_result to represent a new file object? If so, this object may have to be set as type: "file" in the dictionary.

Disregard. I see it already belongs to the dictionary.

@mikeradka mikeradka self-requested a review April 17, 2024 19:37
Copy link
Contributor

@mikeradka mikeradka left a comment

Choose a reason for hiding this comment

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

This looks great now.

image

Copy link
Contributor

@Aniak5 Aniak5 left a comment

Choose a reason for hiding this comment

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

LGTM!

@floydtree floydtree merged commit c3adb85 into ocsf:main Apr 17, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
application_activity Issues related to Application Activity Category enhancement New feature or request non_breaking Non Breaking, backwards compatible changes v1.3.0 Changes marked for v1.3.0 of OCSF
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants